Beruflich Dokumente
Kultur Dokumente
I learned to stop
worrying and
start loving the
cloud
Himanshu Pant
himanshupant@gmail.com
1st Edition(29/12/2017)
Disclaimer:- While all effort has been made by me to keep the content accurate and up to date , given the rapid
advancements in this field , some bits may be out of date. I have tried my best to ensure these deviations are
minimum. I will try to update any old text in future versions.
Introduction ................................................................................................................4
Once upon a time….. ...................................................................................................5
The beginning ........................................................................................................................ 5
How it all began .......................................................................................................... 5
PC era .......................................................................................................................... 7
Cloud Era ....................................................................................................................9
Enter Serverless architecture ....................................................................................10
What Serverless is NOT............................................................................................ 12
NOT Container .......................................................................................................... 12
NOT PaaS .................................................................................................................. 14
Introduction
This booklet is a humble attempt to consolidate and distill whatever little knowledge I
have gained over the past couple of months and to present it to benefit of readers who are
new to it.
Being a big fan of Munger, Taleb and their concept of mental models to look at a situation
from multiple perspectives, I have tried to relate the modern concepts of computing
( mainly cloud) to the old concepts which were the rage before. In computing , like in life
the concepts hardly ever change. Its only their representations and instantiations which
change.
Bouquets ,if any, for this attempt are to the credit of the various resources I have had a
chance to refer in my journey of learning and brickbats are solely for my lack of
intelligence in comprehending them correctly.
Chapter 1
These early beasts were purely batch processing oriented. So Mr John Appleseed could
punch in his instructions(read programs) on a punch card(see below) , pass it to the
operations team and go off for a coffee , or even leave for the day.
By Arnold Reinhold - I took this picture of an artifact in my possession. The card was created in the late 1960s or early 1970s and has no
copyright notice., CC BY-SA 2.5, https://commons.wikimedia.org/w/index.php?curid=775153
The operator would schedule and execute the previously submitted punch cards.
Funfact - the above pic is of a HUGE 5Mb of of data on 62,500 punched cards so just imagine the
number of cards to capture the code base of Win 10 or macOS had we been still using this
technology.
The operator would then collect the output and deposit the same to Mr John’s cubicle or
physical mailbox. Online access was reserved for resources requiring it ,like staff at
airlines booking counter. So to all those crying in spite of having GUI based IDEs, if you
think your job is hard , think of these pioneers. So to all those crying in spite of having
GUI based IDEs, if you think your job is hard , think of these pioneers.
Needless to say , the above was not just slow but also an extremely expensive process. So
much so that system usage was measured and charged in seconds towards client’s
account*.1
Code re-writes were cumbersome and time-consuming. On a positive note, this was
probably the reason for the exceptionally good coding skills of the developers of that era
because as one Mr Real slim shady has rightly said -
The developers knew that they had no luxury of code re-writes , re-testing as the process
was both time consuming and extremely expensive.
On the positive side, systems designed under such intense scrutiny and resource crunch
had absolutely no flab. Maximum performance in minimum resources was the 70s
mantra.
PC era
The era of mainframe, wherein computing access was centralised and restricted to few big
organisations and its employees, was followed by democratisation of technology in the
form of personal computer. Processing model started moving from mainframe based
centralised system to client-server based model. Infrastructure planning, procurement,
and maintenance became a vital part of software development as the pace of business
started to increase exponentially. So it was not unusual to see software deployment of a
1 Spoiler Alert - Some shops/technologies still do. Infact the cloud computing framework as we know of is a follower of this principle for their vanilla
compute offerings.
client server based system accompanied with projections of future volume growth and
provisioning for that. As it is the job of a typical engineer was tough , this also required
him to be a soothsayer.
So now our poor Mr John Appleseed was not only trying to figure out what the business
teams were saying in the form of their requirements , what the coding tools / standards/
best practices/innovations he should follow, but also parameters like what could be the
usage pattern of the software , how fast or slow it may grow in future , what may be the
optimum hardware so as to strike a right balance between performance and cost
efficiency.
The bureaucratic hurdles in an organisation ensured that the hapless Mr John was always
stuck between the devil and the deep blue sea. In addition to having sleepless nights over
the ever changing requirements and shifting deadlines , he also had to make do with
vagaries of infrastructure procurement. On a mainframe world, the situation was a bit
better as hardware procurement was not that commonly done , nevertheless resource
allocation was a chore which led to a lot of heartburn.
Cloud Era
Mid 2000s saw the advent of a new paradigm in computing - “the cloud” which changed
the nature of computing as it was known till then. Before we delve deeper into it , let us
spare a minute to refresh the definition of cloud as given by NIST -
Our beloved Mr John Appleseed was happy , after all he was no longer at the mercy of his
infrastructure engineer for getting servers or storage. He could at the drop of a button , get
compute power , get storage, get queue and any other such service.
All was well in the garden of Eden , when Mr John true to the human nature of being an
enterprising species started pondering as to how he could make his life easier. Moreover,
the fact that the world was becoming digital at a very great pace with scales of enterprises
un-heard of, was making this practice of pre-allocating hardware a self defeating purpose.
All the interactions with the digital world were becoming majorly event driven.
Enter Serverless architecture
2015 ( or some say 2012) was the time when this computing paradigm came into
inception. There have been a couple of interpretations around this term and its
implications.
One school of thoughts attributes this to Backend as a Service ( BaaS), for example
authentication services offered by third party providers like Google , Facebook etc. While
the other school of thoughts links this to a concept wherein applications with business
(read server side) logic are run over stateless containers, managed by a third party
provider in whole a.k.a Function as a Service ( Faas)
This book focusses on the second definition of the concept as that has interesting
implications to the way web applications are being architected.
Brief evolution of cloud computing paradigm
a) the development team should not get worried over the backend server , its
maintenance , procurement , scaling (well to an extent) etc. All the team had to be worried
about, was its application logic.
c) Instead of having a server with long running processes , say cron , here the
processing is only initiated once the qualifying event occurs and is terminated when the
processing is complete or the set time elapsed ( which ever happens earlier).
It does not mean that there are no servers anywhere in the whole scheme of things. All it
means is that the servers and its maintenance is now hidden from the developer.
Furthermore since the physical unit of compute is now a container , there is no need to
have long running servers with event listeners running on them to carry out any
“What's in a name? That which we call a rose by any other name would
smell as sweet”.
As it is with any new innovation, more often than not glitzy names are used by vendors to
re-package old wine in new bottle to gain more eyeballs. In case of serverless , this
confusion is more wide-spread because of the fact that it has come up in a very short
period of time and in very close proximity to the other concepts with which it can be
confused. So here I take a shot in trying to clarify what it is(or can be) typically confused
with and my 2 cents on it -
NOT Container
Containers remove one part of the problem i.e they provide a homogenous runtime
production environment, albeit at the cost of increased maintenance effort. However to be
fair , containers are typically better placed for different kinds of work-load i.e those which
are inherently more complex. So they find favour in enterprise IT landscape where there is
already a monolith up and running and the organisation may be wanting to port it quickly
to cloud.
Horizontal scaling is a vector wherein serverless steals the show over container. Modern
cloud vendors, "theoretically" provide unlimited scaling capability for their serverless
offerings and best of all this scaling is totally transparent to the user.
However given the pace at which things are changing , the differences can get diluted to a
great extent over a period of time.
NOT PaaS
Just like containers , PaaS also differ mainly around the vector of scaling. Howsoever
hands off the PaaS vendors may claim their offering to be , it still requires some admin
maintenance effort unlike serverless.
With PaaS, there is always a minimum running footprint in the system which will be up
and incurring costs. However with serverless , it can be brought down to absolute zero.
PaaS may still be a good choice given its more advanced ecosystem , tooling and language
support. However this should not be a show-stopper given the high pace of advancements
in the field of serverless.