Chapter 3. Interprocess communication in a microservice architecture

This chapter covers

  • Applying the communication patterns: Remote procedure invocation, Circuit breaker, Client-side discovery, Self registration, Server-side discovery, Third party registration, Asynchronous messaging, Transactional outbox, Transaction log tailing, Polling publisher
  • The importance of interprocess communication in a microservice architecture
  • Defining and evolving APIs
  • The various interprocess communication options and their trade-offs
  • The benefits of services that communicate using asynchronous messaging
  • Reliably sending messages as part of a database transaction

Mary and her team, like most other developers, had some experience with interprocess communication (IPC) mechanisms. The FTGO application has a REST API that’s used by mobile applications and browser-side JavaScript. It also uses various cloud services, such as the Twilio messaging service and the Stripe payment service. But within a monolithic application like FTGO, modules invoke one another via language-level method or function calls. FTGO developers generally don’t need to think about IPC unless they’re working on the REST API or the modules that integrate with cloud services.

3.1. Overview of interprocess communication in a microservice architecture

3.2. Communicating using the synchronous Remote procedure invocation pattern

3.3. Communicating using the Asynchronous messaging pattern

3.4. Using asynchronous messaging to improve availability