Microservices

Microservice architecture is a method of developing software applications 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.
Marlabs, with 20+ years of experience in the development space with various development methodologies, has been helping numerous customers with microservices development. Marlabs can help build projects faster and less complex systems allowing quick repairs, updates, or upgrades with limited to no downtime. Marlabs works with you to ensure applications are built in the simplest and most efficient way possible using microservices leveraging Agile and DevOps and other best in class processes, tools, and technologies.
Our core offerings are:
Strategic services
  • End-to-end microservices focused software development services 
  • Assessment and consulting services for microservices development
Focused Services
  • Microservices development – New services or conversion of existing monolithic systems - any technology stack
  • Microservices testing – including QA automation and performance testing
  • Microservices deployment – IaaS/PaaS or cloud/containers/serverless
  • Microservices and DevOps
Trainings
  • Microservices competency development.

Although Service-oriented Architecture (SOA) and microservices do have a lot in common, they are not one and the same thing. While SOA is a software design pattern where components of an enterprise application “talk” to each other using communication protocols, microservices enable developers to build apps as suites of independently deployable services.

Traditionally, programs are developed using a monolithic approach that results in it functioning as a single unit. The same goes with deployment as well. When one part of it breaks or needs to be updated, it can take the whole application out of commission. As a monolithic program grows, it becomes increasingly difficult to maintain, as many co-dependent areas need to be addressed to update the program. Monolithic structures are a natural way of building things, and all tests run in a single program. But as cloud-based services grow, these structures become increasingly dated.
With microservices, each capability can be treated as a separate process and each microservice is an independently deployable application that gets connected to others to deliver the desired functionality. There’s no middleware; instead, the services use communication protocols, typically REST since they are less complex, allowing the flexibility to have different services modules on different machines. So, there’s no need to install the whole app on all the devices. When the microservices are connected, they can communicate with each other through requests and procedures. The advantage here is that changes can be made to a single service, allowing them to be replaced, fixed or upgraded without needing to address the entire application. In addition, since microservices are independent of each other, they can be written in any programming language that suits their function best, and even have their own database.
Here is how the typical development lifecycle of a Microservices look like compared to monolithic apps.
Microservices have gained so much popularity as they offer the following advantages:
  • Multi-platform and flexibility to have multiple programing languages in a given application
  • Extensibility and convenience in terms of deployment and maintenance
  • Agility and efficiency: Reduces overall time and integrates well with Agile and DevOps methodologies
  • Easier upgrades can be individually addressed without affecting the entire program.
Microservices are perfect for creating a simpler process from an existing program, or building a new program. When working with an existing program, microservices can help to simplify the existing process, or add new functions without having to completely rewrite the existing program. This is incredibly useful, as it saves a lot of time, and is easier to fix any problems that occur or update specific functions.
Two important trends that have emerged are microservices and DevOps. Both are practices designed to offer greater agility and operational efficiency for the enterprises. While Microservices have excelled in rewriting complex monolithic apps into small and elegant services, DevOps has excelled in automating the release deployment portions fueled with agile methodologies in terms of common approaches to software development, similar organizational structures and development cultures. The rapid adoption of agile methods also fueled the growth of microservices-based development cycle, continuous integration (CI). Those adopting CI have further leveraged agile ideologies to use microservices as a driver to achieve more frequent software releases, leading to the practice of continuous delivery (CD). CD uses a quality-focused ideology to build potentially shippable product increments, which speeds the deployment pipeline, achieving a result that brings changes to production as quickly as possible. 
Microservices and DevOps together:
Combination of microservices and DevOps brings change that is often well received by those creating modern applications and such has a positive impact on overall productivity and application release rate. The following advantages can be expected:
  • Deployability: Microservices offer increased agility, which fuels the ability to roll out new versions of a service. That agility is due to shorter build, test, and deploy cycles. Microservices can also incorporate the flexibility needed to employ service-specific security, replication, persistence, and monitoring configurations.
  • Reliability: A fault with a microservice only affects that microservice, and its consumers. When monolithic applications experience a fault, the entire monolith may fail.
  • Availability: Releasing a new version of a particular microservice requires little to zero downtime, whereas rolling out a new version of a service in the monolithic application normally requires a full restart of the entire monolith.
  • Scalability: Microservices in combination of cloud/containers offers great scalability. 
  • Reliability and Modifiability: A fault with a microservice only affects that microservice, and its consumers, and such can be modifiable easily and independently without impacting others. 
  • Management: Microservices can leverage the agile methodology, where the application development effort is divided across teams that are smaller and work more independently.
Over the years, microservices have evolved so much and most of the customers are trending towards serverless these days. Microservices and DevOps together excel to achieve the desired objectives.
Marlabs has a strong Agile and DevOps practice and more information about the same can be found here.
Quite obviously, the testing strategy that applied to monolithic needs significant directional change when it comes to microservices. Considering that applications built in the microservices architecture deliver highly on functionality and performance, testing has to cover each layer and between the layers of the service and at the same time remain lightweight. However, because of the distributed nature of microservices development, testing can often be a big challenge. Some of the challenges faced are as follows:
  • Availability of all services part of a given app
  • Right set of tools and right amount of testing at each phase of microservices lifecycle
  • Data validation among services and mocking/stubbing synthetic data
  • Availability of dedicated test environments

What are all to be considered as part of the testing strategy for Microservices?

  • Unit Testing: Strategy is to test the behavior of the module/service independently in terms of interactions among objects and inter dependencies specific to a given service. It is recommended to automate as much unit test cases as possible.
  • Component Testing: Strategy is to test each component/service in isolation by replacing external collaborators using test harness and API end points. This also identifies whether microservice has correct and appropriate network configurations.
  • Integration Testing: Strategy is to test how the modules interact with external components by checking the success and error paths through the integration module.
  • End-to-End Testing: Testing in microservices has to be more granular and yet, at the same time test the end-to-end functionality as per the intended business flow putting together all the services together including external interfaces if any.
  • Regression Testing: This is an extension of end-to-end testing, during the development and enhancement phases of microservices, to ensure that the existing functionality of a given microservice and/or a group of microservices is not impacted with the new changes made. It is extremely important to automate the regression set to gain efficiencies.
Marlabs has strong Quality Engineering service offerings and more about the same can be found here.