Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Cloud Native Python

You're reading from   Cloud Native Python Build and deploy resilent applications on the cloud using microservices, AWS, Azure and more

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781787129313
Length 374 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Manish Sethi Manish Sethi
Author Profile Icon Manish Sethi
Manish Sethi
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Introducing Cloud Native Architecture and Microservices 2. Building Microservices in Python FREE CHAPTER 3. Building a Web Application in Python 4. Interacting Data Services 5. Building WebViews with React 6. Creating UIs to Scale with Flux 7. Learning Event Sourcing and CQRS 8. Securing the Web Application 9. Continuous Delivery 10. Dockerizing Your Services 11. Deploying on the AWS Platform 12. Implementing on the Azure Platform 13. Monitoring the Cloud Application

Understanding the twelve-factor app

Cloud native applications fit in with an agreement intended to augment versatility through predictable practices. This application maintains a manifesto of sorts called the twelve-factor app. It outlines a methodology for developers to follow when building modern web-based applications. Developers must change how they code, creating a new contract between the developers and the infrastructure that their applications run on.

The following are a few points to consider when developing a cloud native application:

  • Use an informative design to increase application usage with minimal time and cost to customers using automation

  • Use application portability across different environments (such as stage and production) and different platforms (such as Unix or Windows)

  • Use application suitability over cloud platforms and understand the resource allocation and management

  • Use identical environments to reduce bugs with continuous delivery/deployment for maximum agility of software release

  • Enable high availability by scaling the application with minimal supervision and designing disaster-recovery architectures

Many of the twelve-factors interact with each other. They focus on speed, safety, and scale by emphasizing on declarative configuration. A twelve-factor app can be described as follows:

  • Centralized code base: Every code that is deployed is tracked in revision control, and should have multiple instances deployed on multiple platforms.

  • Dependencies management: An app should be able to declare the dependencies, and isolate them using tools such as Bundler, pip, and Maven.

  • Defining configuration: Configurations (that is, environment variables) that are likely to be different in different deployment environments (such as development, stage, and production) should be defined at the operating-system level.

  • Backing services: Every resource is treated as a part of the application itself. Backing services such as databases and message queues should be considered as an attached resource, and consumed equally in all environments.

  • Isolation in build, release, and run cycle: This involves strict separation between build artifacts, then combining with configuration, and then starting one or more instances from the artifact and configuration combination.

  • Stateless processes: The app should execute one or more instances/processes (for example, master/workers) that share nothing.

  • Services port binding: The application should be self-contained, and if any/all services need to be exposed, then it should be done via port binding (preferably HTTP).

  • Scaling stateless processes: The architecture should emphasize stateless process management in the underlying platform instead of implementing more complexity to the application.

  • Process state management: Processes should scale up very quickly and shut down gracefully within a small time period. These aspects enable rapid scalability, deployment of changes, and disaster recovery.

  • Continuous delivery/deployment to production: Always try to keep your different environments similar, whether it is development, stage, or production. This will ensure that you get similar results across multiple environments, and enable continuous delivery from development to production.

  • Logs as event streams: Logging is very important, whether it is platform level or application level, as this helps understand the activity of the application. Enable different deployable environments (preferably production) to collect, aggregate, index, and analyze the events via centralized services.

  • Ad hoc tasks as on-off processes: In the cloud native approach, management tasks (for example, database migration) that run as a part of a release should be run as one-off processes into the environment as opposed to the regular app with long-running processes.

Cloud application platforms such as Cloud Foundry, Heroku, and Amazon Beanstalk are optimized for deploying twelve-factor apps.

Considering all these standards and integrating applications with steady engineering interfaces, that is, handling stateless outline design, makes disseminated applications that are cloud prepared. Python revolutionized application systems with its obstinate, tradition-over-setup way to deal with web improvements.

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
Banner background image