Microservices architecture part 1

What is microservice architecture?

As the name implies microservice means your application will be divided into a set of small services. That means a microservices architecture is mainly oriented to the back-end, although the approach is also being used for the front end.

Microservices: a definition of this new architectural term

What are the challenges with monolithic?

  • Large code base
  • Dependency on one technology stack
  • Deployment dependency
  • Scalability

Why microservice ?

  • Many developers working on the same team
  • productive continuous delivery
  • application source code /logic need to easy to read and understanding
  • add different different technologies for different parts on your application(frameworks, programming language)
  • Better testability — services are smaller and faster to test

Microservices for different stakeholders

For the business owners

You want to promote your product to new customers.But it will take some time to make new changes because of using a large code base (as above) . Not only slow you will face so many dependencies.

For the developers

If you are the new developer who recently joined, you have to get understanding the source code very quickly . The large code base is typically a headache for you. potentially increase your learning curve. I know when you read this you will remember what i meant :) . I am 100% sure it affected your mentality as well. When working on changes, the risk of breaking something else might cause the developer to hesitate with innovation and enhancing the application

Drawbacks

Certainly, no technology is a silver bullet, and the microservice architecture has a number of significant drawbacks and issues.

  1. Developer need to attend additional complexity of creating a distributed system
  • service discovery needed (will talk later)
  • IDE/Tool not supporting for development
  • Inter service communication needed
  1. how to partition the system into microservices
  2. How many micro services. What are those? It’s very much art. (PATTERNS FOR DECOMPOSING AN APPLICATION INTO SERVICES)
  3. How to communicate between services. (COMMUNICATION PATTERNS)
  4. Service discovery . check and logging.Exception tracking,Application metrics,Audit logging (OBSERVABILITY PATTERNS PROVIDE INSIGHT INTO APPLICATION BEHAVIOR)
  5. How to make services loosely coupled (DATA CONSISTENCY PATTERNS FOR IMPLEMENTING TRANSACTION MANAGEMENT)
  6. Evolution strategies
  7. When we come to different databases for different services, some queries need to be linked with another database table. But that’s not accessible . Its only access via api (PATTERNS FOR QUERYING DATA IN A MICROSERVICE ARCHITECTURE)
  8. Easy to do testing because micro service is really small. Since there are so many services , automated testing need to implemented (PATTERNS FOR THE AUTOMATED TESTING OF SERVICES)
  9. Security need to be implemented (SECURITY PATTERNS)
  10. Choosing the implementation stack (capable of supporting communication or messaging protocols)

Now you know what are microservices , pros and cons, what are the main areas you need to address. (What are the patterns)

Next few post will talk about more details about those patterns and how we build microservices with best.

Additionally will talk ..How weDesign a DDD-oriented microservice.

appreciate if you hit that 👏 button to help others find it.

--

--

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