Upload
george-ang
View
496
Download
2
Embed Size (px)
Citation preview
大 堂腾 讯 讲
第五十八期
研 管理部发
大 堂主 :讲 页 http://km.oa.com/class与 互 :讲师 动 http://km.oa.com/group/class
拍拍 AppPlatform
中间件解决方案简介
电子商务部
鲁锋 (henrylu)
2009-02-14
大纲
系统原理
灵活部署
快捷开发
PaiPai后台服务的整体架构
App Server 内部协议流转四种模式
App Server 开发模式
映射到 AppPlatform 中间件架构
App Platform (AppContainer AutoGen)
AutoGen 框架代码生成工具 ( C++ h 数据源)
AutoGen 框架代码生成工具 ( Java IDL 数据源)
AppPlatform 中间件部署架构——传统两层架构
AppPlatform 部署架构——传统三层架构
AppPlatform部署架构——大 APP架构
推荐
传统 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;
}
优化后的 Statful 状态机的实现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]);
}
谢谢大家!
问题?