We would like you to implement a distributed Service Assembly with a gateway component.
The service assembly will have the following components:
- Storage Service - stores in-memory, dummy data that can be accessed through a REST GET call in JSON format
- Gateway Service - main process that serves data to clients and tracks the availability of the Storage Services (there could be 0 to 3 available) and has the following REST endpoints
- /status - returns the status of each Storage Service
- /data - fetches the dummy data from a Storage Service (eg. with round robin) and returns the data in JSON format
We would like the services to be containerised and run with docker-compose. The services can be implemented using any programming language.
- Please fork this git repository and work inside your own
- Provide a solution for the described problem and give us the instructions necessary to execute it
- We would like to have your solution in form of a Pull Request into the main repository
- What should the Gateway do if no Storage Services are running?
To start, just us one of the start scripts. It is way over-engineered and at the same time I haven't had too much time to work on it. Thats why the long delay. There are things that could be way more sophisticated. Like the IDE integration and up-to-date checks in gradle. Also the the roundrobin is is bit simpler than it should be.