1. https://appdevelopermagazine.com/programming
  2. https://appdevelopermagazine.com/why-microservices-are-so-important/
11/7/2016 12:06:39 PM
Why Microservices are so important
SOA,Reusable Code,Microservices,MapR
https://news-cdn.moonbeam.co/Why-Microservices-Are-Important-App-Developer-Magazine_rohuoiry.jpg
App Developer Magazine
Why Microservices are so important

Programming

Why Microservices are so important


Monday, November 7, 2016

Jim Scott Jim Scott

Having been a software engineer for nearly 20 years I have an appreciation for what is important when it comes to creating great software. One of the most important things that is not well understood by non-engineers is that the development process is equal parts artistry and logic. I see software architecture to be much like artistry. This is because there is no single way to create a working application, but there are certain approaches that make the final work much more beautiful. While the measure of *beauty is subjective*, and can change over time, it can certainly be seen in many facets of a software solution to support any business. Cleanly formatted code, easy to read code, good documentation, and well-structured for reusability are among those which are considered some of the most important and valuable.

The most subjective of all of those examples is what is considered *well-structured for reusability*, and it is the most difficult to attain. As software is written and maintained over time, it will get constantly refactored in a number of ways. Typically the refactorings will be to simplify the code, implement (new)standards or even integrating new code. Refactoring for reusable / decoupled software components provides the most flexibility and impact to most organizations. Often time code that looks reusable gets broken out into libraries. This is typically more of an art than a science. Breaking code into libraries does not dictate how code is deployed, it is only an attempt to allow multiple applications to use the same code with a single point for maintenance. Deploying software which is decoupled from other components is the more important aspect of this approach. Instead of just separating code into reusable libraries, we can enable them to interact with one another via inter-process communication. A Service Oriented Architecture (SOA) is not a new approach- it has been popularized in the last 10-15 years-and has been reinvigorated with new concepts like microservices.

Microservices takes SOA a step further by breaking every component into effectively single-purpose applications. These services are considered micro by virtue of only performing one activity. This model delivers an abundance of benefits for building and deploying applications.

For example, let’s look at a business with multiple end-user applications that require an address lookup. The *traditional approach for reusable code* would likely be structured where the address lookup functionality would have been put into a library and all applications that depend on it would pull it into their project. That code would then be executed in-process for each application. If there was a bug in that code, in order to fix it, the code would get changed and the library would be released. Then every application depending on that code would have to be rebuilt and redeployed in order to get that bug fix into production. Total time to get the fix in production can be rather extensive as it usually depends on the criticality of the issue and the release schedules of those applications. Following a *microservices model for reusable code*, that microservice would be fixed and redeployed, and all the applications which depend upon it would be unimpacted; they would leverage the microservice via a decoupled communication mechanism instead of depending on the code in-process. The time to deploy a fix for this model is dramatically simpler than the traditional.

Simpler deployment for fixing software is valuable, but another big benefit to this model is that of rapid innovation. The faster that applications can be built, the quicker new revenue streams can be realized. Being able to quickly create new applications and get them deployed is a huge benefit.

While microservices are an amazing idea, they don’t typically reach their full potential until combined with a few other very important technologies. To make the most of a microservice deployment model consider deploying microservices inside of containers as they enable services to be quickly scaled due to a simplified deployment model as well as delivering service isolation. After preparing microservices inside containers think about deploying those containers by leveraging a global resource manager like Apache Mesos. Finally, to get the most out of your microservices be sure to leverage a Converged Data Platform for all required data access needs through standard APIs (files, database, and streaming).

You now have a linearly scalable and flexible infrastructure that becomes much simpler to use, deploy, and maintain. Developers and administrators no longer need to worry about where to run a service. Sit back and relax knowing that the only worry left is to decide how many instances need to be deployed to meet your needs. There is no need to re-architect software to figure out how to scale to meet demand. Like any new technology, these technologies take a little time to understand and learn, but the sooner you get started the sooner you will be able to innovate within your business.



Read more: http://www.mapr.com/
This content is made possible by a guest author, or sponsor; it is not written by and does not necessarily reflect the views of App Developer Magazine's editorial staff.

Subscribe to App Developer Magazine

Become a subscriber of App Developer Magazine for just $5.99 a month and take advantage of all these perks.

MEMBERS GET ACCESS TO

  • - Exclusive content from leaders in the industry
  • - Q&A articles from industry leaders
  • - Tips and tricks from the most successful developers weekly
  • - Monthly issues, including all 90+ back-issues since 2012
  • - Event discounts and early-bird signups
  • - Gain insight from top achievers in the app store
  • - Learn what tools to use, what SDK's to use, and more

    Subscribe here