粉笔网的体系架构

粉笔网的体系架构

ID:15360301

大小:15.95 MB

页数:48页

时间:2018-08-02

粉笔网的体系架构_第1页
粉笔网的体系架构_第2页
粉笔网的体系架构_第3页
粉笔网的体系架构_第4页
粉笔网的体系架构_第5页
资源描述:

《粉笔网的体系架构》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、粉笔网架构支持多终端的服务器实现杨元祖@粉笔网主要技术语言:Java、Spring开发速度、熟练程度、性能存储:MySQL、Redis消息推送:JettyContinuationRESTful粉笔网体系结构WebAndroidiPhoneWebserverBusinessLogicTimelineUser...StorageMemcachedRedisMySQL粉笔网体系结构WebAndroidiPhoneWebserverPushServerBusinessLogicTimelineUser...Stora

2、geMemcachedRedisMySQL粉笔网体系结构WebAndroidiPhoneWebserverPushServerBusinessLogicTimelineUser...BlackholeStorageMemcachedRedisMySQLWebServer接口定义——支持多个终端方案一:各个终端共用一个接口WebAndroid/api/messages/{userId}iPhone方案二:每个终端有各自的接口Web/api/messages/{userId}Android/android/mes

3、sages/{userId}iPhone/iphone/messages/{userId}ClientURLControllerAndroid/android/messages/{userId}getMessages4AndroidWeb/api/messages/{userId}getMessagesiPhone/iphone/messages/{userId}getMessages4IphoneClientURLControllerAndroid/android/messages/{userId}Web/

4、api/messages/{userId}getMessages4AndroidgetMessagesgetMessages4IphoneiPhone/iphone/messages/{userId}ClientURLControllerAndroid/android/messages/{userId}Web/api/messages/{userId}getMessages4AndroidgetMessagesiPhone/iphone/messages/{userId}getMessages4IphoneT

5、imelineA’susertimelineB’susertimelineC’susertimelineD关注了A、B、CTimelineA’susertimelineB’susertimelineD’shometimelineC’susertimelineD关注了A、B、C一个SQL语句就能搞定?SELECTid,timeFROMtimeline_tWHEREuserIdin(?,?,?,?)ANDtime>?ANDtime<=?ORDERBYtimeDESClimit?Timeline前传一D、E、F关注

6、AA’susertimelineD’shometimelineE’shometimelineF’shometimelineTimeline前传一D、E、F关注AA’susertimelineD’shometimelineE’shometimelineF’shometimelineTimeline前传一D、E、F关注AA’susertimelineD’shometimelineE’shometimelineF’shometimeline读性能优秀——空间换时间写时异步分发数据冗余、操作时延关注、取消关注读性能优

7、秀——空间换时间写时异步分发数据冗余、操作时延关注、取消关注读性能优秀——空间换时间写时异步分发数据冗余、操作时延关注、取消关注Timeline前传二前提——关注上限缓存所有用户的usertimeline获取所有关注的人的usertimeline,在应用层归并,实时生成hometimelineWebServerStorage(Cache)WebServerStorage(Cache)WebServerStorage(Cache)WebServerStorage(Cache)逻辑简单、灵活——关注、取消关注写性

8、能突出——没有分发、没有时延数据没有冗余网络I/O——获取所有关注用户的usertimeline逻辑简单、灵活——关注、取消关注写性能突出——没有分发、没有时延数据没有冗余网络I/O——获取所有关注用户的usertimeline如何减小网络I/O?WebServerStorage在存储层完成归并操作WebServerStorage在存储层完成归并操作WebServerStorage在存储层完成归并操

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。