Book Image

Cloud Native Python

By : Manish Sethi
Book Image

Cloud Native Python

By: Manish Sethi

Overview of this book

Businesses today are evolving so rapidly that having their own infrastructure to support their expansion is not feasible. As a result, they have been resorting to the elasticity of the cloud to provide a platform to build and deploy their highly scalable applications. This book will be the one stop for you to learn all about building cloud-native architectures in Python. It will begin by introducing you to cloud-native architecture and will help break it down for you. Then you’ll learn how to build microservices in Python using REST APIs in an event driven approach and you will build the web layer. Next, you’ll learn about Interacting data services and building Web views with React, after which we will take a detailed look at application security and performance. Then, you’ll also learn how to Dockerize your services. And finally, you’ll learn how to deploy the application on the AWS and Azure platforms. We will end the book by discussing some concepts and techniques around troubleshooting problems that might occur with your applications after you’ve deployed them. This book will teach you how to craft applications that are built as small standard units, using all the proven best practices and avoiding the usual traps. It's a practical book: we're going to build everything using Python 3 and its amazing tooling ecosystem. The book will take you on a journey, the destination of which, is the creation of a complete Python application based on microservices over the cloud platform
Table of Contents (14 chapters)
Creating UIs to Scale with Flux

Introduction to cloud computing

Before we begin with microservices and cloud native concepts, let's first understand what cloud computing is all about.

Cloud computing is a wide term that portrays a wide scope of administrations. Similarly, as with other huge advancements in innovation, numerous merchants have grabbed the expression cloud and are utilizing it for items that sit outside of the basic definition. Since the cloud is an expansive accumulation of administrations, associations can pick where, when, and how they utilize cloud computing.

The cloud computing services can be categorized as follows:

  • SaaS: These are baked applications that are ready to be grasped by end users
  • PaaS: These are a collection of tools and services that are useful for users/developers who want to either build their application or quickly host them directly to production without caring about the underlying hardware
  • IaaS: This is for customers who want to build their own business model and customize it

Cloud computing, as a stack, can be explained as follows:

  • Cloud computing is often referred to as stack, which is basically a wide range of services in which each service is built on top of another under a common term, such as cloud
  • The cloud computing model is considered as a collection of different configurable computing resources (such as servers, databases, and storage), which communicate with each other, and can be provisioned with minimal supervision

The following diagram showcases the cloud computing stack components:

Let's understand cloud computing components in detail, along with their use cases.

Software as a Service

The following are the key points that describe SaaS:

  • Software as a Service (SaaS) offers users the ability to access software hosted on service provider premises, which is provided as a service over the internet through a web browser by a provider. These services are based on subscriptions, and are also referred to as on-demand software.

  • SaaS-offering companies include the Google Docs productivity suite, Oracle CRM (Customer Relationships Management), Microsoft and their Office 365 offering, and Salesforce CRM and QuickBooks.

  • SaaS can be further categorized as a vertical SaaS that focuses on the needs of specific industries, such as healthcare and agriculture, or a horizontal SaaS that focuses on the software industry, such as human resources and sales.

  • SaaS offerings are, basically, for organizations that quickly want to grasp existing applications that are easy to use and understand, even for a non-technical person. Based on the organization's usage and budget, enterprises to select support plans. Additionally, you can access these SaaS applications from anywhere around the globe, and from any device with the internet enabled.

Platform as a Service

The following are the key points that describe PaaS:

  • In PaaS offerings, the organization/enterprise need not worry about hardware and software infrastructure management for their in-house applications

  • The biggest benefits of PaaS are for the development teams (local or remote), which can efficiently build, test, and deploy their applications on a common framework, wherein, the underlying hardware and software is managed by the PaaS service provider

  • The PaaS service provider delivers the platform, and also provides different services around the platform

  • The examples of PaaS providers include Amazon Web Services (AWS Elastic Beanstalk), Microsoft Azure (Azure Websites), Google App Engine, and Oracle (Big Data Cloud Service)

Infrastructure as a Service

The following are the key points that describe IaaS:

  • Unlike SaaS offerings, in IaaS, the customer is provided with IT resources, such as bare metal machines to run applications, hard disk for storage, and network cable for network capability, which they can customize based on their business model.

  • In IaaS offerings, since the customer has full access to their infrastructure, they can scale their IT resources based on their application requirement. Also, in IaaS offerings, the customer has to manage the security of the application/resources, and needs to build disaster recovery models in case of sudden failures/crashes.

  • In IaaS, services are on an on-demand basis, where the customer is charged on usage. So, it's the customer's responsibility to do cost analysis against their resources, which will help restrict them from exceeding their budget.

  • It allows customers/consumers to customize their infrastructure based on the requirements of the application, then tear down the infrastructure and recreate it again very quickly and efficiently.

  • The pricing model for IaaS-based services is basically on-demand, which means you pay as you go. You are charged as per your usage of resources and the duration of the usage.

  • Amazon Web Services (offering Amazon Elastic Compute Cloud (Amazon EC2) and Amazon Simple Storage Service (Amazon S3)) was the first out of the gate in this cloud offering; however, players such as Microsoft Azure (virtual machine), Rackspace (virtual cloud servers) and Oracle (bare metal cloud services) have also made a name for themselves.