Communication
摘要
Many of the architectural choices that we make constrain the way in which messages are delivered and the way in which they are processed. Two common categories of message delivery are synchronous APIs and asynchronous queues or topics. Synchronous APIs include REST, GraphQL, and gRPC, while asynchronous queues or topics include Kafka, RabbitMQ, and SQS. Which one you choose often dictates how requests are processed. With a synchronous API, the server processes the request and sends back the response on the same channel. With an asynchronous queue, the server processes messages as it pulls them from the queue. It publishes the results, if any, to a different queue for downstream consumption. Patterns for communication and processing are tightly bound.