-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Introduction
Monta is connected with many roaming partners through an OCPI connection. OCPI stands for Open Charge Point Interface and is the main protocol used for establishing roaming connections between:
CPOs: Charge Point Operators, the parties that operate charge points
EMSPs: E-Mobility Service Providers, the parties that allow EV drivers to charge on any charge point over the roaming connections they have established with CPOs.
Through any OCPI connection CPOs and EMSPs will pull data from each other.
For CPOs the data can be data about their charge points (Location data) or their prices (Tariff data).
For EMSPs it can be data about the RFID cards/charge keys the EMSP has distributed to their drivers (Token data).
OCPI pagination schema
The OCPI protocol defines a pagination schema
- Pagination uses offset and limit query params on initial GET requests.
- The server responds with headers:
- Link (next page URL)
- X-Total-Count (total available)
- X-Limit
- The Link header is only present when more pages exist
All GET requests from Monta to connected CPOs and EMSPs go through a client implementation called the PullClient. This PullClient uses an initial URL and OCPIClientHeaders to do an initial call to a connected roaming party. Depending on if the roaming party replies with a link header in the response subsequent calls are made to the roaming party to pull in all data.
Problem statement
There are multiple problems with the code in the PullClient:
- The code in the PullClient currently does not run and has very poor code hygiene.
- There are no ways to properly follow the progress of the PullClient process.
- Even when all code-issues are fixed and the code is deployed to production we see the PullClient process does not pull in all data - when handling very large page numbers.
- For example some EMSPs manage millions of charge keys. Monta wants to pull the data on all these charge keys. the PullClient does not support this. Could you think of improvements to the PullClient flow to make this possible?