The middleware layer.
This simple middleware layer will allow to have a simple way to configure and define all the application interaction.
Indeed, to communicate applications need the destination adress. This could be achieved by settings in each application, all the addresses of all the applications though a configuration file.
However this would be very hard to maintain. So intead, this middleware layer will be for now a simple directory, in which, each application will be registered at start-up.
Every application will have a local copy of this directory, in order to synchronously get the address of any other application.
This approach is not really reliable, a more effective approach would be to have a consensuce algorithm as RAFT to register each application.
Define on which address a given service is available.
Field | Type | Label | Description |
---|---|---|---|
name | string | optional | The unique application name. This application name should be unique though the whole platform. |
address | string | optional | The service address for gRPC request. |
Define the mddleware children base settings.
Field | Type | Label | Description |
---|---|---|---|
masterAddr | string | optional | The master adress for gRPC request. If the master is not available the child will refuse to start. |
childAddr | string | optional | The child address to expose gRPC services. |
An empty structure for synchronous request.
Field | Type | Label | Description |
---|
The middleware service is here to exchange application location.
On start up, each application should:
- Register its application.
- Fetch all the applications locations.
- Listen for location updates.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
registerApplication | Application | Empty | Register in the directory the application location. |
fetchApplications | Empty | Application | Fetch all the currently known locations. |
pushApplications | Application | Empty | Update application local directory by the master. |