What is it?
Serverless computing is an abstract, cloud-based framework that allows developers to build and run applications without having to worry about server-side mechanisms. Put simply, developers now only have to concern themselves with writing and executing code. All things server-related are taken care of by external entities.
The term “serverless” can be misleading. It doesn’t mean that servers are completely excluded as a computing resource – they still run in the background. It does mean, however, that throughout the software development process, they are no longer relevant from a design perspective. It means that developers and/or engineers can spend more time focusing on writing code and organising functionality for a given software component.
What are the advantages/disadvantages?
Depending on one’s personal preferences, serverless computing products can have numerous advantages. For one, it doesn’t require a vast amount of knowledge about servers or how they work. Basically, it allows developers to offload that responsibility to other service providers who have the resources and expertise. All decisions and events relating to server-side functionality are handled programmatically.
Another benefit of going serverless is scalability. Not only is infrastructure and the provisioning of resources less of a concern for the developer, but also increasing the size and scale of operations no longer requires any extra provisioning. Scaling can be handled mostly at “host” level, which is provided as a service rather than as a task.
Additionally, there is an opportunity to save costs. Data usage is measured down to the millisecond, which ends up being quite a lot cheaper compared to having servers up and running constantly – even when they aren’t being fully utilised.
The downsides to having no active control over server-side functionality are two-fold:
- The “loose” orchestration between the front and back-end can lead to nasty surprises and unexpected downturns in productivity, especially when changes to a system’s size and/or scope happen.
- Forecasting costs can be a nightmare, as most of the procurement and change management is being taken care of by service providers.
What serverless computing products are currently on the market?
Amazon Web Services (AWS) Lambda, IBM OpenWhisk, Microsoft Azure Functions, Google Cloud, JustServerless, Functions to name a few.
Let’s focus on one in particular – AWS Lambda. Lambda provides back-end server functions to manage the size, scaling, provisioning, security, and the administrative requirements to get your application up and running. The support offered in the background – everything from the infrastructure to general maintenance – is event-driven.
The way it works is:
- A user’s code is executed (front-end)
- It triggers an event (back-end)
- That event prompts a function (back-end)
- That function generates an action (back-end)
- The action completes a certain task (front -end)
- The user is then charged based on the action’s run-time (in increments of 100 milliseconds)
In a normal 3-tiered system, this exercise would require skills that go beyond that of just writing and executing code – one would have to know about the type of infrastructure they’re using and how to install & run it.
What AWS provides here is a massive reduction in server-side resource provisioning and application code. Quite simply, it allows you to build applications without technical know-how.
Multi-tiered architecture made simple!
There are different “layers” in an application, which go together to form a basic architectural model. An example of this might include an API layer, which provides the level of understanding between the service architecture and the data model. Within this structure, you’ll find application code that integrates each layer, which is normally run over a network and provides a level of communication between multiple subsections of system infrastructure.
For a developer, it’s very time-consuming and tedious to keep up to speed with multiple service layers. Not only must one ensure that the application is responding properly and operating harmoniously within the multi-tiered framework, but they must also be concerned about the level of security.
What serverless architecture provides is the ability to offset this complexity to other providers (like AWS) who provide robust solutions to simplify the creation of these multi-tiered frameworks.
Conclusion
The process of running web applications has changed dramatically since the advent of serverless computing. No longer do you have the stress of managing back-end, server-related capabilities whilst worrying about UI components and functionality. Instead, what you’re left with are a series of functions (which handle events and/or requests) that run when prompted – much faster and more efficient than long-running API processes.
It’ll be interesting to see just how far the proliferation of this new technology will go in the coming years.
0 Comments