FromMonolithstoMicroservices
Wikipedia Definition: Microservices are a software development technique—a
variant of the service-oriented architecture (SOA) architectural stylethat structures an
application as a collection ofloosely coupled services.
Overview:
Software world till date hasbeen dominated by monolithic applications. In short
Monolithic =“Bulky applications having their components tightly
coupled/dependent on eachother.” Theseapplications are alsocalled n-tier
applications becausethey have n-tiers ORn-levels ORn- layers. (e.g. – 3-tier, 3-
layer architecture) Companies till date have faced alot of problems with
monolithic applications regarding maintenance, scalability and extensibility. In
this article, we will understand how you canapply your existing knowledge of
monolithic applications to dive into anew world of microservices for
development of your application if you want to move someday into cloud or want
tosurvive in this competitive market.
Askfollowing questions to yourself:
 What you have now?Ans:Monolithicapplications
 What you want forfuture? Ans: Microservice application
 Whyyou want microservices?Ans:Becausewe want to take benefits of
cloud technology in near / distant future.
 Isthere any successfulexample of microservice application?Ans:Netflix
Analogy
Monolithic application Micro services
Characteristics of monolithic application
 Singledeployable unit (E.g.– WARfile in Java,DLL/EXEor web application
in .NET
 Consistsof multiple parts / layers. Usually3-tier applications accordingto
purpose:
o Database layer: Handlesall database/storage relatedoperations
o Businesslogic layer: Handlesproduct specificlogic
o Presentation layer: HandlesUIscreens.
 Deepparent-derived classhierarchy
 Hosted on single PCat atime.
Challenges of monolithic application
 Troubleshooting: If afault occurs it’s difficult to pinpoint where that fault
occurred becauseapplication ishuge.
 Scalability: If your application performance is slow you cannot scale
individual parts asthese parts are heavily interconnected with other parts.
Usual approachesin scalingmonolithic applications are increasing number
of servers, RAM,disk space,load balancers and increasing count of VMson
which these applications arehosted.
 New functionality canimpact whole application inabad way
 Deployment: Time consuming due to repeated QAcycles and integration
testing.
 Same technologystack: If entire application is developed in one technology
stack(E.g.- .NET)then you cant switch parts of this application with
another
technology stack(E.g.– Java)with easeand error-freemanner.
 Unsuitable for cloud: BigNO-NO!!!
 Work of development teams need to be synchronizedwith each other
w.r.t to goals.
Are you fed up due to above characteristics and challenges of monolithic
applications BEFORE moving intocloud?
Remedy:Microservices
Characteristics of microservices application
 Bit sizedcomponents
 Deployment isindependent
 Isolating service iseasier
 Canscaleasmuch asyou want without affecting other parts
 Canadd new functionality
 Chooseany technology stack of your choice
 Made for cloud
 Independent teams canhave sameor differentgoals
Challenges of microservices application
 Number of microservices
 Pinpointing fault to 1 or more microservices is difficult. Oncefault is found,
service canbe isolated.
 EmbraceDevOpsteam culture
 Testingis distributed and dependent on lot of independent factors.
 Designing with failure inmind
 Synchronization of information between differentmicroservices
Architectural difference between Monolithic andMicroservice
application
Monolithic application Micro services
Factors to consider while migrating monolithic applicationto
Microservice application
 Project deadline andbudget
 Technicalskillset of resources or technology stackpreference
 Readinessto embrace DevOpsculture
 Value in the eyesof customer andmanagement
 Readinessto deal withdistributed application architecture
 Ability to handle multipledevelopment teams
 Benefits of migrating tocloud
 Number/Complexity of features tobe migrated
In the next article we would see different architectural patterns for
developing Microservice aplications.
Please let me know your comments/suggestions.

From Monolithic applications to Microservices

  • 1.
    FromMonolithstoMicroservices Wikipedia Definition: Microservicesare a software development technique—a variant of the service-oriented architecture (SOA) architectural stylethat structures an application as a collection ofloosely coupled services. Overview: Software world till date hasbeen dominated by monolithic applications. In short Monolithic =“Bulky applications having their components tightly coupled/dependent on eachother.” Theseapplications are alsocalled n-tier applications becausethey have n-tiers ORn-levels ORn- layers. (e.g. – 3-tier, 3- layer architecture) Companies till date have faced alot of problems with monolithic applications regarding maintenance, scalability and extensibility. In this article, we will understand how you canapply your existing knowledge of monolithic applications to dive into anew world of microservices for development of your application if you want to move someday into cloud or want tosurvive in this competitive market. Askfollowing questions to yourself:  What you have now?Ans:Monolithicapplications  What you want forfuture? Ans: Microservice application  Whyyou want microservices?Ans:Becausewe want to take benefits of cloud technology in near / distant future.  Isthere any successfulexample of microservice application?Ans:Netflix
  • 2.
    Analogy Monolithic application Microservices Characteristics of monolithic application  Singledeployable unit (E.g.– WARfile in Java,DLL/EXEor web application in .NET  Consistsof multiple parts / layers. Usually3-tier applications accordingto purpose: o Database layer: Handlesall database/storage relatedoperations o Businesslogic layer: Handlesproduct specificlogic o Presentation layer: HandlesUIscreens.  Deepparent-derived classhierarchy  Hosted on single PCat atime. Challenges of monolithic application  Troubleshooting: If afault occurs it’s difficult to pinpoint where that fault occurred becauseapplication ishuge.  Scalability: If your application performance is slow you cannot scale individual parts asthese parts are heavily interconnected with other parts. Usual approachesin scalingmonolithic applications are increasing number of servers, RAM,disk space,load balancers and increasing count of VMson which these applications arehosted.  New functionality canimpact whole application inabad way
  • 3.
     Deployment: Timeconsuming due to repeated QAcycles and integration testing.  Same technologystack: If entire application is developed in one technology stack(E.g.- .NET)then you cant switch parts of this application with another technology stack(E.g.– Java)with easeand error-freemanner.  Unsuitable for cloud: BigNO-NO!!!  Work of development teams need to be synchronizedwith each other w.r.t to goals. Are you fed up due to above characteristics and challenges of monolithic applications BEFORE moving intocloud? Remedy:Microservices Characteristics of microservices application  Bit sizedcomponents  Deployment isindependent  Isolating service iseasier  Canscaleasmuch asyou want without affecting other parts  Canadd new functionality  Chooseany technology stack of your choice  Made for cloud  Independent teams canhave sameor differentgoals Challenges of microservices application  Number of microservices  Pinpointing fault to 1 or more microservices is difficult. Oncefault is found, service canbe isolated.  EmbraceDevOpsteam culture  Testingis distributed and dependent on lot of independent factors.  Designing with failure inmind
  • 4.
     Synchronization ofinformation between differentmicroservices Architectural difference between Monolithic andMicroservice application Monolithic application Micro services Factors to consider while migrating monolithic applicationto Microservice application  Project deadline andbudget  Technicalskillset of resources or technology stackpreference  Readinessto embrace DevOpsculture  Value in the eyesof customer andmanagement  Readinessto deal withdistributed application architecture  Ability to handle multipledevelopment teams  Benefits of migrating tocloud  Number/Complexity of features tobe migrated
  • 5.
    In the nextarticle we would see different architectural patterns for developing Microservice aplications. Please let me know your comments/suggestions.