nus-cs3281 / 2024

1 stars 2 forks source link

Lightning Talk: Microservices Adoption Anti-patterns #11

Open ziqing26 opened 10 months ago

ziqing26 commented 10 months ago

PUNCH: Imagine you are now appointed by Prof Damith to be a tech consultant for small businesses. One day you receive a call from a client:

Client:  We are having problems testing our services. Can you help us?
You:  Sure. How many services?
Client:  5
You:  Oh okay. BTW how many developers are there?
Client:  5
You:  ...

Is microservice really necessary here? How about merging into one service?

WIIFY: 1 service per developer does not make sense, but it is remarkably common in the industry. You might have learned microservice in NUS courses or your internships. But have you noticed common pitfalls in using it? Nowadays businesses tend to blindly adopt microservices without analyzing their real needs. Microservices architectures can be counterproductive if applied wrongly. Developers need to design with anti-patterns of microservices in mind.

Agenda:

Key Points:

  1. Microservice architecture structures an application as a set of services which are independently deployable and loosely coupled.
  2. However, it is easy to fall into traps. Common traps include using microservice as magic pixie dust, focusing on the technologies, and thinking more the merrier.
  3. To solve these anti-patterns, you should question the underlying root causes, use just enough infrastructure, and use the dark force v.s. dark matter analysis to craft suitable size of services.

Call to Action: We as developers need to use microservices with caution and with broad picture in mind.

Slides