Microservices Architecture for Enterprise Software Development

September 1, 2018

Microservice architecture is a method of enterprise software development, as a suite of independently deployable, small, modular services in which each service runs a unique process and communicates through a well-defined, lightweight mechanism to serve a business goal.

Microservices-Architecture-Enterprise-SignitySolutions

Also, Microservices architecture is suitable when it is required to support different kinds of a client like desktop browsers, mobile browsers, and native mobile applications, and it is required to integrate with other applications via web services or message broker.

Advantages: Microservices Pattern for Enterprise Software Development

 

  1. Small teams of developers working on an application.
  2. New team members quickly become productive.
  3. Easy to understand the application.
  4. Enables the continuous delivery and deployment of applications.
  5. Scalability of multiple copies of the application.
  6. Taking advantages of emerging technologies.

Drawbacks: Microservices Pattern

 

  1. Testing is more difficult.
  2. It has some deployment complexities.
  3. Developer must implement inter-process communication.
  4. Increased memory consumption. The microservice architecture replaces N monolithic application instances with NxM services instances. Correspondingly if each service runs in its own JVM (or equivalent), which is usually necessary to isolate the instances, then there is the overhead of M times as many JVM runtimes.
  5. As it is a distributed system, so it can result in duplication of effort

 

Difference between Monolithic and Microservices ApplicationMicroservices-Architecture-for-Enterprise-Signity-Solutions

Applying Patterns to Handling different Application Layers:

  • Decomposing Application
  • Business Capability Decomposing – e.g Order Management, Delivery Management
  • Subdomains Decomposing– Domain Driven Design (DDD) refers to dividing application as per the business subdomains
  • Deployment Patterns
  1. Multiple service instances per host- Run multiple instances of different services on a host (Physical or Virtual machine)
  2. Single Service Instance per Host – Each service is deployed as a set of service instances for throughput and availability
  • Microservice chassis frameworks

         Microservices can be developed with below frameworks:

  1. JAVA- Spring Boot, Dropwizard
  2. Go – Gizmo, Micro, Go Kit
  •  Communication Style
  1. Remote Procedure Invocation – REST, Apache Thrift
  2. Messaging– Messaging channels like Apache Kafka, RabbitMQ can be used as messaging channels.
  • External API

         API Gateway – API gateway is the single entry point for all clients. e.g Netflix API, Zuul Gateway.

  • Service Discover

    As services instances are hosted at a particular location, therefore, a number of instances and IP address changes dynamically, virtual machines are allocated dynamic IP, so service discovery servers are required.

  • Eureka Server
  1. Clustering solutions such as Kubernetes and Marathon run a proxy on each host that functions as a server-side discovery router.
  2. Server-side discovery server – When making a request to a service, the client makes a request via a router (a.k.a load balancer) that runs at a well-known location. Then, the router queries a service registry, which may be there inside the router, and forwards the request to an available service instance.  e.g AWS Elastic Load Balancer.
  • Circuit Breaker

Used to determine if the request to a particular service returned a successful response e.g Netflix Hystrix.


  • Data Management
  • saga pattern – (to maintain data consistency)A saga is a sequence of local transactions, where each local transaction updates the database and publishes a message or event to trigger the next local transaction in the saga. Now, if a local transaction fails because of violation of a business rule then, the saga executes a series of compensating transactions that undo the changes resulting from the preceding local transactions.
  • shared database
  • The database can be database per service
  • Security
  1. We can use the JSON Web Token to API gateways for authorization.
  • Health check API
  1. Spring Boot Actuator module helps to implement health check API for any service.
      Hire the best enterprise app development company!

 

          Though Microservices is great architecture, but we need to follow some basic guidelines while designing an application.

  • It should follow the Single responsibility principle. Because this with a limited and focused business scope will help in agility and delivery of service.
  • During the design phase, must find boundaries,  and align them with business capabilities.
  • Make sure to design independent deployment and developing component. Also, the focus should be on the scope of microservices and not on making the service smaller.
  • We should keep in mind to reduce the Database hits to get minimum throughput. Also, implementing cache is a great idea to save database interaction.

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *


*

Send us your requirements. We will get back to you with a free quote..

India

Signity Solutions Pvt. Ltd. Netsmartz House, 3rd Floor, Plot #10, Rajiv Gandhi IT Park, Chandigarh 160101 IN.

United States

Signity Solutions Pvt. Ltd.33 Wood Avenue South, Suite 600 Iselin, New Jersey NJ 08830.

Contact Us

AU : +61-39088 0326

U.K: +44-2031295421

U.S.A : +1-619-309-4653

sales@signitysolutions.com