Designing Microservices Using Django: Structuring, Deploying and Managing the Microservices Architecture with Django
- Length: 332 pages
- Edition: 1
- Language: English
- Publisher: BPB Publications
- Publication Date: 2020-04-15
- ISBN-10: 9389328799
- ISBN-13: 9789389328790
- Sales Rank: #4554678 (See Top 100 Books)
A step-by-step that will help you build Microservices architecture using Django and Python
Key Features
- Understand in-depth the fundamentals of Microservices
- Learn how to create and use Django APIs
- Use web technology such as Nginx, Gunicorn, UWSGI, and Postgresql to deploy a Django project
Description
Microservices architectures solve the multiple problems of software architecture. Django is a full-stack development framework, written in python. This book includes everything necessary for web application development; from the user views to the information storage: model, persistence, relationships, controllers, forms, validations, rest API and a very useful back office. Furthermore, the book will show how to build production-ready microservices. It will help you create restful APIs and get familiar with Redis and Celery. Towards the end, the book will show how to secure these services and deploy these microservices using Django. Lastly, it will show how to scale our services.
What will you learn
- Understand the basics of Python, Django, and Microservices
- Learn how to deploy Microservices with Django
- Get familiar with Microservices Architecture – Designing, Principles, and Requirements
- Implement Asynchronous task, JWT API Authentication and AWS Serverless with Microservice architecture
Who this book is for
This book is for those beginners who want to make their careers in software development. It starts from the basics of python and Django, takes the reader to the Microservices architecture.
Cover Page Title Page Copyright Page Dedication About the Author Acknowledgements Preface Errata Table of Contents 1. Basics of Python Structure Objective Introduction of Python programming language Definition of variables, expressions, and statements Statements Operations on strings Functions Python type conversion functions User-defined functions Execution flow of program Scope of the variable “if” conditional statement with nested conditions Loops The while loop The range function The for loop Advanced data types of Python List List built-in functions Tuple Dictionaries Dictionaries built-in functions Perform looping on the dictionary Set Built-in method of Set Additional topic – PEP8 style guide for Python code Naming conventions Python indentation Maximum line length Block and inline comments Document strings Imports Connection closing List comprehension Iterators Generators Conclusion Questions 2. Major Pillars of OOPS with Python Structure Objective Introduction to object-oriented programming (OOP) language Basic idea of object What is class? Decorators in Python Introduction of class method and static method in Python Inheritance Single inheritance Multiple inheritance Multilevel inheritance Use of super() function Encapsulation Polymorphism Method overloading Method overriding Abstraction Abstract class Conclusion Questions 3. Getting Started with Django Structure Objective Basics of Django Django architecture Django execution and basic commands Django program execution flow How Django handles requests HTTP request Create the view file and configure user defined URL URL understanding Basics of Loggers and available logger types Loggers Handler Filters Formatters Types of Loggers Logger Implementation Define template in Django Conclusion Questions 4. API Development with Django Structure Objective The basic idea of API Create an app in Django Connect Django with database Function-based and class-based views Function-based views Class-based views Postman tool description Create function-based views Create class-based views Conclusion Questions 5. Database Modeling with Django Structure Objective The Django ORM Django shell Django database modeling Connect Django with various databases Django connectivity with PostgreSQL Django connectivity with SQLite Django connectivity with MySQL Create app with model Access data through shell Insert query Select query Update query Delete query Conclusion Questions 6. First Django API Deployment on Web Structure Objective The introduction of web technologies uWSGI NGINX Apache Gunicorn Supervisor Use case of Supervisor API deployment on web servers with Apache Django loggers configuration and use case Conclusion Questions 7. Django Project Deployment on Various Web Servers Structure Objective New Django project creation and its overview PostgreSQL database connectivity Model file creation through Django ORM Get and post request creation with ORM queries Loggers implementation in the project Deploy Django with NGINX, PostgreSQL, and uWSGI Deploy Django with NGINX, PostgreSQL, Gunicorn, and Supervisor Conclusion Questions 8. What are Microservices Structure Objective The introduction of the microservices Monolithic vs. Microservices Monolithic Microservices Some important characteristics of microservice The microservices way and its benefits In the microservices speed of changes In the microservices safety of changes The way of microservices Scalability in microservices Microservices pitfalls Conclusion Questions 9. Designing Microservice Systems Structure Objective Approach to microservices Service Solution Process Organization Culture When working on the all designing element together Follow the standardized process or set a standard for process The designing process of microservices Setting up the optimization goals Principles of development Sketch the system design The designer of the microservices system Important points for establishing a foundation Goals and principles Goals for the microservices way Reduce the system cost Increase release speed Improve the system resilience Enable the visibility Operating the principles Shared capabilities Hardware services Management of the code, it’s testing and deployment Data stores Coordination between the services Security and identity Way to host Service designing parameters and boundaries Domain-driven design Context should be bounded Smaller is better API design for microservices Message-oriented Hypermedia-driven Data and microservices Asynchronous message-passing and microservices Independent deployability Microservice architecture is a product of its time Security Monitoring and alerting Conclusion Questions 10. Service Authentication Structure Objective Authentication Authorization Authentication and authorization with Django Table configuration with Django admin Authenticate the services HTTP or HTTPs based Session and cookies based Token based Conclusion Questions 11. Microservices Deployment with Django Structure Objective Flow figure for microservice architecture Data flow and description of used API Service name and its purpose User service Folder architecture and code Database connection code API code API request and response description userregistartion API userlogin API userinfo API Product service Folder architecture and code Database connection code API code Shipment service Folder architecture and code Database connection code API code API request and response description Payment service Folder architecture and code Database connection code API code API request and response description Microservices deployment with Django Microservice architecture flow figure Conclusion Questions 12. JWT Auth Service Structure Objective Introduction of JSON Web Tokens (JWT) Applicable scenarios for JWT implementation Structure of JWT token Header Payload Signature JWT working flow JWT deployment with Django APIs request and response Conclusion Questions 13. Asynchronous Tasks Structure Objective Introduction of asynchronous task Why we need asynchronous task? Overview of Celery, RabbitMQ, and Redis Celery Flow case Use case RabbitMQ Flow case Redis Use case of Redis Installation and basic configuration of Celery with Django Deploy Django with Celery and RabbitMQ Deploy Django with Celery and Redis Tasks distribution and scheduling Task scheduling Use case Schedule the tasks in Ubuntu OS Conclusion Questions 14. AWS Serverless Structure Objective Introduction of AWS Serverless AWS API Gateway AWS Lambda RDS AWS DynamoDB Sample code with API Gateway and Lambda Serverless microservice architecture on AWS Django microservice architecture on AWS AWS EC2 service Django microservices architecture on AWS Conclusion Questions 15. How to Adopt Microservices in Practice Structure Objective Guidelines for creating the solution architecture How to introduce microservice in the organization? What are the best practices and processes for microservices? What should be the count of new features or bug fixes in the single release? How can we track that our project is completely transformed into microservice? Is it necessary to write all microservices code in the same programming language? What technologies are available for microservices? Conclusion
Donate to keep this site alive
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.