Print Email

Are Microservices Right for You?

The architectural style addresses today’s challenges of agility and scalability of applications

10/14/2015 12:00:33 AM | Application development is constantly changing. Methodologies have evolved from waterfall to agile and many new languages have emerged to improve the productivity of programmers and to better match the opportunities presented by new run-time environments. Application design principles have also changed as each new generation of developer tries to find new ways to solve persistent development challenges like reducing the time to create and deploy applications.

Microservices are a new way to address today’s challenges as they speak to the need for agility and scalability of applications. They also seek to make applications that are easy to develop, test and maintain and are faster to adapt to today’s rapidly changing business environment. The following helps determine if microservices are right for you.

What Are Microservices?

Microservices are an architectural style—a way of designing and implementing applications using independently deployable units of code that communicate to other application components using APIs like REST/HTTP and messaging like IBM MQ Light Service for Bluemix. Teams that create microservices are often used to build and support the code. This is similar to the approach used by organizations embracing agile methods.

Microservices are more than a way of developing an application. This approach aligns with middleware like Web servers and messaging software as well as other technologies and platforms that facilitate the achievement of its goals. Microservices are at the intersection of design principles, approaches and technology.

Why Use Them?

Microservice architecture can help improve the ability to update applications because microservices are easier to understand and maintain. By design, they are smaller, more manageable units, generally built and maintained by the same team. Application scalability is improved when deploying this design approach. This approach matches the services now routinely supplied by cloud platforms like automatically scaling up and down application images based on demand profile.

Developing microservices is more straightforward because breaking down an application into more manageable units means that independent teams can work in parallel, reducing the length of the development timeline. Testing microservices is easier and more reliable because automated testing is the norm in development. This approach is used to ensure that code changes to an individual microservice will not cause other interacting microservices to fail.

How Do You Achieve These Benefits?

People come first—training and early projects that offer the opportunity to learn and make mistakes are important. Since microservices are a style of designing and implementing applications, helping people develop a common design approach under the leadership of an experienced lead designer is important. Good technology choices are also significant. It’s ideal to team with trusted technology partners that provide innovation with stability and maturity. Select a cloud service with support for microservices instead of building your own platform from scratch. Use the programming languages that the team already knows as well as database and other middleware when possible.

What Can Go Wrong?

Microservices is a design approach that requires skilled and experienced developers. Expert designers indicate that a comprehensive set of automated test cases is needed to support microservices-based applications. If automated testing isn’t given the proper focus, the microservices might present stability challenges.

If the overall design isn’t done properly, the interface between the services could create an information barrier and slow the development of the application. Implementation conventions inherent in the architecture of microservice-based applications may introduce problems related to network latency, load balancing and fault tolerance.

Since microservices rely on cloud platform services, the stability of those environments is important. Cloud platform as a service (PaaS) support languages, tools, databases and other middleware, which is in a constant state of change. The frequent change in these platforms can be an obstacle to the stability needed for applications using microservices.

What Technologies?

A useful way to discuss supporting technology is in the context of DevOps steps, which are outlined as follows. DevOps is a collection of concepts, practices and tooling, and team organization that makes it easier to get new releases deployed rapidly.

Plan
Teams need to gather requirements and plan for continuous delivery with frequent code releases. Also, the team should be organized to support all application phases from requirements through monitoring of the running application. This is a tenant of the DevOps approach, which it adopted from the agile “cross-functional team” practice.

Develop
A robust PaaS environment like Bluemix is needed for microservices. Infrastructure as a service is not enough because applications using the microservices approach need platform services incorporating webservers, databases, messaging, security, logging and exception handling. Also needed are scalability services with the ability to start up and end application instances automatically. Automation is also required for provisioning of infrastructure and the software mix required for specific workloads. Microservices are programming language agnostic so Java, JavaScript, Go, PHP, Python, Ruby and others are suitable for developing modules.

It’s important to discuss the mechanisms that microservices employ to use cloud platform services, e.g., for databases the best choices are shared relational or non-relational services. It’s recommended that microservices using a non-relational (non-SQL) approach employ event sourcing as a design method to publish events that indicate a state change. The components of the application subscribe to these events. An event store is often used to hold the events that are employed to coordinate data and keep it consistent between microservices. This design approach is useful when you consider the stateless nature of many microservices. Practical ways are needed to coordinate activities within these loosely coupled microservice entities, and event sourcing is one such method.

Test
Testing is important in general but even more significant for microservices because of the heightened modularity of the application elements. Because of the design, one microservice could have an impact on many components so automated function and system integration testing is imperative. When testing is done, not only is the application tested but all the other related functions are, e.g., building and testing Docker images and updates to the registry. Docker uses containers to combine software in a complete file system that contains everything needed to run including code, runtime, system tools, system libraries and other components.

Release
Release involves deploying the application to the target environment. Automation supplied by the cloud platform plays a key role here. While running, the application’s supported by software that automatically handles scaling so peak workloads are automatically handled. Monitoring and management software is used to ensure that the application is available and meeting performance objectives.

What’s Next?

If you’re ready to try a new way to develop applications that aligns with DevOps and agile development approaches and makes continuous development possible then microservices is a good choice.

Some analysts caution to start small, as the learning curve for microservices is steep and the skill requirements are diverse. Generally, don’t select a mission critical application as your first microservices-based application. Picking an appropriate pilot effort is important.

Leveraging resources will help lessen the start-up risk. Mitigation could be hiring a skilled microservices leader or having a services team from a trusted partner lead the first project.

Making use of an environment like Bluemix, which is built for microservices, is also important. Bluemix has a number of resources that can help. See the “More Information” box.



More Information

Some useful resources that leverage the facilities of Bluemix will help with your microservices journey:
  1. IBM developerWorks general/how-to article
  2. IBM developerWorks e-commerce sample application
  3. Comprehensive and detailed IBM Redbooks “Microservices from Theory to Practice: Creating Applications in IBM Bluemix Using the Microservices Approach”

Joseph Gulla is the IT leader of Alazar Press, a publisher of children’s literature.
Joseph Gulla is the IT leader of Alazar Press, a publisher of children’s literature. - See more at: http://destinationz.org/Mainframe-Solution/Systems-Administration/Virtualization-Today#sthash.1kYaZAX1.dpuf

Please sign in to comment.

Sign In




Join Now!
Monitor Mainframe Problems

Monitor Mainframe Problems

Resources allow different levels of control to meet different needs.

Read more »

Certifying Mainframers

Certifying Mainframers

Robert Morris University is among the IBM z Systems Academic Initiative member schools to offer on-site and online certificate and degree programs.

Read more »