Module Integration
Explore how modules communicate synchronously via gRPC within a modular monolith in Golang. Understand when to push or pull data between bounded contexts, how to command external components, and analyze the checkout process involving multiple modules. This lesson highlights integration strategies and practical challenges in event-driven architecture.
We'll cover the following...
All interactions between the modules are entirely synchronous and communicate via gRPC. With a distributed system such as our modular monolith application, there are two reasons that bounded contexts will need to integrate:
They need data that exists in another bounded context.
They need another bounded context to perform an action.
Using external data
When a bounded context needs data belonging to another bounded context, it has three options:
Share the database where the data is stored.
Push the data from the owner to all interested components.
Pull the data from the owner when it is needed. ...