Photo by Kaleidico on Unsplash

Have you ever feel your application is hard to maintain? or hard to scale up? if so i suggest you to know what microservice is.

Based on microservice.io, microservice is an architectural style that structures an application as a collection of services that are:
- Highly maintainable and testable
- Loosely coupled
- Independently deployable
- Organized around business capabilities
- Owned by a small team

I can say microservice is a way to split up our modules into services that can scale up based on their focus. In example User Modules, when we migrate into microservice we need to create a new database to store user data and also a dedicated project. So the benefit is we can focus for one service thats make easier to scale up and maintain.

As i mention above, benefit of microservice is we can focus for each service and make easier to scale up and maintain. Of course it has many benefits from server perspective, code perspective, security perspective etc. For the cons, what i feel is we need more resource such as more engineer and more server resource.

So, in this article i will share how i build a simple microservice using different tech stack (Lumen PHP and Express Nodejs). The case is about Property (User have house). We will set Nodejs as a Gateway and User Service, for Property Service we are using Lumen.

The Architecture

Next, i will split into some articles that are:
1. Introduction of Microservice
2. Build API with Lumen for Microservice
3. Build API with Nodejs fro Microservice
4. Build API Gateway with Nodejs for Microservice
5. Using JWT as Authentication in API Gateway

Thats all for the introduction, next we are going to build API with Lumen. Thank you!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store