Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Microservice Patterns and Best Practices
Microservice Patterns and Best Practices

Microservice Patterns and Best Practices: Explore patterns like CQRS and event sourcing to create scalable, maintainable, and testable microservices

Arrow left icon
Profile Icon Vinicius Feitosa Pacheco
Arrow right icon
zł59.99 zł158.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.7 (19 Ratings)
eBook Jan 2018 366 pages 1st Edition
eBook
zł59.99 zł158.99
Paperback
zł197.99
Subscription
Free Trial
Arrow left icon
Profile Icon Vinicius Feitosa Pacheco
Arrow right icon
zł59.99 zł158.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.7 (19 Ratings)
eBook Jan 2018 366 pages 1st Edition
eBook
zł59.99 zł158.99
Paperback
zł197.99
Subscription
Free Trial
eBook
zł59.99 zł158.99
Paperback
zł197.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Microservice Patterns and Best Practices

The Microservice Tools

Some issues are always questionable or controversial when it comes to choosing a microservice stack. Much is discussed regarding the performance, practicality, cost, and scalability. Most of what is discussed is background views; many of these are valid opinions and many others not so much.

Obviously, the history of the development team should be considered in any technical decisions regarding the stack and implementation. However, at times, it is necessary to leave some comfort zones behind to develop a product. A comfort zone can be a programming language, a protocol, a framework, or a database, and they can limit a developer's ability to move at speed. The developed application then becomes more and more scalable.

In this chapter, you will be working on points that should be examined for internal discussions and development teams. In the end...

Programming languages

Discussing programming languages is something that can be controversial, primarily because many developers tackle programming languages in a great hurry. However, programming languages should be seen as what they really are, a working tool. Every tool has a specific purpose and programming languages are no different.

It is just an analysis focused on our business, the news portal, which we will use to get to the point of how to select a language.

A big plus point for microservices is the heterogeneity of applications. In other words, it is not necessary to think of a single stack to apply to all business areas. We can thus define each microservice stack that applies, including when it comes to a programming language.

Basically, any programming language that meets the internet can be used in microservices. The difference is due to the requirements and domain...

Microservice frameworks

When dealing with frameworks, we have to think that because of the technological diversity of our frameworks, we will have at least three frameworks instead of one to keep our ecosystem.

Of course, we could have kept all microservices in the same stack. However, searching for the best overall performance for each domain, we opted for a more plural stack.

Obviously, at first, the impression is that the complexity will be higher than expected. But this type of complexity is matched by the performance most suitable for each case.

Basically, we chose three different programming languages to use on our news portal. Python, Go, and C# are those languages. It is time to think about which frameworks we will use for each of these languages, thus taking another step in shaping our development stack for each microservice.

...

Binary communication – direct communication between services

Much is discussed about microservices communication; topics such as protocols, layers, types, and package sizes are widely discussed when it comes to the subject.

The point is that communication between microservices is the most critical topic for project success. It is very clear that the amount of positive factors increases with microservices architecture, but how to make the communication that does not encumber the performance of a product to the end user is the key point.

It does not help that all the practicalities of developing and deploying the product do not scale or the end user experience is compromised.

There is a lot of literature and study material on the subject, but the challenge still remains. And oddly enough, even with all the available material, making mistakes in this part of the project...

Message broker – Async communication between services

In the previous topic, we talked about synchronous communication between microservices using binary and alternatives to REST. This topic will deal with the communication between microservices using message broker, that is, a messaging system with a physical element, a communication layer, and a message bus.

With messaging systems, it is impossible to reproduce the Death Star. The design of the Death Star in a more robust application would be something like the following:

The diagram of a messaging system is totally different, similar to the one shown in the following:

The message bus can be used for both synchronous and asynchronous communication, but certainly, the major point of emphasis of the message bus is in asynchronous communication.

You may wonder, if the messaging diagram is simpler and you can use this type...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • •Get to grips with the microservice architecture and build enterprise-ready microservice applications
  • •Learn design patterns and the best practices while building a microservice application
  • •Obtain hands-on techniques and tools to create high-performing microservices resilient to possible fails

Description

Microservices are a hot trend in the development world right now. Many enterprises have adopted this approach to achieve agility and the continuous delivery of applications to gain a competitive advantage. This book will take you through different design patterns at different stages of the microservice application development along with their best practices. Microservice Patterns and Best Practices starts with the learning of microservices key concepts and showing how to make the right choices while designing microservices. You will then move onto internal microservices application patterns, such as caching strategy, asynchronism, CQRS and event sourcing, circuit breaker, and bulkheads. As you progress, you'll learn the design patterns of microservices. The book will guide you on where to use the perfect design pattern at the application development stage and how to break monolithic application into microservices. You will also be taken through the best practices and patterns involved while testing, securing, and deploying your microservice application. At the end of the book, you will easily be able to create interoperable microservices, which are testable and prepared for optimum performance.

