- Microservices with Clojure
- Anuj Kumar
- 386字
- 2021-06-30 19:24:28
Data management
In a microservices-based application, databases are isolated for each business capability and are managed by only one service at a time. Any request that needs access to the data managed by another service strictly uses the APIs provided by the service managing the database. This makes it possible to not only use the best database technology available to manage the business capability, but also to isolate the technology debt to the service managing it. However, it is recommended for the calling service to cache responses over time to avoid tight coupling with the target service and reduce the network overhead of each API call.
For example, a service managing user interests might use a graph database (https://en.wikipedia.org/wiki/Graph_database) to build a network of users, whereas a service managing user transactions might use a relational database (https://en.wikipedia.org/wiki/Relational_database) due to its inherent ACID (https://en.wikipedia.org/wiki/ACID) properties that are suitable for transactions. The dependent service only needs to know the APIs to connect to the service for data and not the technology of the underlying database.
This is contrary to a monolithic layered architecture, where databases are organized by business capability, which may be accessed by one or more persistence modules based on the request. If the underlying database is using a different technology, then each of the modules accessing the databases have to comply with the same technology, thus inheriting the complexity of each database technology that it has access to.
The concept of microservices is very similar to a well-known architecture called service-oriented architecture (SOA) (https://en.wikipedia.org/wiki/Service-oriented_architecture). In microservices, the focus is on identifying the right bounded context and keeping the microservices as lightweight as possible. Instead of using a complex message-oriented middleware (https://en.wikipedia.org/wiki/Message-oriented_middleware) such as ESB (https://en.wikipedia.org/wiki/Enterprise_service_bus), a simple mode of communication is used that is often just HTTP.
- Martin Fowler on microservices
- Web安全防護(hù)指南:基礎(chǔ)篇
- CorelDRAW X6 中文版圖形設(shè)計(jì)實(shí)戰(zhàn)從入門到精通
- FreeSWITCH 1.2
- 網(wǎng)管員典藏書架:網(wǎng)絡(luò)管理與運(yùn)維實(shí)戰(zhàn)寶典
- 物聯(lián)網(wǎng)識(shí)別技術(shù)
- 物聯(lián)網(wǎng)之魂:物聯(lián)網(wǎng)協(xié)議與物聯(lián)網(wǎng)操作系統(tǒng)
- WordPress 5 Complete
- SD-WAN架構(gòu)與技術(shù)(第2版)
- 通信簡(jiǎn)史:從信鴿到6G+
- 世界互聯(lián)網(wǎng)發(fā)展報(bào)告·2019
- Mastering TypeScript 3
- 雷達(dá)饋線技術(shù)
- 城市治理一網(wǎng)統(tǒng)管
- 計(jì)算機(jī)網(wǎng)絡(luò)技術(shù)及應(yīng)用
- 深入理解OpenStack Neutron