Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Microservices with Django

You're reading from  Hands-On Microservices with Django

Product type Book
Published in May 2024
Publisher Packt
ISBN-13 9781835468524
Pages 278 pages
Edition 1st Edition
Languages
Author (1):
Tieme Woldman Tieme Woldman
Profile icon Tieme Woldman

Table of Contents (18) Chapters

Preface 1. Part 1:Introducing Microservices and Getting Started
2. Chapter 1: What Is a Microservice? 3. Chapter 2: Introducing the Django Microservices Architecture 4. Chapter 3: Setting Up the Development and Runtime Environment 5. Part 2:Building the Microservices Foundation
6. Chapter 4: Cloud-native Data Processing with MongoDB 7. Chapter 5: Creating RESTful APIs for Microservices 8. Chapter 6: Orchestrating Microservices with Celery and RabbitMQ 9. Chapter 7: Testing Microservices 10. Chapter 8: Deploying Microservices with Docker 11. Part 3:Taking Microservices to the Production Level
12. Chapter 9: Securing Microservices 13. Chapter 10: Improving Microservices Performance with Caching 14. Chapter 11: Best Practices for Microservices 15. Chapter 12: Transforming a Monolithic Web Application into a Microservices Version 16. Index 17. Other Books You May Enjoy

Transforming a Monolithic Web Application into a Microservices Version

Now that you know the possibilities of microservices, you probably have existing monolithic web applications that you would like to rebuild to better meet user and stakeholder requirements. For example, that reporting application where the user has to wait minutes until a PDF report is ready. Or that credit check application that consults an external Application Programming Interface (API) for credit data that makes the user have to wait minutes before he can continue.

Such applications are good candidates for rebuilding. Fortunately, rebuilding is a relative term here and amounts more to transformation, where you reuse the existing code as much as possible.

In this chapter, we’ll explore an approach for transforming a monolithic web application into a microservices version. By the end, you’ll know how to decompose a monolithic web application and design it into a microservices version. You&...

Introducing the transformation approach

The steps of the transformation approach are very similar to the steps of standard development methods, which makes sense because both cases involve application development. So, as with standard development methods, we start with determining requirements and end with deploying the application:

  1. Determining requirements
  2. Decomposing the monolith
  3. Designing the microservices
  4. Selecting the technology
  5. Creating the data foundation
  6. Developing the microservices
  7. Testing and deploying

Actually, the decomposition and development steps are the only ones that are substantially different. The decomposition step because we assume an existing application. And the development step because we re-use existing code as much as possible.

This stepwise presentation might suggest a waterfall approach where we perform each step after the other. That’s fine if that suits your situation, but it certainly doesn’t have...

Implementing the approach step by step

Finding candidate monolithic Django applications to transform is relatively simple: Look for applications requiring users to wait until one or more steps are completed and where the steps are independent. The Discount Claim app is such an application because the user experience freezes while the app sends a Slack message and confirmation email and writes to the log:

Figure 12.1 – The Discount Claim monolithic app with synchronous tasks

Figure 12.1 – The Discount Claim monolithic app with synchronous tasks

Now, look for such an application in your practice, and if you find one, start determining its requirements as we’ll look over next.

Determining requirements

Since we’re going to rebuild an existing application, this is an ideal moment to ensure the requirements for that application are still valid. Maybe requirements changed over time due to customer experience or business developments. So, meet up with stakeholders, users, and the Product Owner. And draw...

Summary

This chapter taught us the steps for transforming an existing monolithic application into a microservices version. We started with determining the requirements and finished with deploying the microservice application.

With this, you master an approach to effectively and efficiently re-engineer your existing Django applications to improve user experience and meet modern application requirements.

Next, it’s your turn to put your knowledge into further practice. Enjoy the Django microservices ride and amaze the world with great applications!

lock icon The rest of the chapter is locked
You have been reading a chapter from
Hands-On Microservices with Django
Published in: May 2024 Publisher: Packt ISBN-13: 9781835468524
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 $15.99/month. Cancel anytime}