微服务食谱小册

微服务食谱小册

微服务是一种小型自治服务,可以协同工作。

目录列表


定义

微服务架构,或简称微服务,是开发软件系统的独特方法,试图专注于构建具有良好定义的接口和操作的单功能模块。近年来,随着企业变得更加敏捷并朝着DevOps和持续测试迈进,这一趋势越来越受欢迎。微服务可以帮助创建可扩展,可测试的软件,可以每周而不是每年交付。

Alt Text

微服务架构(也称云应用程序架构指南)

  • Sam Newman:“微服务是一种小型,自主的服务,可以协同工作。”

  • Frye:微服务的想法是专注于构建能够做到一件事情的个人服务。

  • Retriever Communications首席技术官Nic Grange说:“微服务是一种设计软件系统的方法,这些软件系统由小型独立服务组成,每个服务都有特定用途。”

  • Flux7首席技术官Ali Hussain说:“微服务是解决大型或大型服务的一种方法 使用一组更小,更简单的服务协同工作的复杂业务问题; 微服务运行自己独特的流程,有助于实现总体业务目标。“

  • ShieldX Networks创始人兼首席执行官Ratinder Ahuja博士说:”微服务是一种应用程序开发方法,其中大型应用程序是作为一套模块化服务构建的。每个模块都支持一个特定的业务目标,并使用一个简单明确的界面与其他服务集进行通信。“

  • Dest Horning,Zesty.io的解决方案工程师:”微服务用于软件工厂的制造。而不是让一个人[或]机器建造一辆整车,每个区域都专门完成它的任务:这个锤子铆钉,这个涂漆。“和”微服务将一个大的物镜分解成它的部件,并且这些部件是 独立完成。“

  • Justin Bingham,Janeiro Digital的首席技术官:”微服务是一个应用程序或更广泛的生态系统的组件,可以独立运行 - 每个都负责一个特定的业务

  • Chef营销总监Michael Ducy表示:“它正在将应用程序的开发和发布分解为更小的工作。”

  • SolarWinds的负责人Kong Yang说:“微服务是开发软件应用程序的一种方法。由可独立部署的模块化服务组成。每个微服务都运行一个独特的流程,并通过一个明确定义的轻量级机制(如容器)进行通信,以实现业务目标。

  • “微服务允许组织减少依赖性,更快地开发和扩展.- Aviran Mordo

微服务定义:Lewis / Fowler:

  • 作为一套小型服务,每个服务都在自己的进程中运行,并与轻量级机制进行通信,通常是HTTP资源API
  • 服务围绕业务功能构建
  • 服务可独立部署和扩展
  • 对这些服务进行集中管理的最低限度
  • 服务可以用不同的编程语言编写(多语言开发)。
  • 服务应使用独立的数据存储。

“微服务之所以重要,仅仅是因为它们以简化系统复杂性的方式增加了独特的价值。通过将系统或应用程序拆分为许多较小的部分,您可以展示减少重复,增加内聚力和降低​​部件之间耦合的方法,从而使整个系统部件更易于理解,更具可扩展性,更易于更改。分布式系统的缺点是从系统角度来看总是更复杂。要管理的许多小型服务的开销是另一个需要考虑的因素。“ - 卢卡斯克劳斯,

微服务方法是将您的系统(“一堆代码”)分解为许多小型服务,每个服务通常都有自己的:

  • 明确与业务相关的责任
  • 运行过程
  • 数据库
  • 代码版本控制(例如git)存储库
  • API(其他服务/客户将如何联系微服务的协议)
  • UI

为什么是微服务

  • 微服务使我们的系统松散耦合,即如果我们需要更新,修复或更换微服务,我们不需要重建我们的整个应用程序,只需更换需要它的部分。
  • 构建每个微服务可以使用不同的语言和工具。微服务与定义良好的接口进行通信
  • 对于可伸缩性(微服务的副本)和可靠性(一个副本无法通过其他副本可以服务),通信应该是无状态的,微服务之间最常用的通信方法是HTTP和消息传递。每个微服务都应该拥有自己的数据存储区。
  • 小团队能够从事设计,Web开发,编码,数据库管理和操作。

什么时候使用微服务架构

考虑这种架构风格:

  • 需要高发布速度的大型应用。

  • 需要高度可扩展的复杂应用程序。

  • 具有丰富域或多个子域的应用程序。

  • 由小型开发团队组成的组织。

优点和缺点

好处

微服务设计的Sam Newman列举了微服务的主要优点如下:

技术异质性

通过由多个协作服务组成的系统,我们可以决定在每个服务中使用不同的技术。这使我们能够为每项工作选择合适的工具,而不必选择更标准化,一刀切的方法,这种方法通常最终成为最低标准。

弹性

弹性工程的一个关键概念是隔板。如果系统的一个组件发生故障,但该故障没有级联,则可以隔离问题,系统的其余部分可以继续工作。服务边界成为您明显的舱壁。在单一服务中,如果服务失败,一切都会停止工作。使用单片系统,我们可以在多台机器上运行以减少故障机率,但是通过微服务,我们可以构建处理服务完全故障并相应降低功能的系统。

缩放

通过大型的单片服务,我们必须将所有内容扩展到一起。我们整个系统的一小部分在性能方面受到限制,但如果这种行为被锁定在一个巨大的单片应用程序中,我们必须处理所有内容。通过较小的服务,我们可以扩展那些需要扩展的服务,允许我们在更小,功能更少的硬件上运行系统的其他部分。

易于部署

对百万行单片应用程序进行单行更改需要部署整个应用程序才能发布更改。这可能是一次影响很大,风险很高的部署。在实践中,由于这种影响,高风险部署会被限制发生。

通过微服务,我们可以对单个服务进行更改,并独立于系统的其余部分进行部署。这使我们能够更快地部署代码。如果确实出现问题,可以将其快速隔离到单个服务,从而轻松实现快速回滚。

组织协调

微服务使我们能够更好地将我们的架构与我们的组织保持一致,从而帮助我们最大限度地减少在任何一个代码库上工作的人数,从而达到团队规模和生产力的最佳点。我们还可以在团队之间转移服务的所有权,以试图让人们在一个服务上进行并置。

组合性

分布式系统和面向服务的体系结构的关键承诺之一是我们为重用功能开辟了机会。通过微服务,我们允许以不同方式为不同目的使用我们的功能。当我们考虑消费者如何使用我们的软件时,这一点尤为重要。

优化可替换性

