Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Definitive Guide to Modernizing Applications on Google Cloud

You're reading from   The Definitive Guide to Modernizing Applications on Google Cloud The what, why, and how of application modernization on Google Cloud

Arrow left icon
Product type Paperback
Published in Jan 2022
Publisher Packt
ISBN-13 9781800209794
Length 488 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (3):
Arrow left icon
Jason Marston Jason Marston
Author Profile Icon Jason Marston
Jason Marston
Dheeraj Panyam Dheeraj Panyam
Author Profile Icon Dheeraj Panyam
Dheeraj Panyam
Steve (Satish) Sangapu Steve (Satish) Sangapu
Author Profile Icon Steve (Satish) Sangapu
Steve (Satish) Sangapu
Arrow right icon
View More author details
Toc

Table of Contents (26) Chapters Close

Preface 1. Section 1: Cloud-Native Application Development and App Modernization in Google Cloud
2. Chapter 1: Cloud-Native Application Fundamentals FREE CHAPTER 3. Chapter 2: End-to-End Extensible Tooling for Cloud-Native Application Development 4. Chapter 3: Cloud-Native Architecture Patterns and System Architecture Tenets 5. Section 2: Selecting the Right Google Cloud Services
6. Chapter 4: Choosing the Right Compute Option 7. Chapter 5: Choosing the Right Database and Storage 8. Chapter 6: Implementing a Messaging and Scheduling System 9. Chapter 7: Implementing Cloud-Native Security 10. Section 3: Rehosting and Replatforming the Application
11. Chapter 8: Introducing the Legacy Application 12. Chapter 9: The Initial Architecture on Google Compute Engine 13. Chapter 10: Addressing Scalability and Availability 14. Chapter 11: Re-Platforming the Data Layer 15. Chapter 12: Designing the Interim Architecture 16. Chapter 13: Refactoring to Microservices 17. Section 4: Refactoring the Application on Cloud-Native/PaaS and Serverless in Google Cloud
18. Chapter 14: Refactoring the Frontend and Exposing REST Services 19. Chapter 15: Handling Eventual Consistency with the Compensation Pattern 20. Chapter 16: Orchestrating Your Application with Google Kubernetes Engine 21. Chapter 17: Going Serverless with Google App Engine 22. Chapter 18: Future Proofing Your App with Google Cloud Run 23. Other Books You May Enjoy Appendix A: Choosing the Right Migration Strategy 1. Appendix B: Application Modernization Solutions

The distributed transaction problem

With microservices, each service is a transaction boundary and acts on an aggregate root. Thus, if we place an order using an Order microservice and allocate stock using a Stock microservice, those operations happen in separate transactions. We could of course have the Order microservice call the Stock microservice, but this would mean the two microservices are tightly bound. The Order microservice would depend on the Stock microservice and fail if the Stock microservice were unavailable for some reason. It could also lead to a complex web of interdependent microservices that would not be able to be built, tested, deployed, or scaled independently.

A better solution is for us to use domain events and an event bus. Domain events are a record of something that happened in the business logic of our microservice and contain details of the change (or details of a failed change). In the preceding example, for instance, when we successfully place an...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime