Datadog Gold Partner logo

Learning Cloud through GCP — Part 2: How can I consume Cloud ?

By Abhinav Bhatia.Dec 6, 2021

“There was a time when every household, town, farm or village had its own water well. Today, shared public utilities give us access to clean water by simply turning on the tap; cloud computing works in a similar fashion. Just like water from the tap in your kitchen, cloud computing services can be turned on or off quickly as needed. Like at the water company, there is a team of dedicated professionals making sure the service provided is safe, secure and available on a 24/7 basis. When the tap isn’t on, not only are you saving water, but you aren’t paying for resources you don’t currently need.”

Vivek Kundra, Federal CIO, United States Government, 2010.

We discussed about what cloud is and is not in my last blog Part 1: What is Cloud ?. I tried my best to break it down into as simple structure as possible so that our mind can relate to and understand it better. Essentially a cloud is a giant vending machine where the virtual pooled resources are vended out on demand (or there are commitment models available) to the end user with the help of a button (remember APIs) and chargeback happens so that a customer can choose to pay by the hour or by the minute or by a second etc and use it to outsource all the tasks which are not their bread and butter.

A few Disclaimers

All opinions discussed in this blog series are my own and in no way should be attributed to be coming from the companies that I am or have been a part of. These are my learnings that I have tried to put in in as simple manner as possible. I understand that oversimplification can sometimes leads to an alternate version which might not be true. I would try my best not to oversimplify but my only request is to take all of this with a pinch of salt. Validate from as many sources as possible.

The intent of this blog post is to cover the different service models available on the cloud. Essentially there are three but with innovation there are different models that have come up which we will discuss in this blog. But before that in order to explain these models, it is imperative to understand the layers of a software application and let’s go from top to down.

Article-Learning Cloud through GCP — Part 2- How can I consume Cloud ?_1

The top layer with which most of you must have interacted in the past is the application. The place where you are reading this blogpost is an application where you have access to the client application on you phone or on your browser and the server part of it is running in the cloud (lets assume). There is this constant interaction between the client and the server to make sure you are able to read and write the blog entries. But essentially you have written some code which defines the user interface of the application and all the business logic that would define your application.

Article-Learning Cloud through GCP — Part 2- How can I consume Cloud ?_2

Any application would have its data associated with it. This blogpost website has blogs, user profiles, analytics data and various other data as part of the application. Typically you would use some sort of persistence layer to store this data permanently. It might be a database or it might be some sort of file storage. It depends on the type of data (More on that later in Part 4: Where do I store my data on Cloud ?).

Article-Learning Cloud through GCP — Part 2- How can I consume Cloud ?_3

An application is coded generally in a high level language like JAVA or C++ or .NET being a few of those. You require a component to convert the high level language to a machine specific instructions so that the code can do its job. That component is the runtime. It also does many other jobs that are required for proper running of code (like garbage collection is done by some runtimes among many other things).

Article-Learning Cloud through GCP — Part 2- How can I consume Cloud ?_4

Middleware is a piece of software that provides different functionalities to the application like data management (Databases), messaging (think about calls from one component of the application to another), transaction management etc. Essentially you are only coding what you want the application to do in the application layer i.e. writing the business logic but runtimes and middleware are kind of developing the ecosystem around the application that enables it to perform its job better.

Operating System
Article-Learning Cloud through GCP — Part 2- How can I consume Cloud ?_5

Operating system is another key piece of software which acts like an interface between the end user and the hardware and also runs your above stack of App+Data+Runtime+Middleware. It performs many roles like file management, memory management, device management, security and many more. Typically in the past (or in the present times also) code used to be written only for a specific operating system. This created a lot of problems when scenarios like migration to another operating system used to come. But there has been a lot of improvement in this space where people have realised the importance of keeping a flexible architecture where cross-platform language framework have come to the rescue.

Article-Learning Cloud through GCP — Part 2- How can I consume Cloud ?_6

I mentioned about virtualization in my last blog Part 1: What is Cloud ? where I mentioned that virtualization is one of the building blocks because of which the journey of cloud could succeed. It is the layer with the help of which you are converting the hardware components into a piece of software (or virtualizing it) so that you can pool and abstract the hardware. This also helps in the maintenance and management of the hardware because you no longer have to worry about, for example, shifting a server from one data centre to another during a disaster or maintenance of the facility. You should be able to migrate a virtual machine over the wire since you have it virtualized. The layer that makes it all possible in case of compute is called a HYPERVISOR.

Article-Learning Cloud through GCP — Part 2- How can I consume Cloud ?_7

Servers are the brain behind running your code. It is the compute function which is basically serving your code and performing the tasks required. It consists of physical cores, memory (RAM), some storage (Direct attached storage), buses, chipsets and many other things installed in a small box.

Article-Learning Cloud through GCP — Part 2- How can I consume Cloud ?_8

