pomelo常見(jiàn)的術(shù)語(yǔ)及命令有哪些

這篇文章主要講解了“pomelo常見(jiàn)的術(shù)語(yǔ)及命令有哪些”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來(lái)研究和學(xué)習(xí)“pomelo常見(jiàn)的術(shù)語(yǔ)及命令有哪些”吧!

創(chuàng)新互聯(lián)公司2013年開(kāi)創(chuàng)至今,是專(zhuān)業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目成都網(wǎng)站制作、網(wǎng)站設(shè)計(jì)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元潤(rùn)州做網(wǎng)站,已為上家服務(wù),為潤(rùn)州各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話(huà):18980820575

pomelo架構(gòu)示意圖

pomelo常見(jiàn)的術(shù)語(yǔ)及命令有哪些

術(shù)語(yǔ)相關(guān)

名詞解釋
gate-server大門(mén),負(fù)載均衡,不參與rpc,只有clientPort,客服端先向gate發(fā)請(qǐng)求,gate會(huì)通過(guò)哈希算法給客戶(hù)端分配connector-server
connect-server同時(shí)擁有clientPort(j監(jiān)聽(tīng)客戶(hù)端連接)和port(給后端提供服務(wù)),①接收客戶(hù)端連接請(qǐng)求,創(chuàng)建與客戶(hù)端連接,維護(hù)客戶(hù)端session ②接收客戶(hù)端對(duì)后端server的請(qǐng)求,按照用戶(hù)配置的路由策略,將請(qǐng)求給具體的后端server③接收后端server對(duì)客戶(hù)端的響應(yīng),完成對(duì)客戶(hù)端的消息發(fā)送
game-serve應(yīng)用邏輯server完成實(shí)際的應(yīng)用邏輯。提供服務(wù)給客戶(hù)端
master-server加載配置文件,啟動(dòng)服務(wù)器集群,對(duì)所有服務(wù)器進(jìn)行管理
rpc進(jìn)程間通信,(1)namespace-sys:系統(tǒng)rpc調(diào)用(①后端server向前端server請(qǐng)求session②后端server通過(guò)channel 對(duì)前端server push消息③前端server將用戶(hù)請(qǐng)求路由給后端server)(2)namespace-user:用戶(hù)自定義rpc,自定義代碼并顯式rpc調(diào)用
route標(biāo)識(shí)一個(gè)具體服務(wù)或客戶(hù)端推送消息的位置①對(duì)server端來(lái)說(shuō):路由形式為chat(服務(wù)器類(lèi)型).chatHandler(服務(wù)器中一個(gè)handler).send(handler中的一個(gè)方法)②對(duì)client來(lái)說(shuō):路由形式為onChat
router就是根據(jù)用戶(hù)session及請(qǐng)求內(nèi)容做一些運(yùn)算后,將其映射到一個(gè)具體的應(yīng)用服務(wù)器id
Session一個(gè)客戶(hù)端連接的抽象
FrontendSession①通過(guò)FrontendSession可以對(duì)settings字段進(jìn)行設(shè)置值,然后通過(guò)調(diào)用FrontendSession的push方法,將設(shè)置的settings的值同步到原始session中;②通過(guò)FrontendSession的bind調(diào)用,還可以給session綁定uid;③當(dāng)然也可以通過(guò)FrontendSession訪(fǎng)問(wèn)session的只讀字段,不過(guò)對(duì)FrontendSession中與session中相同的只讀字段的修改并不會(huì)反映到原始的session中
BackendSession由BackendSessionService創(chuàng)建并維護(hù)的,在后端服務(wù)器接收到請(qǐng)求后,由BackendSessionService根據(jù)前端服務(wù)器rpc的參數(shù),進(jìn)行創(chuàng)建
SessionService維護(hù)所有的原始的session信息,包括不可訪(fǎng)問(wèn)的字段,綁定的uid以及用戶(hù)自定義的字段
BackendSessionService對(duì)BackendSessionService的每一次方法調(diào)用實(shí)際上都會(huì)生成一個(gè)遠(yuǎn)程調(diào)用
Channel玩家id的容器
request客戶(hù)端request到server
responseserver返回客戶(hù)端response
notify客戶(hù)端發(fā)給服務(wù)器的通知,不需要服務(wù)器給予回復(fù)的request
push服務(wù)器主動(dòng)給客戶(hù)端推送的消息,不需要客戶(hù)端發(fā)起request
filter①before:前置處理(判斷玩家是否已經(jīng)登錄,打印統(tǒng)計(jì)日志等)②after:后置處理(釋放請(qǐng)求上下文,記錄請(qǐng)求總耗時(shí)等),不能出現(xiàn)修改響應(yīng)內(nèi)容的代碼,進(jìn)入after前,響應(yīng)就已經(jīng)發(fā)送給客戶(hù)端
handler位于before filter和after filter之間 實(shí)現(xiàn)具體的業(yè)務(wù)邏輯
error handler全局異常處理(可以統(tǒng)計(jì)錯(cuò)誤信息,組織異常響應(yīng)結(jié)果)
component具有自己生命周期(如start afterStart stop等)的組件,核心功能實(shí)現(xiàn)
admin client獨(dú)立運(yùn)行自己的進(jìn)程,它會(huì)發(fā)起到master的連接,然后通過(guò)對(duì)master發(fā)出請(qǐng)求或者命令,來(lái)管理整個(gè)服務(wù)器群
monitor運(yùn)行在各個(gè)應(yīng)用服務(wù)器中,它會(huì)向master注冊(cè)自己,向master上報(bào)其服務(wù)器的信息,當(dāng)服務(wù)器群有變化時(shí),接收master推送來(lái)的變化消息,更新其服務(wù)器上下文
master運(yùn)行在應(yīng)用服務(wù)器中,它會(huì)收集整個(gè)服務(wù)器群的信息,有變化時(shí)會(huì)將變化推送到各個(gè)monitor;同時(shí),master還接受admin client的請(qǐng)求,按照client發(fā)出的命令,執(zhí)行對(duì)應(yīng)的操作,如查詢(xún)整個(gè)服務(wù)器群的狀態(tài),增加一個(gè)服務(wù)器等
admin module特指服務(wù)器監(jiān)控管理模塊,實(shí)現(xiàn)監(jiān)控邏輯,有四種可選的回調(diào)函數(shù):①masterHandler(agent,msg,cb)②moniterHandler(agent,msg,cb)③clientHandler(agent,msg,cb)④start(cb)
plugin一個(gè)plugin由多個(gè)component及一些事件響應(yīng)處理器組成,以靈活擴(kuò)展pomelo

