- Microservices with Clojure
- Anuj Kumar
- 218字
- 2021-06-30 19:24:33
Asynchronous events
Getting data via service endpoints synchronously may become overwhelming for services that maintain a widely used database, like the users database. Therefore, it is recommended for services to maintain a read-only cache for such databases and keep it up to date asynchronously using events, as shown in the following diagram:

For example, instead of looking up the address or order count using service endpoints synchronously, services such as User Service and Orders Service can publish the events of interest on a message queue in order of occurrence. The User Service can then receive the orders event from the Orders Service via the Message Broker and update its database with the orders count or cache it. Similarly, the Orders Service can receive any address update event from the User Service, keep the address up to date for the user within its cache, and refer to it as and when required to generate orders for users.
- 網(wǎng)絡(luò)云百問(wèn)百答
- TCP/IP入門(mén)經(jīng)典(第5版)
- 新一代物聯(lián)網(wǎng)架構(gòu)技術(shù):分層算力網(wǎng)絡(luò)
- 網(wǎng)絡(luò)互聯(lián)技術(shù)(實(shí)踐篇)
- Windows Server 2003 Active Directory Design and Implementation: Creating, Migrating, and Merging Networks
- 射頻通信系統(tǒng)
- 光纖通信系統(tǒng)與網(wǎng)絡(luò)(修訂版)
- 網(wǎng)絡(luò)工程實(shí)施技術(shù)與方案大全
- 深入理解Nginx:模塊開(kāi)發(fā)與架構(gòu)解析
- 網(wǎng)絡(luò)空間全球治理觀察
- Hands-On Bitcoin Programming with Python
- 互聯(lián)網(wǎng)安全的40個(gè)智慧洞見(jiàn)(2016)
- 算力網(wǎng)絡(luò):云網(wǎng)融合2.0時(shí)代的網(wǎng)絡(luò)架構(gòu)與關(guān)鍵技術(shù)
- 物聯(lián)網(wǎng)與智慧廣電
- SEO攻略:搜索引擎優(yōu)化策略與實(shí)戰(zhàn)案例詳解