Although managed by a database or a file server but your data needs to be stored somewhere physically. And that somewhere is your storage appliance. There are different ways it keeps a record of the data but essentially it converts everything into a series of 1s and 0s and that’s how it remembers the data. Every cloud vendor or even an enterprise data centre have multiple of these storage appliances (Storage Area Network/Network Attached Storage/Object Storage) used to persist the data permanently. Data is the new oil so it is also very important to have the backup of the data so that you can recover your data in case of disk corruption or accidental deletion (or non-accidental deletion like ransomware)

Article-Learning Cloud through GCP — Part 2- How can I consume Cloud ?_9

Now that you have your data being computed by a server but how does it gets transmitted to the end user or to a different component of the application. Using Network. This is the layer which takes care of basically transportation of data from one place to another. There are devices like hubs/switches/routers or security appliances like web application firewalls/network firewalls/load balancers that helps in that secured transportation.

And that is your digital application running on cloud. Using all those above nine layers you build your application. With cloud, which is an outsourcing model, you decide which stuff you want to concentrate on, and which stuff you want to outsource. With that decision, you and the cloud vendor enter into an agreement where both decides to enter into a shared responsibility model where essentially both the parties agree to work solely on their own set of duties. That shared responsibility model gave rise to many *aaS (as a service) models defined below:

Infrastructure as a Service (IaaS)

Article-Learning Cloud through GCP — Part 2- How can I consume Cloud ?_10
Shared Responsibility Model for IaaS

This is a model in which the cloud vendor gives you the virtualized hardware stack( Server, storage, Network) along with the operating system but the responsibility stops at the virtualized layer. Operating System and above duties are to be done by the customer. So typically using a publicly available OS image the customer gets a virtual machine on top of which the customer builds the rest of the stack as described above and takes care of all the responsibilities like patching and security of those layers. Compute Engine from Google Cloud Platform is an example of IaaS.

Platform as a Service (PaaS)

Article-Learning Cloud through GCP — Part 2- How can I consume Cloud ?_11
Shared Responsibility Model for PaaS

With Platform as a Service, the cloud vendor builds the stack till runtime (Hardware+Virtualization+Operating System+Middleware+Runtime) and the customer brings their application and its data. App Engine from GCP is a perfect example of Platform as a service where Google has built the orchestration in such a way that if no one is opening up your web application during the night time, you are not paying for the service (in the App Engine Standard).

Software as a Service (SaaS)

Article-Learning Cloud through GCP — Part 2- How can I consume Cloud ?_12
SaaS: Completely Cloud Managed

With Software as a Service, everything is given to you by the cloud vendor. Think about Salesforce, a hugely popular CRM, which is a perfect example of SaaS.

Function as a Service (FaaS)

Article-Learning Cloud through GCP — Part 2- How can I consume Cloud ?_13
Shared Responsibility Model for FaaS

Function as a Service created waves when it was launched because it essentially gave birth to serverless computing (there are still servers to compute but none that the user would see). This is a model in which the customer writes a specific function to do one key job (like transcoding a video/processing an image) that is triggered by an end user action (like when someone uploads an object). Cloud Functions from Google Cloud is an example of FaaS.

FaaS vs PaaS

Cloud vendor orchestration layer creates the function only at time of that trigger, performs the job, and shuts it down and thereby you get charged in milliseconds only when the function is executing. Most PaaS services out there (exception: App Engine Standard) does not work on this model of starting, executing, shutting down and keeps a server process running in the background so there is some charge that the customer has to pay.

Metal as a Service (MaaS)

Article-Learning Cloud through GCP — Part 2- How can I consume Cloud ?_14
Photo by panumas nikhomkhai from Pexels

Virtualization definitely creates highly efficient and maintainable compute for the applications but there are use cases in which you don’t want the overhead of the virtualization layer (hypervisor) or you have a licensing model of your application which prevents you to run on a virtualization stack. For those use cases, Metal as a Service (MaaS) is an attempt to orchestrate the creation of baremetal servers and the various activities that goes around it.

In Google Cloud, Bare Metal solution can be provided to bring oracle workload where the billing, support, and SLA is provided by Google Cloud

Anything as a Service (XaaS)

Anything as a service is a general term for rendering out anything as a service. That anytime can include things like DR (Disaster Recovery) services, Databases,Containers, Authentication and many more (includes the general IaaS, PaaS, SaaS, FaaS, MaaS described above).

So that concludes the different service models associated with the cloud. The bottom line is that instead of a model where servers and storages and other pieces of equipments were procured well in advance, we are moving towards a utility model where Anything is available as a service at a billing model convenient to the user. You can plan ahead in time and plan so that the capacity is available when required but essentially things become a lot smoother.

What Next ?

Now that we have understood cloud and its service models in the next part
Part 3: Where do I compute on cloud ? let’s start with the computing layer on cloud and understand on where to compute your data on cloud.

Check out the other parts here:

The original article published on Medium.

Related Posts