从技术架构设计到代码实现_第1页
从技术架构设计到代码实现_第2页
从技术架构设计到代码实现_第3页
从技术架构设计到代码实现_第4页
从技术架构设计到代码实现_第5页
已阅读5页,还剩30页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、从技术架构设计到代码实现Everything as CodeAgenda架构设计(Architecture)微服务架构(MicroServices)领域驱动设计(Domain Driven Design)反应式设计(Reactive)代码生成之脚手架代码智能 + IDE架构设计Client-Server ArchitectureObject-Oriented ArchitectureDomain-driven ArchitectureOnion ArchitectureAspect-Oriented ArchitectureService-Oriented ArchitectureMicros

2、ervices ArchitectureLambda ArchitectureComponent-based ArchitectureEvent-driven Architecture/donnemartin/system-design-primer微服务是什么?有目的地将服务拆小并提供跨语言的通讯能力系统分类Megalith Platform:艾尔斯平台Humongous single codebase resulting in a single applicationMonolith Platform:巨石系统Large single codebase resulting in a sin

3、gle applicationMacro SOA Platform:宏服务系统Classical SOA applications, and platforms consisting of loosely-coupled large services (potentially a series of interconnected monoliths)系统分类Meso Application Platform:中观系统Meso or middle-sized services interconnected to form a single application or platform. Ess

4、entially a monolith and microservices hybridMicroServices Platform:微服务Cloud native loosely-coupled small services focused around DDD-inspired bounded contextsNanoServices Platform:纳米服务Extremely small single-purpose (primarily reactive) serviceMegalith Platform浑然天成上帝之手设计盲人摸象艾尔斯巨石 (AyersRock)软件:“天网”Mo

5、nolith Platform宏伟,壮观倾全国全公司之力不计成本NB的设计师流“芳”百世Macro SOA Platform“杰”作:堆积结构常人难以想象成本巨大架构师的目标Meso Platform内部依赖:卯榫结构不知不觉形成大应用大家都会朝这个方向“努力”系统结构:混合&脆弱经常维修&重构,成本非常高功能:纪念&形象MicroServices职责明确通讯:总线结构简单&成本低稳定&可扩展组合后功能强大NanoServices功能单一结构简单非常稳定: 99.9999%寿命长:100,000小时问题:我系统非常复杂, 不能有这种单一服务如何实现微服务架构?Domain Driven Des

6、ignfrom Problem Spaceto Solution SpaceDDD Crew: /ddd-crewDDD Code StructureStructureDDD SupportCode PackageDomain Event: CloudEventsSomething that happened in the past ID + Timestamp merged: TimestampUUIDpayloadImmutable Broadcast to listenersOthers:type, source, contextSpecification & ValidationWhe

7、re do I put validation?Anywhere? How to fix duplication/conflictVerbs: is, and, not, or etcSpecification assistant layerEvent schema: Apache Avro, JSON Schema etc会员系统一个大应用,多个Module,单个JVM部署AccountProfileTag Bool & KVPaymentProfileBasicProfileSnsProfileXxxProfile标准会员中心Grade Prime membersCredits 积分会员Do

8、mainAccountProfileTag Bool & KVPaymentProfile CreditCard & AlipayBasicProfileSnsProfileXxxProfileWechatProfileFacebookProfile通用稳定经常 变化通用 稳定安全要求技术一致EventEventSpring SecurityRedis: BitsetDDD as CodeDomain & SubdomainContext MapBoundedContextUser Story & Use CaseContextMapperContext MappingDDD & Reacti

9、veAsync vs SyncMessage Driven & Back PressureDuplex: pub/sub, RPC, Data CollectionHigh PerformanceAll-in-OneSync or Async?RSocket通讯模型Request/Response: rpcRequest/Stream: pub/subFire-and-Forget: logging, metrics等数据上报Bi-direction: mobile & IoT Server通讯双方都能进行角色互换: Client ServerRSocket Tech StackRSocket

10、 ProtocolRPC(Request/Response)Pub/Sub (Request/Stream)No Ack (Fire & Forget)Bi-Direction (Channel)HessianProtobufJSONCBOR/Avor/TCPWebSocketUDP/AeronRDMARSocket通讯补充之BrokerClient1RSocket Broker Cluster (Routing/Fil tering)SVC1Client2SVC2client-server client-client server-server service-clientTCPWebSoc

11、ket UDP/AeronToken Based创建连接创建连接Roaring BitmapScaleCube ClusterCloudEventsReactive生态Reactive & CodeDesign Pattern: ObservableOperators: http:/reactivex.io/documentation/operators.htmlPolyglot: RxJava, RxJS, RxPy Async Integration: Promise/Future(async/await), Coroutines Reactive OperatorsCloud Nativ

12、e & ReactiveXxx as a ServiceArchitecture & CodingArchitectural Refactoring for the Cloud (ARC)Reactive IntegrationEAI: Enterprise Application IntegrationGlossary: ESB, Data format/transformation/ integration, Messsage Driven, Adapter/Connector etcReactive Integration: Apache Camel, Spring Integration, AlpakkaConnect everything: Promise, Future, Pub/Sub, EventLoop, Actor, RE

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论