如果你在一个中等规模或更大的组织工作,你很可能会意识到坐在角落里的一些大而讨厌的遗留系统。没有人想触摸的那个。对您的公司如何运行至关重要的那个,但恰好用一些奇怪的Fortran变体编写,并且仅在25年前达到使用寿命的硬件上运行。为什么没有被替换?你知道为什么:工作太大而且冒险。

由于我们的个性化服务规模较小,因此使用更好的实施方案替换它们,甚至完全删除它们的成本更容易管理。
 

缺点

团队沟通开销 -

微服务架构降低了团队管理的复杂性,但无法减少团队沟通的需要。他们需要确保一个服务中的更新不会破坏其他功能。我们也可以在整体架构应用程序中找到这个问题。

非统一技术栈 -

我们可以为不同的组件(多语言)选择不同的技术堆栈。它导致应用程序设计和架构不一致的问题。从长远来看,它可能会增加维护成本。

Dev Ops复杂性 -

我们需要一个成熟的Dev Ops团队来处理维护基于微服务的应用程序所涉及的复杂性。由于应用程序的几个移动部分,它变得复杂并且需要高水平的专业知识。增加资源使用 - 运行这些应用程序的初始投资很高,因为所有独立运行的组件都需要拥有更多内存和CPU的自己的运行时容器。

增加网络通信 -

独立运行的组件通过网络相互交互。这种系统需要可靠和快速的网络连接。编组和解编组 - 当一个组件需要来自另一个组件的数据时,发送方从其内部表示中对一些标准中的数据进行编组,而接收方在使用之前将数据解组为其自己的表示。与传统应用程序架构相比,这肯定需要更多处理。

网络安全 -

需要保护内部服务通信以避免任何内部通信安全漏洞。由于有几个移动部件,这些应用程序更容易出现安全漏洞。

测试 -

与整体应用相比,此类应用的测试肯定更难。

生产监控 -

无法使用正确的工具也是一个需要考虑的问题。

日志分析 -

需要日志分析工具进行日志分析,Splunk或ELK堆栈

Alt Text
                                                                                                                           (图片提供:pivotal)

微服务设计

架构原理

核心模式

部署模式

服务发现

Service Mesh(服务网格)

实现应用于微服务的七个设计指南的策略和模式(sei.cmu.edu)

标准化服务合同。策略包括:

服务松耦合。策略包括:

服务可重用性。策略包括:

服务自治。策略包括:

服务无状态。策略包括:

服务可发现性。策略包括:

服务可部署性。策略包括:

asciicast

微服务设计模式

白宫Web API的指南和示例,鼓励跨应用程序的一致性,可维护性和最佳实践。白宫API旨在平衡真正的RESTful API接口和积极的开发者体验(DX)。

该文件大量借鉴:

验证你的微服务 :

在确定应用程序中的微服务后,请根据以下条件验证您的设计:

  • 每项服务都有单一责任。
  • 服务之间没有回路通信(类似java里面的loop service,层A的服务调用层B,层B的服务反过来调用层A的服务)。如果将功能拆分为两个服务导致它们过于繁琐,则可能是这些功能属于同一服务的症状。
  • 每项服务都很小,可以由一个独立工作的小团队建立。
  • 没有相互依赖性需要在锁定步骤中部署两个或更多服务。始终可以在不重新部署任何其他服务的情况下部署服务。
  • 服务没有紧密耦合,可以独立发展。
  • 您的服务边界不会产生数据一致性或完整性问题。有时,通过将功能集成到单个微服务中来保持数据一致性非常重要。也就是说,考虑一下你是否真的需要强一致性。有解决分布式系统中最终一致性的策略,分解服务的好处往往超过管理最终一致性的挑战。

我们可以重用微服务吗?

重用仍然是微服务设计的原则。但是,重用范围已缩减为业务中的特定域。设计这种重用的努力在SOA的早期阶段包括在设计企业范围的规范模型方面的浪费,因为它过于雄心勃勃而没有结果。但是,必须注意的是,在其限制范围内的规范模型可能是有益的。与其促进的重用一致,其范围已经减少。通过“基于优点的重用”方法,新兴模型优于预定模型。团队可以就通信模型达成一致,以决定微服务如何在其设计环境之外进行调整以供使用。如果现有的微服务API不适合您的域或“业务组”,那么构建另一个微服务可能会更好。

-Alison Jarris

了解您未来的架构或未来架构

Alt Text

  • 单一目的 - 每项服务应专注于一个目的并做得好。
  • 松耦合 - 服务彼此知之甚少。对一项服务的更改不应要求更改其他服务。服务之间的通信应仅通过公共服务接口进行。
  • 高内聚性 - 每项服务将所有相关行为和数据封装在一起。如果我们需要构建新功能,则所有更改应仅本地化为一个服务。

扩展立方体

Scale Cube,由Martin L. Abbott和Michael T. Fisher定义。该模型解释了如何通过实施三维方法实现无限扩展。

“可伸缩性艺术”一书描述了三维可伸缩性模型:比例立方体。微服务架构是在比例立方体上应用Y轴缩放。

•	水平复制和克隆(X轴)
•	功能分解和分割 - 微服务(Y轴)
•	水平数据分区 - 碎片(Z轴)

Alt Text

Scale Cube(图片提供:microservices.io)

微服务-VS-SOA

Alt Text

微服务-VS-API

API是标准化的包装器,它创建了一个接口,微服务可以通过该接口进行打包和浮出水面。这使得API成为微服务架构(如安全性,治理和重用)关键问题的逻辑执行点。因为API能够容纳这些问题,所以它们被认为是微服务架构(mulesoft)的基础组件。微服务设计为在内部使用,而API则用于向外界公开功能。

微服务-VS-Miniservice

Miniservices被称为实用的微服务。您可以更快地开始使用它们,并选择对您的团队有意义的部分。

“[miniservice]就像一组微服务在一个小模式中聚集在一起。” — Ross Garrett

每个微服务必须处理自己的数据,miniservices可以共享数据。“ — Arnaud Lauret

不要将架构优雅性与商业价值混为一谈。“ — Ross Garrett

利用对我有意义并获得大部分功能优势的实践,“ says Ross Garrett.

微服务-VS-Nanoservices

Nanoservice是一种反模式,其服务太细粒度。nanoservice是一种服务,其开销(通信,维护等)超过其效用。

什么是界限上下文

DDD通过将大型模型划分为不同的有界上下文并明确其相互关系来处理大型模型。 Martin fowler

