The Serverless Framework

The Serverless Framework is an application development framework and tool for the serverless computing paradigm. The framework only shares the same name with serverless. Please do not be confused.

The authors of the Serverless Framework consider that a serverless application is the next evolution of application development in the cloud native ecosystem. And this kind of application needs a certain level of automation. This idea was the stem of the framework.

The design idea views managed services and functions as coupled entities. To make an application around them, a tool should provide build, test, and deploy commands to make the whole development life cycle fully automated.

There also should be a consistent way of building, testing, and deploying a serverless application to multiple cloud providers, while minimizing code changes. The framework should help configure the setting for each cloud provider based on the following:

  • The language runtime
  • The cloud provider selected by the application developer

With this level of abstraction, the framework yields real advantages and lets developers focus on application business logic, rather than keep changing cloud configurations to match each provider.

There are four benefits of the Serverless Framework described by its creators:

  • The Serverless Framework helps speed up the development process because the framework contains CLI-based commands to create a project, build, and also helps to test applications from the same development environment. It saves time because the Serverless Framework is independent from any cloud providers. There is also a mechanism to deploy a new version to the cloud and allow rollback for the previous one, if it fails.
  • With the Serverless Framework, it allows us to develop codes independently to any cloud providers. So, the code with a good writing style would be migrated across the providers. For example, we can simply move our functions deployed as AWS Lambda by just changing the provider in the YAML file to Google Cloud and re-deploy again. But actually this is only a part of the whole problem. It is actually not the codes that could lock you to the vendor, it's the services provided by the vendor that make you stay with them. So choose the supported service wisely and this problem could be effectively solved.
  • The Serverless Framework helps to enable Infrastructure as Code (IaC). With deployment that could be done via the set of APIs, we enable a certain level of automation. This makes us able to fully deploy the system as multi-cloud applications.
  • Finally, the framework is widely used and has a very vibrant community. This is also an important key for choosing a tool. The framework extensions are actively developed by the community because of the base language, JavaScript on Node.js, that they chose for the framework. So, it is relatively easy to add a new provider to the framework. A notable community-based provider is Kubeless.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset