A GRPC Server that act as a mediator between multiple Clients.
Outer pipes Cell padding No sorting
| Folder | Description |
|---|---|
| mediator | GRPC Server Spring boot code that act as Mediator for all Interfacing Clients |
| interface | GRPC Client Spring boot code that establish connection to Mediator GRPC Server and send request & receive response |
The same interface code can be run as different instances (Client 1, 2, 3 etc). Each instance should have below environment variables for GRPC Server to distinguish clients and mediate response accordingly
| Env Variable | Description |
|---|---|
| STREAM_ID | Name that uniquely identify a GRPC Client |
| PARTITION_ID | An identifier that can uniquely identify each clients within a Stream_ID |
Combination of STREAM_ID + PARTITION_ID uniquiely identify an instance.
Example
| STREAM_ID | PARTITION_ID | Client Instance Identifier | Description |
|---|---|---|---|
| Order_Service | 1 | Order_Service1 | 1st Instance of OrderService |
| Order_Service | 2 | Order_Service2 | 2nd instance of OrderService |
| Order_Service | 3 | Order_Service3 | 3rd instance of OrderService |
| Payment_Service | 1 | Payment_Service1 | 1st instance of Payment_Service |
| Payment_Service | 2 | Payment_Service2 | 2nd instance of Payment_Service |