微服务应该有多大:它应该有一个明确定义的有界上下文,使我们能够在不必考虑或交换上下文的情况下工作。

如何识别界限上下文?

微服务成功案例

Alt Text


编排 vs 编舞

Service orchestration

所有参与服务之间的关系由单个端点描述

Service Choreography

服务编排是参与服务的全局描述,其通过消息交换,交互规则和两个或多个端点之间的协议来定义。编舞采用分散的方法进行服务组合。

来自stack的andrei

“我们通过使用控制业务逻辑的上帝服务(具有全局视角)或微服务基本上传递消息的编排方法来解决我们的微服务问题。在微服务架构中,编排比编舞更受欢迎。”

协调,微服务

  • Conductor是一个编排引擎(Netflix编排框架)
  • Zeebe是用于分布式微服务的新型开源编排引擎。它允许用户使用BPMN直观地定义编排流程。Zeebe具有水平可扩展性和容错能力,因此您可以在事件发生时可靠地处理所有事务。

如果您创建自己的业务流程,请记住:


理论

Alt Text

文章和论文


讲座

教程

图书

  • Building Microservices ?PDF - Building Microservices: Designing Fine-grained Systems. Sam Newman. Preview Edition.
  • Microservice Architecture: Aligning Principles, Practices, and Culture - Practical advice for the strategy and design of Microservices.
  • Microservices in Action - A practical book about building and deploying microservice-based applications.
  • Microservice Patterns - Teaches how to build applications with the microservice architecture and how to refactor a monolithic application to a microservices.
  • Microservices from Theory to Practice - Microservices from Theory to Practice: Creating Applications in IBM Bluemix Using the Microservices Approach. IBM Redbooks publication.
  • Migrating to Cloud Native Application Architectures - This O’Reilly report defines the unique characteristics of cloud native application architectures such as microservices and twelve-factor applications.
  • Testing Microservices with Mountebank - Provides a testing strategy using mountebank for service virtualization, promoting independent releases of Microservices
  • The Art of Scalability - The Art of Scalability: Scalable Web Architecture, Processes, and Organizations for the Modern Enterprise. Martin L. Abbott, Michael T. Fisher.
  • The New Stack eBook Series - A Comprehensive Overview of the Docker and Container Ecosystem.
    • Book 1: The Docker Container Ecosystem.
    • Book 2: Applications & Microservices with Docker & Containers.
    • Book 3: Automation & Orchestration with Docker & Containers.
    • Book 4: Network, Security & Storage with Docker & Containers.
    • Book 5: Monitoring & Management with Docker & Containers.
  • The Tao of Microservices - Teaches the path to understanding how to apply microservices architecture with your own real-world projects.

网站

微服务学习笔记

资源列表


微服务视频

Alt Text

Noabouturl
1What are the Advantages of Microservices? - Sam Newman- https://www.youtube.com/watch?v=KV3j3MZTXgk
2Design Microservice Architectures the Right Way- https://www.youtube.com/watch?v=j6ow-UemzBc
3Mastering Chaos - A Netflix Guide to Microservices- https://www.youtube.com/watch?v=CZ3wIuvmHeM
4API Academy Microservices Boot Camp @ CA World: Designing a Microservices Architecture-https://www.youtube.com/watch?v=iZNSPKxAd5w
5Data Strategies for Microservice Architectures- https://www.youtube.com/watch?v=n_V8hBRoshY
6Refactor your Java EE application using Microservices and Containers by Arun Gupta-https://www.youtube.com/watch?v=iJVW7v8O9BU
7Principles Of Microservices by Sam Newman s-https://www.youtube.com/watch?v=PFQnNFe27kU
8PGOTO 2016 • Appsec and Microservices • Sam Newman- https://www.youtube.com/watch?v=wlt7nCRWx_w
9Avoiding Microservice Megadisasters - Jimmy Bogard- https://www.youtube.com/watch?v=gfh-VCTwMw8
1010 Tips for failing badly at Microservices by David Schmitz- https://www.youtube.com/watch?v=X0tjziAQfNQ
11Lessons from the Birth of Microservices at Google- https://www.youtube.com/watch?v=Fz1PoXqxAZc
12Event Sourcing You are doing it wrong by David Schmitz- https://www.youtube.com/watch?v=GzrZworHpIk
13The hardest part of microservices is your data- https://www.youtube.com/watch?v=MrV0DqTqpFU
14Data Design and Modeling for Microservices- https://www.youtube.com/watch?v=KPtLbSEFe6c
15The Art of Discovering Bounded Contexts by Nick Tune- https://www.youtube.com/watch?v=ez9GWESKG4I
16The challenges of migrating 150+ microservices to Kubernetes -Sarah Wells (Financial Times)- https://www.youtube.com/watch?v=fgI3cOdv87I&feature=youtu.be
17Revitalizing Aging Architectures with Microservices- https://www.youtube.com/watch?v=SPGCdziXlHU

微服务模式

Noabouturl
1Developing Microservices with Aggregates Chris Richardson- https://www.infoq.com/presentations/aggregates-modular-microservices
2Top 5+ Microservices Architecture and Design Best Practices Ajitesh Kumar- https://dzone.com/articles/top-5-microservices-architecture-and-design-best-p
3Microservices: Patterns and Practices Panel C. Richardson, R. Shoup, L. Ryan, R. Tangirala, and R. Schloming participate in a discussion on microservices and the challenges faced at scale, the strategies to use and more.-https://www.infoq.com/presentations/microservices-patterns-practices-panel
4Microservices Patterns Red Hat Videos- https://www.youtube.com/watch?v=_YzzxrSIQGw
57 Microservice Patterns Explained (Ivar Grimstad)- https://www.youtube.com/watch?v=4IFVBfLBl1Y
6Three Microservice Patterns to Tear Down Your Monoliths- https://www.youtube.com/watch?v=84W9iY3CwdQ
714 Architectural patterns for microservice development- https://www.youtube.com/watch?v=yVZS1HZrlEw
8Reducing Microservices Architecture Complexity with Istio and Kubernetes- https://www.youtube.com/watch?v=k42jqkjtYKY
9Developing Microservices with Aggregates- https://www.infoq.com/presentations/aggregates-modular-microservices
10The Seven Deadly Sins of Microservices by Daniel Bryant- https://www.youtube.com/watch?v=Jw6TYEb1Opw
11Microservices Anti-Patterns- https://www.youtube.com/watch?v=I56HzTKvZKc

