# Jaume's Onboarding
---
## Where we come. Routing manager objectives.
[Specifications document](https://docs.google.com/document/d/1kUTpmzh3Uad4SFT9Ad7Dxsu1X52yQwUFmCI7tAnxYaM/edit
)
- Providing a normalizedd routing interface to execute different algorithms.
- Store inmutable group of orders (datasets), in order to repeat the experiments.
- Provide an easy way to extract routes from the live database.

---
## Explain the domain.
- A `dataset` is a group of order.
- A `config` is a group of vehicles and a serviceTime.
- An `algorithm` indicates the algorithm to be used:
- This include algorithm name (plotwise, graphhopper)
- An `execution` keeps the results of a routing executions which is composed of a dataset, a config and an algorithm.

- An important concept for us is about the `hash`. Basically each dataset has hash, that is unique along all the datasets. The idea is to have uniques datasets and avoiding insterting twice the same dataset.
**Check the real domain**
**Explain that we defined some entines as orders or vehicles that are store as json in the database**
---
### Plotwise Integration

- Plotwise: Continues Optimization
- Roadmap with Plotwise
- Static routing
- Shadow running
- Final integration (UI)
- Challenges with Plotwise
- We need to receive orders event.
- We need to process and associate each event to a plotwise bucket.
- We need to be able to create/update orders in plotwise.
- We need to know when to start/stop any bucket
---
### Inner Routing Manager issues
- Define a `routes` entity that normalize the routes (result) for any algorithm.
- Monitoring. We still dont have any integrationg with prometheus or grafana.
- We need to figure out how to integrate our current custom implementaion of rabbitmq with the the integration of the event bus.
- More issues: https://github.com/PaackEng/routing-manager-system/issues
---
### Implementaions
#### Common implementations from other Go projects
- Based on DDD
- Based on infra/app/domain separation of concerns
#### Divergence implentations
- We are not using events for changes in the domain
- We are not using middlewares
- We are using some entities as public. Since we need to store
**Check flow to run an execution**
**Explaing that each algorithm is part of the infra layer**