已阅读5页,还剩72页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Pomelo 基于Node js的游戏服务器框架 网易谢骋超 圈圈套圈圈 xiecc Category ThestateofpomeloOverviewFrameworkPracticeEvolutionPerformance Thestateofpomelo Fast scalable distributedgameserverframeworkfornode jsRealtimeapplicationserverframework OpensourcedV0 2 02012 11 20V0 3 02013 3 8 Pomelo定位 RealtimeapplicationserverframeworkGameserverframeworkMobilegameWebgameSocialgameLargeMMORPG Commentsof 感谢网易为中国的node js社区做出最佳贡献这玩意意义重大我觉得 所有程序员都可以细读我们开源的游戏服务端框架pomelo的 pomelo架构概览 服务器抽象 路由 请求类别 两类channel 应用与模块管理 filter中的AOP思维 惯例优先等 处处可见精巧的工程设计 Node js要火了 Pomelo社区 Pomelo社区 Pomelo社区 Pomelo社区 Stateofpomelo PomeloisnotasingleprojectAlmost30reposintotal Stateofpomelo clients StateofPomelo code Codereadingincommunity Stateofpomelo Realtimeapplication网易消息推送平台 已上线GamesN款移动网络游戏正在开发中 Category ThestateofpomeloOverviewFrameworkPracticeEvolutionPerformance Overview node jsandgameserver GameServerFastScalableNetworkReal time Node jsisaplatformbuiltonChrome sJavaScriptruntimeforeasilybuildingfast scalablenetworkapplications Node jsusesanevent driven non blockingI Omodelthatmakesitlightweightandefficient perfectfordata intensivereal timeapplicationsthatrunacrossdistributeddevices Overview node jsadvantages Scalability eventdrivenI OGame highdensitynetworkcommunicationLanguage javascriptBrowser HTML5 unity3d cocos2d x otherplatform samelanguageinclientandserverLightweight developmentefficiency reallyquickiterationMulti Process SinglethreadNolockSimple Overview node jsdisadvantage SomeCPUsensitiveactionsPathfindingAISolutionOptimizationDivideprocessAllcanbesolvedinpractice Node jsgame MozillaBrowserQuest Node jsgame googlegritsgame Overview ourdemo Overview architectureofdemo Overview gameVSweb LongconnectionVSShortconnectionPartition areabasedVSLoadbalancedclusterStatefulVSStatelessRequest BroadcastVSRequest response Problem Distributeddevelopmentishard isit Howmanycodesforthiscomplicatedarchitecture Alotofserversandservertypes howtomanage Theserversiderpciscomplicated howtosimplify AlotofprocessesHowmanyserversdoweneed Howtospottheproblemonmultipleservers Isittooheavy notefficient Overview howtosolvecomplexity Too complicated solution framework Withpomelo PomelomakesdistributeddevelopmentreallyeasyandpleasantAchievethisarchitecture almostzeroCodeServertypesandserversextention simpleServersrpc simple zeroconfig nostubAlotofprocessesOnemachine smallamountofresourcesSingleconsole quickspotproblem nodifferenttosingleprocessLightweight extremelyquicktostartup Category ThestateofpomeloOverviewFrameworkPracticeEvolutionPerformance Framework Framework designgoal Abstractofservers processes AutoextendservertypesAutoextendserversAbstractofrequest responseandbroadcastZeroconfigrequestSimplebroadcastapiOthermechanisms filter sessionServerscommunication rpcframework Framework serverabstraction Whythenameofnode js Whywebdonotneedserverabstraction WebisstatelessLoadbalancer nginx apacheClusterframeworksWhyserverabstractioninpomeloframework GameisstatefulMulti processescooperateforonetask Framework serverabstraction Framework serverabstraction Frontend connector ClientconnectionMaintainsessioninformationDispatchrequesttobackendPushmessagetoclient BackendHandlerequestfromfrontendPushmessagestofrontend throughchannelorresponseRpcservice Framework serverabstraction Ducktype Serverabstraction Framework serverabstraction Framework requestabstraction ZeroconfigClient likeajaxServer likewebmvcframework Framework rpcframework Framework rpcframework Whyrpcissoeasyinpomelo ThriftWritinga thriftfileGenerateThriftfiletosourcecodethrift genCopythesourcetoapplicationPomelo startup alldoneClientandserverinoneprojectServersfolderconventionAutogenerateproxyandremoteonstartup Framework channel broadcast PushmessagestoagroupofuserschannelService pushMessageByUids msg uids callback varchannel channel getLocalChannelSync area1 channel pushMessage msg Framework channel broadcast EasyAPIMostfrequentactionPotentiallyperformanceproblem Category ThestateofpomeloOverviewFrameworkPracticeEvolutionPerformance Practice gamedemo Developtime firstversion 2012 5 14 2012 6 30ClientHtml5 basedoncolorboxframeworkAlmost6 000linescodeServerNode js basedonpomeloframeworkAlmost6 000linescode Practice simplestplayermove 1 Moverequest 3 MoveHandler 2 Forward 4 Backward 5 Broadcast 6 Playmoveanimation Practice ClientMoveRequest findpath moveanimationpomelo request route area playeHandler move path path function result Practice areaserverhandler handler move function req session next verifypath handlemovechannelService pushMessagesByUids route onMove next null code OK Practice clientplaymove pomelo on onMove function data playmoveanimation Practice charactermove CharacterMove isn tthateasy Inreality it shard Practice handlemove DifferentsituationsPlayermove mobmoveAIdrivenorplayerdrivenSmootheffectClientpredictionLatencyCompensateHowtonotifyAOI areaofinterest Category ThestateofpomeloOverviewFrameworkPracticeEvolutionPerformance Evolution FromgameservertorealtimeapplicationframeworkWeoriginallydesignedpomeloforgameserver itendsuptobearealtimeapplicationserverframeworkThecoreofpomelohavenothingrelatedtogameserverItturnouttobeabetterapplicationserverframework Whyispomelobetter Whypomeloisabetterrealtimeapplicationframework MeteorMeteorisanultra simpleenvironmentforbuildingmodernwebsites Whatoncetookweeks evenwiththebesttools nowtakeshourswithMeteor SocketstreamDerbyWebisnottheonlyclientside theriseofthemobileIsfastdevelopmentthemostimportantfeature orscalability Whyispomelobetter AserversupportsmultipleclientsWeb mobile PCclients seamlesslyconnectedAdaptiblefordifferentprotocol socket ioisperfectforbrowser butnotformobileScalabilityDistributedarchitectureTakefulladvantageofCPU Pomeloconnector Connector SIOConnector HybridConnector PomelocomponentLoader MQTTConnector Socket ioclient Socket websocketclient Mobileclient 消息推送平台innetease 网易消息推送平台 BasedonpomeloandrabbitmqQOS1保证 保证消息的到达率 支持离线消息支持android与iOS 采用MQTT协议 iOS推送通道可选择长连接或APNS支持Web端 采用socket io协议支持其它PC客户端 采用socket协议 Evolution WeusedtoassumeHTML5 flashasmainstream itturnedouttobemobile移动端游戏开发者占绝大多数跨平台 客户端 cocox2d xunity3diOSandroid HTML5Flash数据包的大小 jsonistoowasteful 需要压缩数据 Messageencode decode 数据压缩 pomeloprotobuf Originalprotobuf 数据压缩 pomeloprotobuf 数据压缩 definition Pomeloprotobuf Category ThestateofpomeloOverviewFrameworkPracticeEvolutionPerformance Performance DifferentapplicationperformancecriteriaGame especiallyMMO Highnetworkdensity highfrequenceofbroadcastStateful arealimitation cannotscalewell
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026顶峰滑雪公司招聘2人备考题库附答案详解(综合卷)
- 2026云南大学附属医院面向社会招聘非事业编制工作人员51人备考题库及答案详解(夺冠)
- 2026北京一零一中教育集团矿大分校招聘备考题库附答案详解
- 2026四川德阳绵竹市第三人民医院招聘5人备考题库附答案详解(达标题)
- 2026郴州自贸建设有限公司湖北十堰户用分布式光伏项目部劳务用工招聘6人备考题库附答案详解
- 2026湖南邵阳武冈市事业单位及市属国有企业人才引进36人备考题库含答案详解(完整版)
- 关爱他人教学设计
- 践行文化使命凝聚奋进力量奋力书写新时代文博事业高质量发展新篇章
- 珠宝包装与配送管理手册
- 小学班主任班级管理与日常工作手册
- 医疗设备试用的协议书
- 认知行为疗法进阶
- DB11/T 147-2015-检查井盖结构、安全技术规范
- 河道的整治方案
- 广东省初级中学教育装备标准
- 半小时漫画股票实战法
- 中国的侍酒师
- 水利工程经济第六章-水利工程效益分析课件
- 2023北京市大兴区初一(下)期中语文试题及答案
- 刺客列传荆轲原文翻译
- 电子装联工艺技术课件
评论
0/150
提交评论