资源描述:
《电影频道业务和技术架构演示》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、电影频道业务和技术架构演示朱志国2015-1-22Outline平台架构点评业务结构点评技术架构应用分布式集群数据库集群电影频道模块和技术实现电影频道模块技术实现点评业务结构点评技术架构-宗旨按业务线拆分部署分离团队分离数据分离好处每次只部署部分服务器每个节点可根据不同需求伸缩每个应用之间不影响点评平台技术方案企业级应用:JAVAEE服务器端技术:Java,Spring,MyBatis,Struts2前端技术:HTML/CSS,jQuery,Freezer,BCBootstrap,Freemarker应用分布式协调和通信
2、:RPC:Pigeon2,Lion(ZooKeeper)MQ:SwallowConfig管理:Lion数据库:DAL(MySQL+MMM)数据:MySQL,SQLServer,Hive,MongoDB,Redis缓存:一级缓存:EhCache,二级缓存:Memcached(Java客户端:Spymemcached)持续性集成:Git,Jenkins,Maven监控:CAT备份:MogileFS部署平台:Tomcat,CentOS,F5,Docker,Tengine,Varnish服务分布式-宗旨RPC停止RPC滥用,垂直
3、业务内优先通过本地jar调用,跨业务才采用RPC调用正确的识别业务逻辑的归属,让各个模块最大化内聚,从性能,可用性和维护性上减少耦合自主研发的Pigeon(1/2)支持TCP,HTTP协议支持hessian,json,protobuf系列化协议配置和分布式协调平台Lion推算业务配置Service集群控制Service负载控制建立在Zookeeper之上:心跳检测分布式队列领导选举缓存篇使用DP缓存组件Maven:依赖library包括avatar-cache,ehcache-core,spymemcachedSprin
4、g配置:引入定义http://www.dianping.com/schema/avatarhttp://www.dianping.com/schema/avatar/avatar-1.0.xsd,添加配置接口:com.dianping.avatar.cache.CacheService实现原理自定义配置支持AvatarNamespacheHandler和CacheBeanDefinitionParser初始化CacheService注册:统计缓存拦截器缓存代理Bean缓存拦截器缓存切入点缓存
5、AdvisorJMS监听器自定义缓存容器CacheServiceContainer.CacheServiceContainerCacheClientEhcacheClientImplKvdbClientImplLocalCacheClientImpl(弃用)MemcachedClientImpleEhCacheFast,simple,smallfootprint,andminimaldependenciesScalableProvidesmemoryanddiskstoresforscalabilityintogigab
6、ytesScalabletohandredsofcachesTunedforhighconcurrentloadandlargemulti-CPUserversMultipleCacheManagersperVMScalabletohundredsofnodeswiththeTerracottaserverarrayFlexible:Supportsobjectorserializablecaching,providesLRU,LFU,andFIFOcacheeictionpoliciesStandardsBasedEx
7、tensible:Cachelisteners,peerdiscovery,replicators,extensions,loadersmaybepluggedinApplicationPersistenceListeners:CacheManagerlistenersandCacheeventlistenersJMXEnabled:CacheManager,Cache,CacheConfiguration,CacheStatisticsDistributedCaching,Ehcache1.2+supportshigh
8、performancedistributedcaching,3options:ClusteredcachingviaTerracottaReplicatedcachingviaRMI,Jgroups,orJMSCustom,acomprehensivepluginmechnismprovidessupportforc