The scope is the operations that the customer can perform in person. In these scenarios, either the smart fridge or the cashier POS acts as entry points to the system.
The interactions include:
- picking up already ordered meals; and
- purchasing meals on the spot and collecting it right away.
This is a microservice architecture. Key patterns used:
- Wrapper (aka Legacy Wrapper, Anticorruption Layer)
- CQRS
- Publish-subscribe (in the event-driven architecture)
- The actual customer (in person), Smart Fridge and cashier POS.
- Systems that provide APIs for querying and managing the state of the smart fridges and vendor management systems.
- Proprietary technology, managed by third-parties.
- This gray circle represents the cloud-based system and API provided by a contracted smart fridge provider (third-party).
- It offers the external API that Farmacy Food will interact with for sending and receiving information about fridges (status, inventory), orders, and purchases.
- Wrapper service for interacting with a third-party smart fridge partner in the cloud.
- It knows all the details (message formats and structures, authentication keys, etc.) to interact with the Smart fridge mgmt system. It works as an anticorruption layer (ACL).
- The goal of the wrapper services is to avoid tight coupling between Farmacy Food business logic implementation and the specifics of each third-party system. The diagram illustrates one such interaction. If Farmacy Food has a contract with 2+ fridge providers, then there should be one wrapper service for each.
- This gray circle represents the cloud-based system and API provided by a vendor partner (e.g., Starbucks).
- It offers the external API that Farmacy Food will interact with for sending and receiving information about orders and local store inventory.
- Wrapper service for interacting with a third-party vendor partner in the cloud.
- It knows all the details (message formats and structures, authentication keys, etc.) to interact with the Vendor mgmt system. It works as an anticorruption layer (ACL).
- The goal of the wrapper services is to avoid tight coupling between Farmacy Food business logic implementation and the specifics of each third-party system. The diagram illustrates one such interaction. If Farmacy Food has a contract with 2+ vendors, then there should be one wrapper service for each.
- A batch program that queries the Smart Fridge and Vendor management systems for updates. Changes are
posted to the Inventory and Order topics for later handling by the
Inventory command
andOrder processing
services.
- Reactive service (topic subscriber) that handles commands updating the inventory.
- Reactive service (topic subscriber) responsible for processing events about orders.
- UML activity diagram to explain how the inventory and order processing are done in farmacy food system, when a customer pick-up a meal on the smart fridge.