代码示例

Alt Text

Nourl
1- https://github.com/vaquarkhan/microservice-poc
2- https://github.com/vaquarkhan/robot-shop
3- https://github.com/vaquarkhan/awesome-microservices
4- https://github.com/vaquarkhan/microservice-docker-project
5- https://github.com/vaquarkhan/flowing-retail-microservice-kafka
6- https://github.com/vaquarkhan/spring-boot-microservices-series
7- https://github.com/vaquarkhan/A-curated-list-of-Microservice
8- https://github.com/vaquarkhan/sample-spring-microservices
9- https://github.com/vaquarkhan/microservice-kafka
10- https://github.com/vaquarkhan/oreilly-building-microservices-training
11- https://github.com/vaquarkhan/micromono
12- https://github.com/vaquarkhan/spring-cloud-microservice-example
13- https://github.com/vaquarkhan/jwt-microservices-JavaRoadStorm2016
14- https://github.com/vaquarkhan/micro
15- https://github.com/vaquarkhan/microservices-centralized-configuration
16- https://github.com/vaquarkhan/micro-company
17- https://github.com/vaquarkhan/PiggyMetrics-microservice-poc
18- https://github.com/vaquarkhan/spring-cloud-microservice
19- https://github.com/vaquarkhan/CQRS-microservice-sampler
20- https://github.com/vaquarkhan/Microservices-Deployment-Cookbook
21- https://github.com/vaquarkhan/storyteller-microservices
22- https://github.com/vaquarkhan/microservice-security
23- https://github.com/vaquarkhan/microservices-demo
24- https://github.com/vaquarkhan/spring-cloud-microservices-ELKStack
25- https://github.com/vaquarkhan/event-stream-processing-microservices
26- https://github.com/vaquarkhan/FraudDetection-Microservices-gemfire
27- https://github.com/vaquarkhan/microservice-sampler
28- https://github.com/vaquarkhan/microserviceApplication
29- https://github.com/vaquarkhan/Microservices-With-Spring-Student-Files
30- https://github.com/vaquarkhan/spring-boot-netflix-microservice-demo
31- https://github.com/vaquarkhan/spring-netflix-oss-microservices
32- https://github.com/vaquarkhan/rest-microservices
33- https://github.com/vaquarkhan/cloud-native-microservice-strangler-example
34- https://github.com/vaquarkhan/microservices-SpringCloud-netflix
35- https://github.com/vaquarkhan/knowledge-driven-microservice
36- https://github.com/vaquarkhan/event-driven-microservices-platform
37- https://github.com/vaquarkhan/devnexus-microservice-sample
38- https://github.com/vaquarkhan/microservices
39- https://github.com/vaquarkhan/Spring-Microservices
40- https://github.com/vaquarkhan/bootiful-microservices
41- https://github.com/vaquarkhan/vk-microservices-with-spring-cloud
42- https://github.com/vaquarkhan/cf-SpringBootTrader-microservice
43- https://github.com/vaquarkhan/Refactor-monolith-to-microservices
44- https://github.com/vaquarkhan/microservices-dashboard
45- https://github.com/vaquarkhan/microservice-camel-in-action
46- https://github.com/vaquarkhan/cloud-native-app-microservice-labs
47- https://github.com/vaquarkhan/spring-boot-8-microservices
48- https://github.com/vaquarkhan/building-microservices
49- https://github.com/vaquarkhan/spring-doge-microservice
50- https://github.com/vaquarkhan/microservice-service-registration-and-discovery
51- https://github.com/ewolff/microservice
52- https://github.com/semplify/Reactive-Microservice-Training
53- https://gitlab.com/training-microservices-2018-06
54- https://github.com/vaquarkhan/train-ticket
55- https://github.com/cer/event-sourcing-examples
56- https://github.com/finn-no/Docker-and-Microservices
57- https://github.com/nielskrijger/auth-server
58- https://developer.github.com/v3/repos/
59- https://github.com/vaquarkhan/ftgo-application
60- https://github.com/IBM/GameOn-Java-Microservices-on-Kubernetes

微服务反模式

Alt Text

Noabouturl
1Don’t Build a Distributed Monolith- https://www.microservices.com/talks/dont-build-a-distributed-monolith/
2In this talk from the API360 Microservices Summit in New York, June 2016, Vijay Alagarasan of Asurion explores lessons learned and anti-patterns to avoid when implementing microservices.- https://www.apiacademy.co/resources/videos/api360-microservices-summit-microservices-anti-patterns
3Microservices Anti-Patterns- https://vimeo.com/198927025
4Microservices Anti-Patterns- https://vimeo.com/118020043
5API360 Microservices Summit – Microservices Antipatterns – Vijay Alagarasan, Asurion- https://www.youtube.com/watch?v=uTGIrzzmcv8
6Stefan Tilkov - Microservices Patterns and Anti-patterns- https://www.youtube.com/watch?v=VaYmRe104HU
710 Tips for failing badly at Microservices by David Schmitz- https://www.youtube.com/watch?v=X0tjziAQfNQ
810 Tips for failing badly at Microservices by David Schmitz-https://www.oreilly.com/library/view/microservices-antipatterns-and/9781491963937/video255789.html

文章 链接

