Microservice Architecture 简明教程

Microservice Architecture - Blueprint

微服务在内部实现 SOA。从更广泛的意义上讲,我们可以将其视为一个 SOA 应用程序的子集。

Microservice implements SOA internally. In a broader sense, we can consider it as a subset of one SOA application.

Rule & Workflow

以下是在开发微服务时需要遵循的原则。

Following are the principles that need to be taken care of while developing a microservice.

  1. High Cohesion − All the business models need to be sub-divided into the smallest business part as much as possible. Each service should be focused to perform only one business task.

  2. Independent − All the services should be full stack in nature and independent of each other.

  3. Business Domain Centric − Software will modularize according to the business unit and is not tier based.

  4. Automation − Testing deployment will be automated. Try to introduce minimal human interaction.

  5. Observable − Each service will be full stack in nature and they should be independently deployable and observable like an enterprise application.

Team Management

“两披萨规则”是一种限制微服务开发团队内参加者数量的规则。根据此规则,一个应用程序的团队成员数量应尽可能少,以至于两份披萨就能满足他们的需求。一般来说,该数量不应超过 8。由于微服务本质上是全栈的,因此团队也是全栈的。为了提高效率,我们需要建立一个由不超过 8 名拥有该服务所需所有专业知识的成员组成的团队。

“Two Pizza Rule” is a kind of rule that restricts the number of attendees in a microservice development team. According to this rule, number of the team members of one application should be so small such that they can be fed by two pizza. Generally, the number should not be more than 8. As microservice is full stack in nature, the team is also full stack in nature. To increase the productivity, we need to build one team of maximum 8 members with all kinds of expertise required for that service.

Task Management

任务在软件开发生命周期中扮演着重要角色。将大型应用开发分解为若干个小任务单元。假设我们需要开发一款如 Facebook 这样的应用程序,那么“登录”功能可视为整个构建过程中的一个任务。在高技能专业人员的监控下,需要适当地监控这些任务的进度。敏捷是业界遵循的知名流程结构,用于满足良好的任务管理。

Task is an important role in software development life cycle. Developing a large scale application can be broken down into several small units of task. Let us consider we need to develop one application such as Facebook. Then, “Log in” functionality can be considered as a task of the entire build process. Progress for each of these tasks need to be monitored properly under highly skilled professionals. Agile is the well-known process structure followed in the industries to keep up with good task management.