Orchestrator
Last updated
Last updated
To maintain a standard between the requests and responses of the application, each of the services that are being used are categorized.
For example:
Banking as Services.
Within Banking-as-a-Service, we have Rize, Galileo and Unit.
Then, the parameters that must be sent and those that are expected to be received for each of the services are studied:
For example:
See the format in which it receives and sends the information from the external service API (CamelCase, Snake_case, Pascal).
This are examples of responses from Galileo and Unit, where we can see that Galileo uses snake_case and Unit uses camelCase.
See the structure of each endpoint to be used for sending information.
This is a request to update a user's account information.
Galileo uses application/x-www-form-urlencoded format for sending information.
In addition to using different formats to send information, we can see that the structure of the object that is sent is very different for both services.
Galileo is using a simpler structure (key, value) than Unit, since the parent object of Unit has other objects inside of it.
See each of the validations that must be met by each of the services.
Example:
Dates format as established by the service.
Remove hyphens in phone numbers or documents.
For this entire process, Data Transfer Objects (DTOs) were created, that are specific to Linker, and then this DTO is transformed into the DTO used by the service to which the request will be sent. In the same way, to transform the response of an external service, interfaces were created to use Linker.
For the integration of a new service, it must first be verified if the DTOs and interfaces to be used have not been defined.
Otherwise, they should be created in a general way so that if another service of the same category is integrated in the future, it can also use the same interfaces and DTOs.