Noabouturl
1Twitter- https://developer.twitter.com/en/docs
2Facebook- https://developer.twitter.com/en/docs
3LinkedIn- https://www.linkedin.com/developers#
4Google- https://developers.google.com/+/web/api/rest/latest/activities/list
8Microservices in Practice - Key Architectural Concepts of an MSA- https://wso2.com/whitepapers/microservices-in-practice-key-architectural-concepts-of-an-msa/
9Guidelines for Designing Microservices- https://medium.com/@WSO2/guidelines-for-designing-microservices-71ee1997776c
10Microservices Resource Guide- https://www.martinfowler.com/microservices/
105 guiding principles you should know before you design a microservice- https://opensource.com/article/18/4/guide-design-microservices
11Pattern: Microservice Architecture- https://microservices.io/patterns/microservices.html
12Scaling Uber from 1 to 100s of Services- https://www.microservices.com/talks/scaling-uber-from-1-to-100s-of-services/
13tagged by: domain driven design- https://martinfowler.com/tags/domain%20driven%20design.html
14DDD - The Bounded Context Explained- http://blog.sapiensworks.com/post/2012/04/17/DDD-The-Bounded-Context-Explained.aspx
15MicroservicePrerequisites- https://martinfowler.com/bliki/MicroservicePrerequisites.html
16DevOpsCulture- https://martinfowler.com/bliki/DevOpsCulture.html
17What are Cloud-Native Applications?- https://pivotal.io/cloud-native
18JSONP- https://stackoverflow.com/questions/2067472/what-is-jsonp-all-about
19Microservices architecture style- https://docs.microsoft.com/en-us/azure/architecture/guide/architecture-styles/microservices
20Microservices architecture- https://samnewman.io/talks/principles-of-microservices/
21Designing microservices: Identifying microservice boundaries- https://docs.microsoft.com/en-us/azure/architecture/microservices/microservice-boundaries
22DDD Strategic Patterns: How to Define Bounded Contexts- https://dzone.com/articles/ddd-strategic-patterns-how-to-define-bounded-conte
23Microservices- https://martinfowler.com/articles/microservices.html
24Daniel Jacobson on Ephemeral APIs and Continuous Innovation at Netflix- https://www.infoq.com/news/2015/11/daniel-jacobson-ephemeral-apis
25Versioning- https://cloud.google.com/apis/design/versioning
26Semantic Versioning 2.0.0-https://semver.org/
27RESTful API Design. Best Practices in a Nutshell.- https://blog.philipphauer.de/restful-api-design-best-practices/
28Rest API Tutorial- https://restfulapi.net/resource-naming/
29REST API Design - Resource Modeling-https://www.thoughtworks.com/insights/blog/rest-api-design-resource-modeling
30Improve time to market with microservices-https://www.ibm.com/cloud/garage/architectures/microservices?cm_sp=Blog-_-blogcta-_-ArchCenter
31Digital Applications using a Microservice Architecture-https://github.com/ibm-cloud-architecture/refarch-cloudnative

微服务之罪

Noabouturl
1Seven Microservices Anti-patterns- https://www.infoq.com/articles/seven-uservices-antipatterns
2Microservices Anti-patterns: It’s All About the People- https://opencredo.com/blogs/microservices-anti-patterns-its-all-about-the-people/
3The 7 Deadly Sins of Microservices- https://opencredo.com/blogs/7-deadly-sins-of-microservices/
4Microservices? Please, Don't- https://dzone.com/articles/microservices-please-dont
5How Anti-Patterns Can Stifle Microservices Adoption in the Enterprise- https://blog.appdynamics.com/engineering/how-to-avoid-antipatterns-with-microservices/

微服务失败的案例

针对与微服务基础设施相关的公共失败的故事汇编列表。

TBD


