Home - HeinrichConvidera/RESTful-API-Gateway-Wiki GitHub Wiki
This system was developed as part of a bachelor thesis.
Design and implementation of a RESTful API gateway for the consolidation of existing distributed resources.
Nowadays, software development is moving away from building one large monolith.
Many small self-contained micro services are preferred.
In some constellations, the problem now arises that an information object is distributed over several microservices.
In other cases, the required information is distributed over several systems.
This bachelor thesis topic deals with this problem limited to the distributed retrieval of information via RESTful APIs.
A central unit is to be created where RESTful APIs can be registered. All requests, in particular GET requests, are to be made via this central unit. In the following part this central unit is called RESTful API Gateway.
Within the scope of this work, the central unit, RESTful API Gateway, should only support queries, i.e. GET
requests.
Thus no data can be manipulated (PUT
/PATCH
), created (POST
) or deleted (DELETE
) via the central unit RESTful API Gateway.
The RESTful API Gateway also does not check or ensure the data consistency of the various APIs.
Unfortunately, all diagrams were created in German. Hopefully the diagrams will be translated in the future.
Figure 01: Example Constellation of the RESTful API Gateway (german) |
The following table illustrates the different services of the different APIs.
Service 1 | Service 2 | Service 3 | |
---|---|---|---|
User: { name, address }
|
Car: { name, image }
|
User: { name, email }
|
User: { birthday, image }
|
Table 01: Information about services, their RESTful APIs and data in this example |
Via the RESTful API gateway user data can now be queried centrally. For example, if you want to query the name, e-mail and address of a user the following query should be possible:
GET /users/{user_id}?fields=name|email|address
(1)
To get all user data:
GET /users
(2)
With the help of the fragments in the request (1): name, e-mail and address, the RESTful API can find out which APIs have to be requested with the help of the registered APIs and their descriptions. In this case these would be API A and API C. Then the responses are returned in combination.
User: {
name,
address,
email
}
The request (2) would address API A, API C and API D accordingly and return its combined response.
User: {
name,
address,
email,
birthday,
image
}
Figure 02: Use-Case Diagram (german) |