-
Book Overview & Buying
-
Table Of Contents
Software Architecture with C++ - Second Edition
By :
Microservices can communicate in different interaction styles. In practice, these styles can be expressed as client–server interactions. Importantly, the client–server relationship describes the role a machine plays at a given time, rather than its fundamental identity. The relationship can be classified according to two dimensions: the communication type (synchronous or asynchronous) and the interaction model (one-to-one, one-to-many, many-to-one, or many-to-many).
The communication type determines how the client and server interact in real time. Synchronous communication follows a request–response model: the client sends a request and waits for a response. In synchronous mode, the client might even be blocked for a long time waiting for the response from the service. Asynchronous communication is a send-and-forget model: the client sends a message/event and doesn’t expect an immediate response. In asynchronous mode, the client continues...