命令相關(guān)

命令參數(shù)明細(xì)說(shuō)明
pomelo -V--version查看pomelo版本
pomelo init [path]
創(chuàng)建新的項(xiàng)目
pomelo start -h--helpoutput usage information
pomelo start -e--env <env>the used environment
pomelo start -D--daemonenable the daemon start
pomelo start -d--directory, <directory>the code directory
pomelo start -t--type <server-type>start server type
pomelo start -i--id <server-id>start server id
pomelo list -h--helpoutput usage information
pomelo list -u--username <username>administration user name
pomelo list -p--password <password>administration password
pomelo list -h--host <master-host>master server host
pomelo list -P--port <master-port>master server port
pomelo add -h--helpoutput usage information
pomelo add -u--username <username>administration user name
pomelo add -p--password <password>administration password
pomelo add -h--host <master-host>master server host
pomelo add -P--port <master-port>master server por
pomelo stop -h--helpoutput usage information
pomelo stop -u--username <username>administration user name
pomelo stop -p--password <password>administration password
pomelo stop -h--host <master-host>master server host
pomelo stop -P--port <master-port>master server port
pomelo kill -h--helpoutput usage information
pomelo kill -u--username <username>administration user name
pomelo kill -p--password <password>administration password
pomelo kill -h--host <master-host>master server host
pomelo kill -P--port <master-port>master server port
pomelo kill -f--forceusing this option would kill all the node processes
pomelo restart -h--helpoutput usage information
pomelo restart -u--username <username>administration user name
pomelo restart -p--password <password>administration password
pomelo restart -h--host <master-host>master server host
pomelo restart -P--port <master-port>master server port
pomelo restart -t--type <server-type>start server type
pomelo restart -i--id <server-id>start server id
pomelo master -h--helpoutput usage information
pomelo master -d--directory <directory>the code directory

感謝各位的閱讀,以上就是“pomelo常見(jiàn)的術(shù)語(yǔ)及命令有哪些”的內(nèi)容了,經(jīng)過(guò)本文的學(xué)習(xí)后,相信大家對(duì)pomelo常見(jiàn)的術(shù)語(yǔ)及命令有哪些這一問(wèn)題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!

網(wǎng)站名稱(chēng):pomelo常見(jiàn)的術(shù)語(yǔ)及命令有哪些
當(dāng)前鏈接:http://muchs.cn/article2/ghscoc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站建設(shè)外貿(mào)建站、定制開(kāi)發(fā)品牌網(wǎng)站建設(shè)、小程序開(kāi)發(fā)做網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

網(wǎng)站優(yōu)化排名