Getting abstract

Over the last decade or two, cloud computing has come to dominate many of the skills and processes needed to develop ‘modern’ software. This is increasingly true for adjacent fields too, including the world of Data Science (among others). One of the trends in this sweeping move towards ‘The Cloud’ has been the ever-increasing levels of abstraction with respect to how development teams interact with the infrastructure running their applications.

Arguably at the top of this pyramid of abstraction is the concept of serverless computing, and it is built on the idea that (as the name suggests), developers need not spend time configuring servers and writing boilerplate app code, and should instead dive straight in to writing and deploying the code that ‘really’ drives business value. This can also make it super easy for developers, Data Scientists and others to deploy simple applications and services with little-to-no experience of configuring the infrastructure needed to deploy ‘classic’ web apps. If that sounds like it may be useful to you, then great! This post aims to provide you with:

  • A high-level understanding of what serverless computing is.
  • An understanding of the relative merits of serverless computing, and some of its disadvantages.
  • A short guide to setting up your own serverless Python function on Google Cloud.

Let’s get started.

The classic approach

To get an idea of the potential benefits of serverless computing, it might be worth taking a step back and looking at the ‘classic’ workflow for setting up a new server in the cloud for your latest and greatest application. If you’ve done this before (perhaps with a Flask or Express app), this might seem quite familiar:

  1. Create a new virtual machine (VM) on your chosen cloud provider: choose your system resources (memory, number of CPUs etc.), select the operating system you’d like to use, and maybe also create some credentials to access your new machine remotely.
  2. Configure your new machine to accept public traffic on a specific port.
  3. Set up NGINX (or some other web server) to forward requests from this port to your app.
  4. Configure auto-scaling rules (if needed).
  5. Write your application’s framework-specific boilerplate, such as your request handlers and other server code.
  6. Write your business logic.

#google-cloud-platform #cloud-computing #software-engineering #serverless #data-science

A Brief Introduction to Serverless Computing
1.15 GEEK