- Microservices with Clojure
- Anuj Kumar
- 416字
- 2021-06-30 19:24:31
Direct messaging
In direct messaging, each request is sent directly to the microservice on its API endpoint. Such requests may be initiated by users, applications, or by other microservices that integrate with the target microservice to complete a particular task. Mostly the endpoints to handle such requests are implemented using REST (https://en.wikipedia.org/wiki/Representational_state_transfer), which allows resource identifiers to be addressed directly via HTTP based APIs with a simple messaging style.
For example, in a typical microservices-based e-commerce application, an administrative user may wish to create, update, or manage users via the User Service's REST endpoint. In that case, the user can directly call the REST API of the User Service, as shown in the following diagram:

Similarly, a mobile application may want to query user interests via Interest Service's REST endpoint of the e-commerce application. Since the Interest Service depends on both the User Service and the Orders Service, it may further initiate two separate calls to the REST endpoint of these two services to get the desired response which it can merge with the user interests data and generate the response for the requesting application. Mostly, all these kinds of request-response are synchronous in nature as the sender expects a response with the results in the same call. Asynchronous requests are mostly used to send alerts or messages to record an operation, and in those cases, the sender doesn't wait for the response and expects the action to be taken eventually.
Message formats used with REST endpoints are mostly text-based message formats such as JSON, XML, or HTML, as supported by the endpoint implementation. Binary message formats such as Thrift (https://en.wikipedia.org/wiki/Apache_Thrift), ProtoBuf (https://en.wikipedia.org/wiki/Protocol_Buffers), and Avro (https://avro.apache.org/) are also popular due to their wide support across multiple programming languages.
- Mastering Machine Learning for Penetration Testing
- HCNA網絡技術
- 通信簡史:從信鴿到6G+
- 大話社交網絡
- 物聯網技術與應用
- Spring 5.0 Projects
- 邁向自智網絡時代:IP自動駕駛網絡
- Microsoft Dynamics CRM 2011 Applications(MB2-868) Certification Guide
- 網絡安全應急響應技術實戰指南
- Scala Design Patterns.
- 5G+區塊鏈
- Practical Web Penetration Testing
- 移動物聯網:商業模式+案例分析+應用實戰
- 云計算技術與標準化
- 小型局域網組建