Skip to main content

Über dieses Buch

Learn what a microservices architecture is, its advantages, and why you should consider using one when starting a new application. The book describes how taking a microservices approach from the start helps avoid the complexity and expense of moving to a service-oriented approach after applications reach a critical code base size or traffic load.

Microservices from Day One discusses many of the decisions you face when adopting a service-oriented approach and defines a set of rules to follow for easily adopting microservices. The book provides simple guidelines and tips for dividing a problem domain into services. It also describes best practices for documenting and generating APIs and client libraries, testing applications with service dependencies, optimizing services for client performance, and much more. Throughout the book, you will follow the development of a sample project to see how to apply the best practices described.

What You Will Learn:Apply guidelines and best practices for developing projects that use microservicesDefine a practical microservices architecture at the beginning of a project that allows for fast developmentDefine and build APIs based on real-world best practicesBuild services that easily scale by using tools available in most programming languagesTest applications in a distributed environmentWho This Book is For:

Software engineers and web developers who have heard about microservices, and want to either move the project/applications they work on to a service-oriented environment, or want to start a new project knowing that building services helps with ease of scaling and maintainability. The book is a reference for developers who have a desire to build software in smaller, more focused and manageable chunks, but do not know how to get started.



Service Oriented Architectures


Chapter 1. Microservices: The What and the Why

This first part of the book discusses what we mean when we talk about service-oriented architectures in general, and microservices in particular. We will spend some time explaining the benefits, as well as touching on potential pitfalls to be avoided, involved in adopting this architectural style.
Cloves Carneiro, Tim Schmelmer

Chapter 2. Rules of Engagement

In this chapter, we'll go over what we call our "Rules of Engagement,” which is a set of principles and best practices we find valuable to follow to ensure an efficient microservices environment. It would be correct to state that this entire book is a collection of what we consider best practices; but the principles we outline in this chapter are a foundation of many of the tools and design ideas we will discuss throughout the book. We have six Rules of Engagement for successfully building applications in a microservices environment. Those rules are based on our years of experience, and are phrased from a developer's point-of-view.
Cloves Carneiro, Tim Schmelmer



Chapter 3. Partitioning Your Business into Services

This chapter presents some guidelines for composing a larger business application out of a set of microservices. We start by explaining some general criteria by which to partition a software system into a set of core services. We then explain how these core services can be composed into one or more layers of higher-level services, which eventually are the building blocks for the entire application. Finally, we will apply some of these generic principles to begin building our example bookstore application.
Cloves Carneiro, Tim Schmelmer

Chapter 4. Designing Your APIs

In this chapter we will start explaining in detail how APIs should be designed. We will define what APIs are and will describe a set of characteristics that we think make up a good API, using what you now recognize as our opinionated approach.
Cloves Carneiro, Tim Schmelmer

Chapter 5. Defining APIs

This chapter will introduce approaches and tools for describing your services' APIs in a machine-readable format. First we will introduce the concepts behind Interface Definition Languages (IDLs) and will briefly introduce a number of such languages. Next, we will introduce the Swagger IDL framework and its associated tool chain in more detail, and we will conclude the chapter by illustrating how to use Swagger to define the APIs of one of the services in our bookstore application.
Cloves Carneiro, Tim Schmelmer

Chapter 6. Consuming Your APIs

The size ofclient-side libraries, and the features included in them, can vary widely. We will discuss the pros and cons of including various responsibilities, like exposing network errors, or making service calls, validating service responses, caching expensive API calls, handling errors, and alarming when things go wrong.
Cloves Carneiro, Tim Schmelmer

Chapter 7. Optimizing Your APIs

This chapter establishes guidelines and rules of thumb for designing and implementing APIs with a special focus on performance and maintainability. The majority of the techniques described here can be used to address and—if applied at design time—avoid performance degradation, while others can help to optimize overall service-related implementation and support costs.
Cloves Carneiro, Tim Schmelmer

Development and Deployment


Chapter 8. Development Environment and Workflow

Software engineering in a microservices environment requires a specific mindset, as well as tools to make development and deployment simple. Any friction caused by a high number of deployment units will put a damper on overall productivity.
Cloves Carneiro, Tim Schmelmer

Chapter 9. Testing with Services

Automated testing is crucial in any software development project. Manually testing a system built from microservices is tedious and error-prone. In some cases, it is well-nigh impossible to test all the possible failure modes by simply exercising the application through exploratory tests executed by human QA personnel. Automating these tests will save hours of time, and it will prevent those bugs that could cost your business millions in profits.
Cloves Carneiro, Tim Schmelmer

Chapter 10. Deploying and Running Microservices

Being able to deploy a new service easily should be a goal of any company that embraces microservices. While there is much more risk involved in each deployment of a monolithic application, the processes involved with getting it deployed are much simpler than deploying small, but highly connected and interdependent services. In this chapter we will show that not only should new services be built, deployed, and configured in an automated and repeatable way, but that they need to be staged prior to releasing, in support of the overall stability and availability of your business during development efforts.
Cloves Carneiro, Tim Schmelmer

Putting Everything Together


Chapter 11. Polyglot Services

In this chapter, we lay out why applying uniformity of programming languages, data stores, or other technology components across all the services in your microservices application might not be the best choice.
Cloves Carneiro, Tim Schmelmer

Chapter 12. Single-Client Application—Mobile and Web

Your microservice-powered application will ultimately be displayed to actual people using a web browser or mobile devices; we call those customer facing applications. In order to function well, those applications need to make calling each service they depend on a trivial task. We know that many developers have been exposed only to the ideas and concepts behind the microservices architecture, and still have very little actual exposure to how all the pieces fit together in practice.
Cloves Carneiro, Tim Schmelmer

Chapter 13. Monitoring Your Services

As you've seen throughout this book, embracing a microservices architecture will mean that your production environment has a large number of deployable units, which you will be ultimately responsible for making sure are functioning as expected, based on your requirements. As with any type of software, you will want to know when issues are happening, ideally before they start to affect your company's business metrics, such as user visits, signups, or sales. In some cases, it could take hours—or days—to find out that one small piece of software is malfunctioning, and you don't want to discover production issues after your users do.
Cloves Carneiro, Tim Schmelmer

Chapter 14. Operational Excellence with Microservices

Successfully developed and launched software spends the vast majority of its lifecycle in a state where it needs maintenance and support. In an environment where the number of services can easily outnumber the number of developers in your engineering organization, it is business-critical that operational support runs efficiently and effectively, without impacting the productivity and retention of your engineering staff.
Cloves Carneiro, Tim Schmelmer


Weitere Informationen

Premium Partner

BranchenIndex Online

Die B2B-Firmensuche für Industrie und Wirtschaft: Kostenfrei in Firmenprofilen nach Lieferanten, Herstellern, Dienstleistern und Händlern recherchieren.



Best Practices für die Mitarbeiter-Partizipation in der Produktentwicklung

Unternehmen haben das Innovationspotenzial der eigenen Mitarbeiter auch außerhalb der F&E-Abteilung erkannt. Viele Initiativen zur Partizipation scheitern in der Praxis jedoch häufig. Lesen Sie hier  - basierend auf einer qualitativ-explorativen Expertenstudie - mehr über die wesentlichen Problemfelder der mitarbeiterzentrierten Produktentwicklung und profitieren Sie von konkreten Handlungsempfehlungen aus der Praxis.
Jetzt gratis downloaden!