What is function as a service?


The general concept in the developer community is that serverless technology is basically all about Function as a service (FaaS). In fact, most developers think another name for serverless is FaaS — a process that allows developers deliver workloads without provisioning and managing facilities like servers and other infrastructures.

Serverless architecture is bigger than FaaS. It’s just a compute layer which sits within a wider serverless platform. Many developers have called serverless technologies, functions-as-a-service. But is that what serverless technology is all about? Let try and examine the various aspects of what exactly it means right now, and see how it’ll evolve in the near future.

Functions are the unit of deployment and scaling. And they’re an event-driven piece of code; the wider developers’ community seems to be drawing back from a focus on functions-as-service, instead of leaning towards a concept that recognizes the starting point is the event trigger that kicks up the function to start. So there are more event triggers and components involved than just functions. But FaaS isn’t inherently event-driven and event-driven isn’t exclusive to serverless architecture.

The question of, what actually constitutes a serverless architecture becomes pertinent. Though the absolute definition of “serverless technology” is broad and undefined. In essence, it is a concept that takes cloud computing beyond FaaS (function as a service), I simply call it Convenient-as-a-service, it spun up processing power when your application is in needs of it and respond to data. Conventional wisdom spread by some cloud providers is that only Function-as-a-Service (FaaS) implementations represent a serverless architecture.

Serverless Architecture

The serverless concept is far broader than function as a service; serverless architecture depends on orchestrating a vibrant eco-system of fully managed services. With increasing number of such backend services (BaaS) backend-as-a-service supported by all the key cloud infrastructure providers.

There’s a need to really expand the concept or definition beyond functional level abstraction to application level abstraction to be considered as serverless. With the big number of workloads moving to the cloud, it wasn’t difficult for cloud service providers to understand the value of providing fully-managed backends — such as updating caches, configuring load balancers, operating systems, configuring database clusters which are the supporting infrastructure required by the workloads

For many providers, a way to orchestrate these rich set of backends was inevitable, by leveraging the orchestration and containerization wave, it made it possible to rethink abstraction levels. The serverless concept usually consists of Backend-as-a-Service (BaaS) and Function as- a -Service (FaaS).

When using a BaaS you are not required to build REST-APIs. Instead, your client application talks to the database directly with a lean and generic authentication layer in front of the database. Most BaaS solution providers provide basic data validation mechanisms.

Usually, an application backend must always perform long-running asynchronous tasks, this is where Function as a Service (FaaS) comes in. A Function as a Service solution provides developers the possibility to upload a piece of code which should be executed on specific events. For example, In a situation where a new data record has been inserted into the BaaS.

This gave birth to a new level of abstraction — function-as-a-service. Back4App is a serverless database platform that provides a functional abstraction with the same proposal of a faster speed, no administration, and a much cheaper price model. The difference here is that developers focus on a single function instead of a service with a large surface area like in the application runtime abstraction.

Another fundamental difference between application level abstraction and functional level abstraction is where and how developer defines an invocation mechanism for workloads. In the application abstraction, the invocation mechanism is defined in the application code and provides the flexibility for the developer to choose the framework.

For a function invocation, it’s defined in a manifest file designed by the cloud service providers.There’s an asynchronous invocation by placing a message on a managed queue (SQS), and there’s another web-based invocation by calling a predefined endpoint on a managed router (i.e. API Gateway)

In essence, FaaS is an application framework created and managed by the cloud service provider. This makes FaaS appealing for developers that don’t necessarily care about infrastructure management and are flexible to adopt the provider’s manifest in exchange for a piece of mind.

It’s much clearer by now that application and functional runtime abstraction deliver the concept of serverless technology — a future where developers can focus on writing clean code and building applications that provide more functionality to their customers instead of dealing with the complexities involved in delivering the code.

The serverless concept is to make Function-as-a-Service applications more effective and affordable. With the power of serverless technology, there is the trend to implement everything as a service and using an API Gateway to map HTTP requests to those functions.

Understanding the concept behind “ cloud stacks” of Infrastructure-as-a-Service (IaaS) Backend-as-a-Service (BaaS) Platform-as-a-Service (PaaS) and Software-as-a-Service (SaaS) gives you the broad definition of Function-as-a-Service (FaaS) and what a serverless database platform is all about.

Final Words

Mobile applications team developers have come to realize that it’s profitable to let the client communicate directly with a server-side database. A BaaS database eliminates most of the database administration overhead cost, and also it will basically provide mechanisms to offer appropriate authorization for a different type of users, in the patterns expected of a serverless application.

So, serverless is all about putting your business ideas in FaaS and using managed services for everything else. Back4app’s database service delivers the first scalable serverless database platform, that allows developers to build and scale applications on demand and free them from coding for infrastructure.

What is a serverless architecture?

Serverless, is an execution model where the cloud provider will be responsible for executing pieces of code with resources that will be dynamically allocated and charging only for the resources used to execute that specific code.

What is a FaaS – Function as a Service?

Is an event-driven computational execution model that runs in stateless containers. These functions manage server-side logic and state using services.

Leave a reply

Your email address will not be published.