官术网_书友最值得收藏!

Microservices architecture

Microservices is not a new word, the term was coined in 2005 by Dr Peter Rodgers. It was first called micro web services and based on SOAP. The term microservice is meant to convert large software into a number of pieces. Each piece focuses on a particular point of business. It is just like a little service with a microscopic scope for a specific target, compared to existing monolithic applications where the scope is very broad.

So, it pides the monolithic application into smaller microservices and manages and deploys these services as a single business goal; communication across these distributed services is a difficult task for developers. Use Spring Cloud to simplify integration between these distributed services.

Nowadays, industries are working on new functionality implementations and innovations every day or every week, constantly growing the application to a large size. A lot of complexity and coupling between various systems makes it difficult to change anything in the application. So various modules' teams must take care regarding impact on various parts of the application, either for large changes or the tiniest changes.

Let's look at the following diagram of a monolithic application without the microservices architecture:

As you can see, the preceding diagram shows, the Banking Application using a monolithic architecture without microservices. It's an all-in-one application, which means all modules, such as AccountService, CustomerService, and Notification Service, are in a single application.

Suppose you change CustomerService, you have to ensure the functionality of other modules' notification and account services is not impacted by the style of the architecture.

Let's pide this monolithic application into separate pieces according to the modules, and create with the microservice architecture. See the following diagram:

As you can see, we've now created the Banking Application with the microservices-based architecture. Here, the main application has been pided in a set of sub-applications, called microservices.

As core Spring concepts are applied to application architecture, Spring enables a separation of concerns between the application components, such as loose coupling, which means the effect of the change is isolated, and tight cohesion, which means the code performs a single, well-defined task. Similarly, microservices exhibit the same strengths, that is, loose coupling between the collaborating services of the application, and you can change these services independently. Another strength is tight cohesion, which means an application service that deals with a single view of data; it also known as Bounded Contexts or Domain-driven design (DDD).

Let's look at the following benefits of the microservice architecture.

主站蜘蛛池模板: 沙湾县| 突泉县| 五常市| 新安县| 余江县| 安泽县| 墨竹工卡县| 巴东县| 海口市| 康定县| 巧家县| 运城市| 辰溪县| 蓬安县| 柏乡县| 四平市| 深水埗区| 莱芜市| 浪卡子县| 双牌县| 凤凰县| 德兴市| 宜都市| 衡阳县| 永善县| 济源市| 西乡县| 武城县| 丹阳市| 四会市| 芦山县| 大方县| 定州市| 车险| 澜沧| 白玉县| 资兴市| 廊坊市| 苍梧县| 集贤县| 娄烦县|