API-的设计指南

  1. 在考虑消费者的情况下构建API  - 作为产品本身。

    • 不适用于特定的UI。
    • 拥抱每个端点的灵活性/可调性(参见#5,6和7)。
    • 吃你自己的狗食,即使你必须模拟一个示例UI。
  2. 使用Collection Metaphor。

    • 每个资源有两个URL(端点):
      • 资源集合(例如/订单)
      • 集合中的单个资源(例如/ orders / {orderId})。
    • 使用复数形式('order'而不是'order')。
    • 具有ID作为URL节点的备用资源名称(例如/ orders / {orderId} / items / {itemId})
    • 保持网址尽可能短。优选地,每个URL不超过三个节点。
  3. 使用名词作为资源名称(例如,不要在URL中使用动词)。

  4. 使资源表示有意义。

    • “没有无意义的ID!“响应中没有嵌入无意义的ID。使用链接和引用对象。
    • 设计资源表示。不要简单地展示数据库表内容。
    • 合并表示。不要将关系表公开为两个ID。
  5. 支持对集合进行过滤,排序和分页。

  6. 支持链接扩展关系。允许客户端通过包含其他表示而不是链接或扩展链接来扩展响应中包含的数据。

  7. 支持对资源的实地剪裁。允许客户端减少响应中返回的字段数。

  8. 使用HTTP方法名称来表示某些内容:

    • POST  - 创建和其他非幂等操作。
    • PUT  - 更新。
    • GET  - 获取资源或集合。
    • DELETE - 删除资源或集合。
  9. 使用有意义的HTTP状态代码。

    • 200 - 成功。
    • 201 -创建。成功创建新资源后返回。包含“位置”标题,其中包含指向新创建资源的链接。
    • 400 - 误的请求。数据问题,例如无效的JSON等。
    • 404 -未找到。在GET上找不到资源。
    • 409 - 冲突。将发生重复数据或无效数据状态。
  10. 将ISO 8601时间点格式用于表示中的日期。

  11. 通过利用链接策略来考虑连通性。一些流行的例子是:

  12. 使用 OAuth2 保护您的API。

    • 使用承载令牌进行身份验证。
    • TTPS / TLS / SSL才能访问您的API。OAuth2持有者令牌需要它。通过HTTP进行的非加密通信允许简单的窃听和模拟。
  13. 使用Content-Type协商来描述传入的请求有效负载。

    例如,假设您正在评级,包括竖起大拇指缩小和五星评级。您有一条路线可以创建评级: POST /ratings

    区分传入数据和服务,以便确定它是哪种评级类型:竖起大拇指还是五星级?

    为每种评级类型创建一条路线: POST /ratings/five_star and POST /ratings/thumbs_up

    但是,通过使用Content-Type协商,我们可以对两种类型使用相同的POST /评级路由。通过将请求上的Content-Type标头设置为Content-Type:application / vnd.company.rating.thumbsup或Content-Type:application / vnd.company.rating.fivestar,服务器可以确定如何处理传入的评级数据。

  14. 版本化的演变。但是,如果是版本控制,请使用Accept标头而不是URL中的版本控制。

    • 通过URL进行版本控制表示“平台”版本,并且必须同时对整个平台进行版本控制以启用链接策略。
    • 通过Accept标头进行版本控制是对资源进行版本控制。
    • 添加JSON响应不需要版本控制。但是,添加到“必需”的JSON请求主体很麻烦 - 可能需要进行版本控制。
    • 超媒体链接和版本控制无论如何都很麻烦 - 最小化它。
    • 请注意,URL中的版本虽然不鼓励,但可以用作“平台”版本。它应该显示为路径中的第一个节点,而不是不同版本的单个端点(例如api.example.com/v1 / ...)。
  15. 考虑缓存能力。至少应使用以下响应标头:

    • ETag  - 表示版本的任意字符串。确保在哈希值中包含媒体类型,因为这会产生不同的表示形式。(例如:ETag:“686897696a7c876b7e”)
    • 日期 - 返回响应的日期和时间(RFC1123格式)。(例如:日期:太阳报,1994年11月6日08:49:37 GMT)
    • Cache-Control  - 可以缓存响应的最大秒数(最大年龄)。但是,如果响应不支持缓存,则no-cache是​​值。(例如:Cache-Control:360或Cache-Control:no-cache)
    • Expires  - 如果给出max age,则包含响应到期时的时间戳(RFC1123格式),即Date(例如now)加上max age的值。如果响应不支持缓存,则此标头不存在。(例如:Expires:Sun,1994年11月6日08:49:37 GMT)
    • Pragma  - 当Cache-Control为'no-cache'时,此标头也设置为'no-cache'。否则,它不存在。(例如:Pragma:no-cache)
    • Last-Modified  - 最后修改资源本身的时间戳(采用RFC1123格式)。(例如:Last-Modified:Sun,1994年11月6日08:49:37 GMT)
  16. 确保您的GET,PUT和DELETE操作都是 幂等. 操作不应产生不良副作用。


REST的API-的设计指南

这些指南旨在支持真正的RESTful API。以下是一些例外情况:

RESTful URLs

RESTful URL的一般准则

  • URL标识资源。
  • 网址应包含名词,而不是动词。
  • 使用复数名词只是为了一致性(没有单数名词)。
  • Use HTTP verbs (GET, POST, PUT, DELETE) to operate on the collections and elements.
  • 您不应该比资源/标识符/资源更深入。
  • 将版本号放在URL的基础,例如 http://example.com/v1/path/to/resource.
  • URL v. header:
    • 如果它更改了您编写的逻辑以处理响应,请将其放入URL中。
    • 如果它没有更改每个响应的逻辑,例如OAuth信息,请将其放在header中。
  • 在逗号分隔列表中指定可选字段。
  • 格式应采用api / v2 / resource / {id} .json的形式

好的URL示例

错误的URL示例

HTTP动词

应使用HTTP谓词或方法,以符合HTTP / 1.1标准下的定义。对表示采取的行动将与正在处理的媒体类型及其当前状态有关。以下是HTTP谓词如何映射到特定上下文中的创建,读取,更新,删除操作的示例:

HTTP METHODPOSTGETPUTDELETE
CRUD OPCREATEREADUPDATEDELETE
/dogsCreate new dogsList dogsBulk updateDelete all dogs
/dogs/1234ErrorShow BoIf exists, update Bo; If not, errorDelete Bo

(Web应用程序设计示例,作者:Brian Mulloy,Apigee。)

响应

  • 键中没有值
  • 没有内部特定的名称(例如“节点”和“分类术语”)
  • 元数据应仅包含响应集的直接属性,而不包含响应集成员的属性

好的例子

键中没有值:

"tags": [
  {"id": "125", "name": "Environment"},
  {"id": "834", "name": "Water Quality"}
],

坏的例子

键中的值:

"tags": [
  {"125": "Environment"},
  {"834": "Water Quality"}
],

错误处理

错误响应应包括常见的HTTP状态代码,开发人员的消息,最终用户的消息(适当时),内部错误代码(对应于某些特定的内部确定的ID),开发人员可以找到更多信息的链接。例如:

{
  "status" : 400,
  "developerMessage" : "Verbose, plain language description of the problem. Provide developers
   suggestions about how to solve their problems here",
  "userMessage" : "This is a message that can be passed along to end-users, if needed.",
  "errorCode" : "444444",
  "moreInfo" : "http://www.example.gov/developer/path/to/help/for/444444,
   http://drupal.org/node/444444",
}

使用三个简单的常见响应代码,表示(1)成功,(2)由于客户端问题导致的故障,(3)由于服务器端问题导致的故障:

  • 200 - OK
  • 400 - 坏的请求
  • 500 - 服务器内部错误

版本化

  • 永远不要在没有版本号的情况下发布API。
  • 版本应为整数,而不是十进制数,前缀为“v”。例如:
    • Good: v1, v2, v3
    • Bad: v-1.1, v1.2, 1.3
  • 维护至少一个历史版本的API。

记录限制

  • 如果未指定限制,则返回具有默认限制的结果。
  • 要获取记录51到75,请执行以下操作:

有关记录限制和总可用计数的信息也应包含在响应中。例:

{
    "metadata": {
        "resultset": {
            "count": 227,
            "offset": 25,
            "limit": 25
        }
    },
    "results": []
}

请求和响应示例

API资源

GET /magazines

例子: http://example.gov/api/v1/magazines.json

响应体:

{
    "metadata": {
        "resultset": {
            "count": 123,
            "offset": 0,
            "limit": 10
        }
    },
    "results": [
        {
            "id": "1234",
            "type": "magazine",
            "title": "Public Water Systems",
            "tags": [
                {"id": "125", "name": "Environment"},
                {"id": "834", "name": "Water Quality"}
            ],
            "created": "1231621302"
        },
        {
            "id": 2351,
            "type": "magazine",
            "title": "Public Schools",
            "tags": [
                {"id": "125", "name": "Elementary"},
                {"id": "834", "name": "Charter Schools"}
            ],
            "created": "126251302"
        }
        {
            "id": 2351,
            "type": "magazine",
            "title": "Public Schools",
            "tags": [
                {"id": "125", "name": "Pre-school"},
            ],
            "created": "126251302"
        }
    ]
}

GET /magazines/[id]

例子: http://example.gov/api/v1/magazines/[id].json

响应体:

{
    "id": "1234",
    "type": "magazine",
    "title": "Public Water Systems",
    "tags": [
        {"id": "125", "name": "Environment"},
        {"id": "834", "name": "Water Quality"}
    ],
    "created": "1231621302"
}

POST /magazines/[id]/articles

例子: Create – POST http://example.gov/api/v1/magazines/[id]/articles

响应体:

[
    {
        "title": "Raising Revenue",
        "author_first_name": "Jane",
        "author_last_name": "Smith",
        "author_email": "jane.smith@example.gov",
        "year": "2012",
        "month": "August",
        "day": "18",
        "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam eget ante ut augue scelerisque ornare. Aliquam tempus rhoncus quam vel luctus. Sed scelerisque fermentum fringilla. Suspendisse tincidunt nisl a metus feugiat vitae vestibulum enim vulputate. Quisque vehicula dictum elit, vitae cursus libero auctor sed. Vestibulum fermentum elementum nunc. Proin aliquam erat in turpis vehicula sit amet tristique lorem blandit. Nam augue est, bibendum et ultrices non, interdum in est. Quisque gravida orci lobortis... "
    }
]

Spring-Cloud-for-Microservices

Alt Text

Kubernetes-for-Microservices

TBD

Spring-Cloud-vs-Kubernetes

Alt Text

Spring Cloud

Spring Cloud为开发人员提供了工具,可以快速构建分布式系统中的一些常见模式,例如配置管理,服务发现,断路器,路由等。它构建于用Java开发人员编写的基于Java的Netflix OSS库之上(现在还有ali oss)。

优点

  • Spring Platform自身提供的统一编程模型和Spring Boot的快速应用程序创建功能为开发人员提供了良好的微服务开发体验。例如,只需很少注释,您就可以创建一个配置服务器,只需要几个注释,就可以获得客户端库来配置您的服务。

  • 有大量的库可以解决大多数运行时问题。由于所有库都是用Java编写的,因此它提供了多种功能,更好的控制和微调选项。

  • 不同的Spring Cloud库彼此很好地集成在一起。例如,Feign客户端还将使用Hystrix进行电路中断,使用Ribbon进行负载均衡请求。一切都是注释驱动,使Java开发人员易于开发。

缺点

  • Spring Cloud的一个主要优点也是它的缺点 - 它仅限于Java。MSA的一个强大动机是能够在需要时交换技术堆栈,库甚至语言。Spring Cloud无法做到这一点。如果您想要使用Spring Cloud / Netflix OSS基础结构服务,例如配置管理,服务发现或负载平衡,那么解决方案并不优雅。Netflix Prana项目实现了边车模式,以通过HTTP公开基于Java的客户端库,使得以非JVM语言编写的应用程序可以存在于NetflixOSS生态系统中,但它并不是非常优雅。

  • Java开发人员需要关心和处理Java应用程序的责任。每个微服务都需要运行各种客户端以进行配置检索,服务发现和负载平衡。设置它们很容易,但这并不会隐藏构建时和运行时对环境的依赖性。例如,开发人员可以使用@EnableConfigServer创建一个配置服务器,但这只是一个快速的路径。每次开发人员想要运行单个微服务时,他们都需要启动并运行Config Server。对于受控环境,开发人员必须考虑使Config Server具有高可用性,并且由于它可以由Git或Svn支持,因此它们需要一个共享文件系统。同样,对于服务发现,开发人员需要首先启动Eureka服务器。对于受控环境,他们需要在每个AZ等上集中多个实例。感觉就像Java开发人员除了实现所有功能服务之外还必须构建和管理非平凡的微服务平台。

  • 单独的Spring Cloud在微服务之旅中的范围较短,开发人员还需要考虑自动部署,调度,资源管理,进程隔离,自我修复,构建管道等,以获得完整的微服务体验。对于这一点,我认为将Spring Cloud单独与Kubernetes进行比较是不公平的,Spring Cloud + Cloud Foundry(或Docker Swarm)和Kubernetes之间的比较更公平。但这也意味着,对于完整的端到端微服务体验,Spring Cloud必须补充一个像Kubernetes本身这样的应用平台。

Kubernetes

Kubernetes是一个开源系统,用于自动化容器化应用程序的部署,扩展和管理。它是多语言,提供配置,运行,扩展和管理分布式系统的原语。

强处

  • Kubernetes是一个多语言和语言无关的容器管理平台,能够运行云原生和传统的容器化应用程序。它提供的服务(例如配置管理,服务发现,负载平衡,度量收集和日志聚合)可以通过各种语言使用。这允许组织中的一个平台可供多个团队(包括使用Spring的Java开发人员)使用并用于多种目的:应用程序开发,测试环境,构建环境(运行源代码控制系统,构建服务器,工件存储库)等。

  • 与Spring Cloud相比,Kubernetes解决了更广泛的MSA问题。除了提供运行时服务之外,Kubernetes还允许您配置环境,设置资源约束,RBAC,管理应用程序生命周期,启用自动扩展和自我修复(Kubernetes行为几乎就像一个可以抵御混乱的自愈平台)。

  • Kubernetes技术基于Google 15年的研发和管理容器的经验。此外,有近1000个提交者,它是Github上最活跃的开源社区之一。

弱点

  • Kubernetes是多语言,因此,它的服务和原语是通用的,并没有针对不同的平台进行优化,例如Spring Cloud for JVM。例如,配置作为环境变量或已安装的文件系统传递给应用程序。它没有Spring Cloud Config提供的精美配置更新功能。

  • Kubernetes不是一个专注于开发人员的平台。它旨在供具有DevOps意识的IT人员使用。因此,Java开发人员需要学习一些新概念,并乐于学习解决问题的新方法。尽管使用MiniKube启动Kubernetes的开发人员实例非常容易,但是手动安装高可用性Kubernetes集群会产生大量的操作开销。

  • Kubernetes仍然是一个相对较新的平台(2年),它仍在积极开发和发展。因此,每个版本都添加了许多可能难以跟上的新功能。好消息是已经设想了这个,并且API是可扩展和向后兼容的。

From Bilgin Ibryam Article



Mock服务

建议每个资源在测试服务器上接受'mock'参数。传递此参数应返回模拟数据响应(绕过后端)。
在开发早期实现此功能可确保API表现出一致的行为,支持测试驱动的开发方法。
注意:如果mock参数包含在对生产环境的请求中,则应引发错误。
 


API接口文档

  • Aglio - API Blueprint renderer with theme support that outputs static HTML.
  • API Blueprint - Tools for your whole API lifecycle. Use it to discuss your API with others. Generate documentation automatically. Or a test suite. Or even some code.
  • Apidoc - Beautiful documentation for REST services.
  • RAML - RESTful API Modeling Language, a simple and succinct way of describing practically-RESTful APIs.
  • Slate - Beautiful static documentation for your API.
  • Spring REST Docs - Document RESTful services by combining hand-written documentation with auto-generated snippets produced with Spring MVC Test.
  • Swagger - A simple yet powerful representation of your RESTful API.

安全

  • Crtauth - A public key backed client/server authentication system.
  • Dex - Opinionated auth/directory service with pluggable connectors. OpenID Connect provider and third-party OAuth 2.0 delegation.
  • JWT - JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties.
  • Keycloak - Full-featured and extensible auth service. OpenID Connect provider and third-party OAuth 2.0 delegation.
  • Light OAuth2 - A fast, lightweight and cloud native OAuth 2.0 authorization microservices based on light-java.
  • Login With - Stateless login-with microservice for Google, FB, Github, and more.
  • OAuth - Provides specific authorization flows for web applications, desktop applications, mobile phones, and living room devices. Many implementations.
  • OpenID Connect - Libraries, products, and tools implementing current OpenID specifications and related specs.
  • OSIAM - Open source identity and access management implementing OAuth 2.0 and SCIMv2.
  • SCIM - System for Cross-domain Identity Management.
  • Vault - Secures, stores, and tightly controls access to tokens, passwords, certificates, API keys, and other secrets in modern computing.
  • RFC5246 - The Transport Layer Security (TLS) Protocol Version 1.2.
  • RFC6066 - TLS Extensions.
  • RFC6347 - Datagram Transport Layer Security Version 1.2.
  • RFC6749 - The OAuth 2.0 authorization framework.
  • RFC7515 - JSON Web Signature (JWS) represents content secured with digital signatures or Message Authentication Codes (MACs) using JSON-based data structures.
  • RFC7519 - JSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties.
  • RFC7642 - SCIM: Definitions, overview, concepts, and requirements.
  • RFC7643 - SCIM: Core Schema, provides a platform-neutral schema and extension model for representing users and groups.
  • RFC7644 - SCIM: Protocol, an application-level, REST protocol for provisioning and managing identity data on the web.
  • OIDCONN - OpenID Connect 1.0 is a simple identity layer on top of the OAuth 2.0 protocol. It allows clients to verify the identity of the end-user based on the authentication performed by an Authorization Server, as well as to obtain basic profile information about the end-user in an interoperable and REST-like manner.

序列化

  • Avro - Apache data serialization system providing rich data structures in a compact, fast, binary data format.
  • BooPickle - Binary serialization library for efficient network communication. For Scala and Scala.js
  • Cap’n Proto - Insanely fast data interchange format and capability-based RPC system.
  • CBOR - Implementations of the CBOR standard (RFC 7049) in many languages.
  • Cereal - C++11 library for serialization.
  • Cheshire - Clojure JSON and JSON SMILE encoding/decoding.
  • Etch - Cross-platform, language and transport-independent framework for building and consuming network services.
  • Fastjson - Fast JSON Processor.
  • Ffjson - Faster JSON serialization for Go.
  • FST - Fast java serialization drop in-replacemen.
  • Jackson - A multi-purpose Java library for processing JSON data format.
  • Jackson Afterburner - Jackson module that uses bytecode generation to further speed up data binding (+30-40% throughput for serialization, deserialization).
  • Kryo - Java serialization and cloning: fast, efficient, automatic.
  • MessagePack - Efficient binary serialization format.
  • Protostuff - A serialization library with built-in support for forward-backward compatibility (schema evolution) and validation.
  • SBinary - Library for describing binary formats for Scala types.
  • Thrift - The Apache Thrift software framework, for scalable cross-language services development.

存储

  • Apache Hive - Data warehouse infrastructure built on top of Hadoop.
  • Apache Cassandra - Column-oriented and providing high availability with no single point of failure.
  • Apache HBase - Hadoop database for big data.
  • Aerospike ![c] - High performance NoSQL database delivering speed at scale.
  • ArangoDB - A distributed free and open source database with a flexible data model for documents, graphs, and key-values.
  • AtlasDB - Transactional layer on top of a key value store.
  • ClickHouse - Column-oriented database management system that allows generating analytical data reports in real time.
  • CockroachDB ![c] - A cloud-native SQL database modelled after Google Spanner.
  • Couchbase - A distributed database engineered for performance, scalability, and simplified administration.
  • Crate ![c] - Scalable SQL database with the NoSQL goodies.
  • Datomic - Fully transactional, cloud-ready, distributed database.
  • Druid - Fast column-oriented distributed data store.
  • Elasticsearch - Open source distributed, scalable, and highly available search server.
  • Elliptics - Fault tolerant distributed key/value storage.
  • Geode - Open source, distributed, in-memory database for scale-out applications.
  • Infinispan - Highly concurrent key/value datastore used for caching.
  • InfluxDB - Scalable datastore for metrics, events, and real-time analytics.
  • Manta - Highly scalable, distributed object storage service with integrated compute.
  • MemSQL ![c] - High-performance, in-memory database that combines the horizontal scalability of distributed systems with the familiarity of SQL.
  • OpenTSDB - Scalable and distributed time series database written on top of Apache HBase.
  • Parquet - Columnar storage format available to any project in the Hadoop ecosystem, regardless of the choice of data processing framework, data model or programming language.
  • Reborn - Distributed database fully compatible with redis protocol.
  • RethinkDB - Open source, scalable database that makes building realtime apps easier.
  • Secure Scuttlebutt - P2P database of message-feeds.
  • Tachyon - Memory-centric distributed storage system, enabling reliable data sharing at memory-speed across cluster frameworks.
  • Voldemort - Open source clone of Amazon DynamoDB
  • VoltDB ![c] - In-Memory ACID compliant distributed database.

测试

  • Goreplay - A tool for capturing and replaying live HTTP traffic into a test environment.
  • Mitmproxy - An interactive console program that allows traffic flows to be intercepted, inspected, modified and replayed.
  • Mountebank - Cross-platform, multi-protocol test doubles over the wire.
  • Spring Cloud Contract - TDD to the level of software architecture.
  • VCR - Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests. See the list of ports for implementations in other languages.
  • Wilma - Combined HTTP/HTTPS service stub and transparent proxy solution.
  • WireMock - Flexible library for stubbing and mocking web services. Unlike general purpose mocking tools it works by creating an actual HTTP server that your code under test can connect to as it would a real web service.

持续集成和端到端的持续交付


康威定律

“任何设计系统的组织,必然会产生以下设计结果:即其结构就是该组织沟通结构的写照。” -  Melvin Conway(1967)。

康威定律断言,组织不得不制作应用程序设计,这些应用程序设计是其通信结构的副本。这通常会导致意外的摩擦点。
 

“逆向康威机动”建议改进您的团队和组织结构,以促进您所需的架构。理想情况下,您的技术架构将与您的业务架构显示同构。

“微服务”: - “微服务我们主要遵循域驱动的方法,我们的想法是建立一个跨职能的团队。”


Alt Text

灵感来自于 coming soon....


此浏览器不支持PDF。请下载微服务IBM红皮书PDF以查看它:Download PDF.


Alt Text

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值