Who is this book for?

This book is for architects and senior developers who would like implement microservice design patterns in their enterprise application development. The book assumes some prior programming knowledge.

What you will learn

  • • How to break monolithic application into microservices
  • • Implement caching strategies, CQRS and event sourcing, and circuit breaker patterns
  • • Incorporate different microservice design patterns, such as shared data, aggregator, proxy, and chained
  • • Utilize consolidate testing patterns such as integration, signature, and monkey tests
  • • Secure microservices with JWT, API gateway, and single sign on
  • • Deploy microservices with continuous integration or delivery, Blue-Green deployment

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jan 31, 2018
Length: 366 pages
Edition : 1st
Language : English
ISBN-13 : 9781788471206
Concepts :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want

Product Details

Publication date : Jan 31, 2018
Length: 366 pages
Edition : 1st
Language : English
ISBN-13 : 9781788471206
Concepts :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just zł20 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just zł20 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 617.97
Microservices Development Cookbook
zł221.99
Cloud Native Development Patterns and Best Practices
zł197.99
Microservice Patterns and Best Practices
zł197.99
Total 617.97 Stars icon

Table of Contents

14 Chapters
Understanding the Microservices Concepts Chevron down icon Chevron up icon
The Microservice Tools Chevron down icon Chevron up icon
Internal Patterns Chevron down icon Chevron up icon
Microservice Ecosystem Chevron down icon Chevron up icon
Shared Data Microservice Design Pattern Chevron down icon Chevron up icon
Aggregator Microservice Design Pattern Chevron down icon Chevron up icon
Proxy Microservice Design Pattern Chevron down icon Chevron up icon
Chained Microservice Design Pattern Chevron down icon Chevron up icon
Branch Microservice Design Pattern Chevron down icon Chevron up icon
Asynchronous Messaging Microservice Chevron down icon Chevron up icon
Microservices Working Together Chevron down icon Chevron up icon
Testing Microservices Chevron down icon Chevron up icon
Monitoring Security and Deployment Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.7
(19 Ratings)
5 star 52.6%
4 star 10.5%
3 star 5.3%
2 star 21.1%
1 star 10.5%
Filter icon Filter
Top Reviews

Filter reviews by




Enzo Feb 14, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I really like the authors writing style and approach to explain this complex topics. He's doesn't try to fly high, looking at the topics from far away and pretending that with theoretical knowledge is enough on Software Engineering. Instead, he takes the time to walk every step of the software design and architecture process, and gives you the details you'll need when you face common problems. Even more, he gives you common sense-based reasons to use the patterns he proposes and why the 'best practices' are considered such.I had previous experience on Software Engineering, so I can't speak from the point of view of someone that is new to this topics. However, I didn't have any experience with Microservices and when I read the book all the topics were correctly presented for my level of knowledge.
Amazon Verified review Amazon
Claudio Cardozo Feb 11, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
It's really a complete book covering integration and design patterns, a clear teaching and understanding about microservices and mainly dealing with high transactionals volumes . A lot of tips and warnings when implementing a solution microservices based. When talking about design patternsis possible "see" the experience and the care with the detalis of the author how to better define a simple to complex system or ecosystem. If you are a system architect, read it, if not, read! And it goes beyond , giving us an approach about tools, techniques, languages, etc., is awesome!
Amazon Verified review Amazon
Amazon Customer Apr 27, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great book.
Amazon Verified review Amazon
Pablo Gumilla Feb 23, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
As someone who has worked with microservices before, I can tell this book is a must-have for anyone who's starting with microservices, or wants to switch from a monolithic application, or simply wants to know more about microservices and the right way to implement them. As the author states in the book, when microservices are not correctly implemented, they can be a nightmare, which is why it's so important to follow the right patterns and apply the correct design.The book is really easy to read and it goes straight to the point, very practical and useful. But at the same time, it covers every step of the way needed for a good and robust architecture, starting from a very simple example.
Amazon Verified review Amazon
Emanuel Barrera Aug 16, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
As a beginner in the microservices world, I wanted to deepen my knowledge so that I could apply it in the company I work for. After reading this book, I acquired a critical thought that allowed me to spot some warnings and enhancements that could be applied on the way we build and manage microservices. Really good examples, I liked the way the author explains.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.