newman_beesMicroservices is one of the great trends in Software Engineering together with DevOps, and some experts say that both are essential for a modern software company. This is not hard to believe, since both are practices that are designed to offer greater agility and operational efficiency for the enterprise.

Lean Magazine obtained an interview with Sam Newman, the author of the very popular book “Building Microservices: Designing Fine-Grained Systems”.

Sam Newman started fairly conventionally. Interested in computers as a kid, he went on to study Software Engineering at university and found himself working withFortran 77 in his first job at an ESA subcontractor. It was, as he expresses it, “an excellent start to my working life”.

“After a few years I ended up at ThoughtWorks, and sort of fell into the world of build automation, CI & CD,” says Newman. “This led to a focus in trying to understand how to help clients ship software more quickly. After a while I realised that often the fundamental limitation to fast and safe delivery is the architecture of the systems themselves. Over time this led me to looking into different architectural approaches which could help in this area.”

Writing the book

The idea of writing a book had been around for a long time. Originally, Newman had planned to do one on CI & CD, but that didn’t come to pass. He then wrote a short ebook for O’Reilly, Lightweight Systems for Realtime Monitoring. Around two years ago, he felt that he had the confidence to handle a larger project. Or as an editor put it: “Just do that eight times and you’ll have a book”.

“It was clear at this time that there was a large amount of nuance in doing microservices well, and a whole lot of caveats besides,” says Newman. “I developed a workshop on the topic with James Lewis, and I also had a number of different conference talks on the subject. Feedback from audiences was that the information I had was useful to share with the community, and it felt obvious to try and pull a book together on the topic.”

To Sam Newman, the greatest advantage of microservices is that they allow for independent deployability of services, which in turn allows for faster shipments of new features. They also allow you to align service ownership to teams, empowering them to make their own decisions on how that service evolves.

“This in turn can allow for the ownership of your system architecture, and your team structure, to better mirror the business itself,” says Newman. “It’s been observed by many that the microservice approach is one that is sympathetic to Conway’s Law, and that uses this phenomenon to benefit the organization as a whole.”

Sam Newman on DevOps

“Neil Ford has called microservices ‘the first post-DevOps architecture’. What he means is that microservices aren’t really practical without some of the advances brought in by the DevOps movement. Specifically, to manage the number of moving parts involved in even modest microservice systems a high degree of automation is required around deployment and testing.

Allowing teams to own services also often leads to those teams deciding when and how to deploy their applications, and even embracing the concept of team-managed infrastructure. This requires close collaboration between development and operations people, and organizations like Netflix and REA have moved to the model of a small number of operations people providing central tooling and consultancy to enable teams to handle their own service operations.”

Small steps & careful observation

Sam Newman has a set of advice for organizations that decide to change their monolithic architecture to a microservice-based one. Firstly, they need to understand what it is they are trying to achieve. Secondly, they should put a process in place where they can measure where they are against that goal. As they start their transition to microservices, they should set up periodic reviews to confirm whether or not these are helping the organization to achieve its goals. For example, if the goal is to have faster time to market, then cycle time should be tracked and monitored during the transformation.

“As with any change as fundamental as this, make small, incremental steps, observe the results, and decide how to do things differently next time,” says Newman. “So start with one or two services at the beginning, get them deployed into production, and sit with them for a while. Also, be prepared to get things wrong and be surprised by things. Read up on other people’s experiences, go to your local microservices meetup and chat to your peers, and don’t be afraid to try new things.”

To conclude, Sam Newman shares some thoughts about the evolution of microservices and the global software community – where we are at, and where we are going.

“At the moment, we are riding high in the hype cycle. We have lots of microservice meetups, conferences, and yes, books! I think in time this will pass. Microservices will hopefully just be seen as a way to approach the design of a system. It’ll be a tool that we can reach for when appropriate.

I think the other thing that needs to happen is that we need a new generation of tools that are built to address some of the challenges of the microservices space. Some of the challenges in microservices are harder than they need to be – I’m hopeful that the community will continue to innovate and come up with smart solutions that make this approach more applicable to all sorts of organizations.”

Three misunderstandings regarding microservices

1. Microservices are easy.

“They aren’t. With microservices, you are implementing a distributed system, and with this comes a host of challenges that need to be dealt with. Concepts like business transactions, monitoring and testing can become more complex.”

2. You can just offload these issues to platforms.

“Some platforms can help, but they won’t solve all the issues you will face.”

3. Microservices is the only way to be successful.

“They are a technique that has been shown to work, but there are plenty of examples of organizations that have built successful businesses using monolithic systems – Etsy are a great example.”

Leave a Comment

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