Enhancing Module Interaction: Async API Implementation
Explore how to implement asynchronous APIs between modules to enable event-carried state transfer. Understand how to create local caches to share Store and Product data efficiently across microservices, and update integration event handlers to support this architecture in Golang applications.
We'll cover the following...
We published messages from the Store Management module to the Shopping Baskets module. We focused on creating the mechanisms between the modules and only logged into the console when a message arrived. What we started in that chapter was adding new inputs and outputs to the modules:
We will be adding entirely new asynchronous APIs to the modules to implement the sharing of state via events: event-carried state transfer. Also, it would be an excellent time to reflect on the data each module is sharing with its existing gRPC API. We will be trying to determine what data other modules need to know about to function and where that data originates from.
Store Management state transfer
The Store Management module shares Store and ...