I would like to show you the creation of a simple REST Full Web API, while, at the same time, keeping our code as simple as possible. This in order to keep clarity, focus and understand the beginning concepts of microservices architecture. And nothing gets the job done better than having some working code for you to play around with.
I’ve created a small case study to give some guidelines of how we can approach this.
With that all said let’s dive in.
A fictional startup called Apep wants to create an app which organizes media files. A user needs to log in before making any changes and we (wie bedoel je met ‘we) also need to be able to manipulate media files.
As I’ve already mentioned our back-end will be built following a micro services architecture.
Our back-end will contain the following:
- Identity Microservice – Authenticates users based on username, password and issues a Bearer token which contains Claims-based identity information in it.
- Media Microservice – Handles media uploads, deletions such as get, post, delete
- API Gateway – Acts as a center point of entry to the back-end application, Provides data aggregation and communication path to microservices.