Tuesday, May 31, 2016

Microservices and Software Design Principles

Microservices and Software Design Principles

Micro services are small, autonomous services that work together. Software design principles abstraction, divide and conquer, modularity and separation of concerns, software design patterns, and processes help produce quality product. This post details benefits of Microservices and how Microservices relate to existing software design principles and processes and help improve software quality through combining these techniques.

What are Microservices?


Over the last few years, distributed systems have become more fine grained. From hard to manage monolithic applications, we are seeing benefits of smaller self contained  service. These smaller, autonomous services which work together are referred as Microservices. Easier to change, deploy and if required retire. Many organizations have discovered that by using Microservices architecture, they can deliver software faster and embrace newer technologies. Microservices give significantly more freedom to allow greater maneuverability in making different decisions, allowing us to react faster to changes in technologies by using plug and play mechanism.

Fig 1. Monoliths and Microservices (http://martinfowler.com/articles/microservices.html)

Key Benefits


Microservices offer many varied benefits, most of these benefits can be attributed to development in distributed systems architecture.

Microservice can be build using different technologies which are suited to achieve better performance for a particular service, providing benefit of Technology Heterogeneity. For example a social network store user interactions in a graph oriented database, but the posts could be stored in a document-oriented datastore.

Greater Resilience can be achieved with microservices. If one component of a system fails, problem can be isolated and the rest of the system can carry on working. While in a monolithic system, if the service fails everything stops working.

A monolithic system allows for scaling everything together, while Microservices provide greater opportunity with scaling individual services for better performance. This allows to control costs more effectively.

Even the smaller changes in long monolithic applications require the whole application to be deployed in order to release the changes, resulting in high impact greater risk deployment. With Microservices provide ease of deployment by making change to a single service and deploy it independently of the rest of the system.

Smaller teams working on smaller codebases tend to be more productive. This allows for better productive organizational alignment of teams.

With Microservice functionality of a service can be consumed in different ways for different purposes, allowing for reuse of functionality.

Replacing the functionality that is outdated results in huge costs to replace them with better functionality. Microservice provide optimized replaceability of a service at a smaller scale.

Design Principles and Microservices


Software design principles namely abstraction, divide and conquer, modularity and separation of concerns represent a set of guidelines that helps to avoid bad software designs. Robert Martin’s book “Agile Software Development: Principles, Patterns and Practices” talks about 3 important characteristics of a bad design that should be avoided:
  • Rigidity - every change in design affects too many parts of the system.
  • Fragility - unexpected parts of system break due to a change
  • Immobility - hard to apply or reuse a part of the application

Microservices work specifically against these characteristics and can help improve overall software design and quality of system.

Microservices and Development Processes


Traditionally organizations split a large application into parts, development teams, UI teams, server side logic teams, and database teams. The Microservice split services organized around business capabilities. Each service team is responsible for building, testing and deploying it. Cross functional teams are responsible for building and operating each product and each product is split out into a number of individual services communicating to each other.

Software development processes like scrum defines "a flexible, holistic product development strategy where a development team works as a unit to reach a common goal" (http://en.wikipedia.org/wiki/Scrum_%28software_development%29 et a.l). This kind software development processes support Microservice architecture, where each team is responsible for building and running a product while supporting other teams and services.

Applications of Microservices

At my work we are working on a big enterprise product for managing Oracle Java distribution and deployment on thousands of systems. This system has many independent parts which are developed as big monolithic application (war file), every time there is a change, whole application has to be built deployed making the deployment process very hard and expensive. Microservices fit perfectly in this kind of process, each independent project can be build as a product, and put together to create the whole system.

Fig : Module deployment (http://martinfowler.com/articles/microservices.html)


Microservices provide many benefits to software development process and producing easily scalable services but also have many complexities similar to distribution services. Interservices communication get very complicated and network latency and overhead can cause issues.

References


  1. Newman, S. (2014), Building Microservices. O’Reilly Media Inc

17 comments:

  1. It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command.

    Aws Training in Chennai

    ReplyDelete
  2. This is extremely helpful info!! Very good work. It is very interesting to learn and easy to understood. Thank you for giving information. Please let us know and more information get post to link.

    Seo Company in Chennai

    ReplyDelete
  3. Hadoop ecosystem including Hive, H Base, Pig, Sqoop and Zookeeper. Hadoop is an open-source software framework used for distributed storage and processing of dataset of big data using the Map Reduce programming model.

    Big Data Testing Classes
    Hadoop Big Data Classes in Pune
    Big Data Training Institutes in Pune
    Hadoop Training in Pune
    Hadoop Pune

    ReplyDelete
  4. Please let me know if you’re looking for an author for your site. You have some great posts, and I think I would be a good asset. If you ever want to take some of the load off, I’d like to write some material for your blog in exchange for a link back to mine. Please shoot me an email if interested. Thanks.
    Acer service centre in Chennai | acer mobile service center in chennai | acer laptop service center in chennai | acer laptop service center in chennai | Acer service centre in Chennai | acer services in chennai | Acer service centre in Chennai | acer laptop service center in chennai

    ReplyDelete
  5. Thanks for providing your services it will helpful so much
    Sanjary Kids is one of the best play school and preschool in Hyderabad,India. The motto of the Sanjary kids is to provide good atmosphere to the kids.Sanjary kids provides programs like Play group,Nursery,Junior KG,Serior KG,and provides Teacher Training Program.We have the both indoor and outdoor activities for your children.We build a strong value foundation for your child on Psychology and Personality development.
    http://www.sanjarykids.com/

    ReplyDelete
  6. Great blog information provided by the author

    Pressure Vessel Design Course is one of the courses offered by Sanjary Academy in Hyderabad. We have offer professional Engineering Course like Piping Design Course,QA / QC Course,document Controller course,pressure Vessel Design Course,Welding Inspector Course, Quality Management Course, #Safety officer course.
    Document Controller course
    Pressure Vessel Design Course
    Welding Inspector Course
    Safety officer course
    Quality Management Course
    Quality Management Course in India

    ReplyDelete
  7. Nice information for this blog
    We are the best piping design course in Hyderabad, India. Sanjary academy Offers Piping Design Course and Best Piping Design Training Institute in Hyderabad. Piping Design Institute in India Piping Design Engineering.
    Piping Design Course
    Piping Design Course in india
    Piping Design Course in hyderabad

    ReplyDelete
  8. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again.
    BCOM 1st, 2nd & 3rd Year TimeTable 2020
    Agra University BCom Time Table 2020
    Maharaja Surajmal Brij University BCOM TimeTable 2020

    ReplyDelete
  9. I always spent my half an hour to read this webpage’s content every day along with a cup of coffee.

    Uniraj BA 1st year result

    ReplyDelete
  10. That is my dream, to make my backyard a haven for my family. Bite by bite, one season at a time, we are getting there!
    tax return for self employment in barking

    ReplyDelete
  11. Excellent post, Thanks for sharing this.

    Learn more about our courses to get the best knowledge. CSPO Certification

    ReplyDelete