The route-planning microservice of the car-sharing application
In this section, we describe our example microservice, how to handle security, and how to prepare the solution for its implementation into three separate subsections.
Microservice specifications
The route-planning microservice stores and matches pending requests to move from one town to another with existing routes that are still open to other participants.
When an opened route of a car owner is created, it is matched with requests whose start and end towns are close to the car owner’s route and whose date constraints are compatible. If matches are found, a proposal to modify the route to include them is created and sent to other interested microservices. A symmetric operation is also done when a new request is inserted.
When a proposal to extend the route is accepted, the original route is extended.
After the initial match attempt, both requests and routes are stored for possible future matches...