1 / 24

个人介绍

个人介绍. 真名:王金生 花名:文壁 微博: @ 文壁 微信: wenbitm 2 005 年毕业, 2010 年加入支付宝,专注于移动应用开发。 目前主要负责支付宝客户端框架的技术规划和相关的开发工作。. 支付 宝 iOS 客户端框架概要. 支付宝 文壁. 大纲. 1. 挑战和目标. 2. 基于框架的开发模式. 3. RPC. 4. 稳定性. 1. 挑战和目标. 支付宝钱包产品架构. 现阶段面临的挑战. 技术目标. 2. 基于框架的开发模式. Contex & App & Service. 接口层. Context. 实现层.

Download Presentation

个人介绍

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 个人介绍 • 真名:王金生 • 花名:文壁 • 微博:@文壁 • 微信:wenbitm • 2005年毕业,2010年加入支付宝,专注于移动应用开发。 • 目前主要负责支付宝客户端框架的技术规划和相关的开发工作。

  2. 支付宝iOS客户端框架概要 支付宝 文壁

  3. 大纲 1 挑战和目标 2 基于框架的开发模式 3 RPC 4 稳定性

  4. 1 挑战和目标

  5. 支付宝钱包产品架构

  6. 现阶段面临的挑战

  7. 技术目标

  8. 2 基于框架的开发模式

  9. Contex & App & Service • 接口层 • Context • 实现层 • AppManager • ServiceManager

  10. Webapp(HTML5) • Native • WEB • HTML • CSS • JavaScript • 快捷支付 • 语音识别 • 通讯录 • 扫码 JS Bridge

  11. 基于框架的开发模式 组内开发/测试 SVN A-trunk 客户端团队Ta (业务A) 源代码 获取 框架/SDK B (编译和开发) B..framework(连调) 提交A.framework 基础技术组 打包平台 MVN 库 Frameworks 钱包 框架/SDK frameworks Frameworks+配置 A(编译开发) A.framework 动态推包平台 源代码 获取 框架/SDK 客户端团队Tb (业务B) SVN trunk

  12. App的开发步骤

  13. 3 RPC

  14. RPC – 自动代码生成 Eclipse插件

  15. RPC – 示例代码 Account *account = [self currentAccount]; AccountService *service = [context findServiceById:@”account”]; [service queryBalance:account]; • [AsyncCallercallBlock: ^{ • Account *account = [self currentAccount]; • AccountService *service = [context findServiceById:@”account”]; • [service queryBalance:account]; • } • completion: ^{ • [self updateUI]; • }

  16. PRC 已超时? 未登录? 登录 收到请求 前置拦截 执行请求 后置拦截 返回结果

  17. RPC– 优化 • Keep-Alive • Gzip压缩 • 压缩率:50%+ • ETag缓存 • ETag/ If-None-Match/ 304 • 命中率:31.02% / 节省流量:6096.47MB • 批量请求 • 发送时多请求合并 • 接收时分次多次返回

  18. 4 稳定性

  19. 稳定性 – 运行状态监控 • Monitor • PV • 闪退率 • 请求追踪 Storage Servers

  20. 稳定性 – 异常恢复

  21. 自动埋点 控制台 线上环境:发送点击事件 [UIApplicationsendEvent:] 测试环境: 发送界面截图 界面截图 界面还原

  22. 自动埋点

  23. 总体架构

  24. Thanks

More Related