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

Supports polyglot architecture

With microservices, architects and developers get flexibility in choosing the most suitable technology and architecture for a given scenario. This gives the flexibility to design better fit solutions in a more cost-effective way.

Since microservices are autonomous and independent, each service can run with its own architecture or technology, or different versions of technologies.

The following image shows a simple, practical example of polyglot architecture with microservices:

There is a requirement to audit all system transactions and record transaction details such as request and response data, users who initiated the transaction, the service invoked, and so on.

As shown in the preceding diagram, while core services like Order microservice and Product microservice use a relational data store, the Audit microservice persists data in a Hadoop File System (HDFS). A relational data store is neither ideal nor cost effective to store large data volumes, like in the case of audit data. In the monolithic approach, the application generally uses a shared, single database that stores the Order, Product, and Audit data.

In this example, audit service is a technical microservice using a different architecture. Similarly, different functional services could also use different architectures.

In another example, there could be a Reservation microservice running on Java 7, while a Search microservice could be running on Java 8. Similarly, an Order microservice could be written on Erlang, whereas a Delivery microservice could be on the Go language. None of these are possible with a monolithic architecture.

主站蜘蛛池模板: 峨眉山市| 平江县| 沂水县| 溧水县| 清丰县| 泸定县| 曲麻莱县| 庆阳市| 乌苏市| 合水县| 井冈山市| 达拉特旗| 永嘉县| 金湖县| 柏乡县| 西华县| 本溪市| 姚安县| 隆化县| 金溪县| 比如县| 建瓯市| 临西县| 黄浦区| 泾川县| 彩票| 东山县| 慈溪市| 吉安县| 丁青县| 阳西县| 汝州市| 昭通市| 镇坪县| 岗巴县| 甘洛县| 神农架林区| 天峻县| 雷波县| 南昌市| 沐川县|