拍拍AppPlatform中间件解决方案简介.pptVIP

  • 1
  • 0
  • 约1.56千字
  • 约 16页
  • 2019-03-06 发布于浙江
  • 举报
拍拍AppPlatform 中间件解决方案简介 大纲 系统原理 灵活部署 快捷开发 PaiPai后台服务的整体架构 App Server 内部协议流转四种模式 App Server开发模式 映射到 AppPlatform中间件架构 App Platform (AppContainer AutoGen) AutoGen 框架代码生成工具 (C++ h 数据源) AutoGen 框架代码生成工具 (Java IDL 数据源) AppPlatform中间件部署架构——传统两层架构 AppPlatform部署架构——传统三层架构 AppPlatform部署架构——大APP架构 传统Statful 状态机的实现 优化后的Statful 状态机的实现 谢谢大家! 问题? 第五十八期 推荐 Int OnExecute() { switch(m_cStat) { case S_START: OnWebRequest(WebRequest[out]); // Do Something… DoDB1Request(DB1Request[in]); m_cStat = S_CHECK_1; return 1; case S_CHECK_1: OnDB1Response(DB1Response[out]); // Do Something… DoDB2Request(DB2Request[in]); m_cStat = S_CHECK_2; return 1; case S_CHECK_2: OnDB2Response(DB2Response[out]); // Do something… DoWebResponse(WebResponse[in]); m_cStat = S_FINISH; return 0; } // … return 0; } Int OnExecute() { OnWebRequest(WebRequest[out]); // Do Something… CallDB1(DB1Request[in], DB1Response[out]); // Do Something… with DB1Response CallDB2(DB2Request[in], DB2Response[out]); // Do Something… with DB2Response DoWebResponse(WebResponse[in]); // … return 0; } 奥妙就在此: CallDB1(DB1Request[in], DB1Response[out]) { DoDB1Request(DB1Request[in]); Schedule();// Linux System Call swapcontext(…) OnDB1Response(DB1Response[out]); } 将底层重复代码封装成一个容器服务器(Container),并提供统一的接口和日志格式,物理上把应用层代码封装成动态链接库,有效地隔离了底层代码改动带来的影响。 Netio提供了独立的网络接入方案,部署在AppContainer的前端和后端,异步处理TCP或UDP数据,并将其传入AppContainer的前置/后置消息队列中,待AppContainer逐一处理。降低了AppContainer的复杂度和繁忙度。

文档评论(0)

1亿VIP精品文档

相关文档