expanding the possibilities of working with serverless platforms

When working with Serverless, there are tasks for which the basic functionality of cloud platforms is not enough: using serverless functions with third-party APIs, debugging an application locally, combining the capabilities of several frameworks. In response to these calls, special tools have emerged – serverless frameworks. They make it easier to start a project, increase the security level of the application, and also allow you to quickly make changes to the stack or architecture.

There are a lot of tools for working with serverless technologies, and in some collections, even fifty various names. But I will focus specifically on the frameworks and tell you about those that seemed to me the most interesting and relevant.

Why do we need frameworks for serverless functions

The main task of such frameworks is to make development fast and easy, therefore they provide the following functions and capabilities:

  • Quick setup of the server side and launch of the project. Many frameworks (for example, Apex up) allow you to deploy applications with one command, and the process itself takes a matter of seconds.

  • Short and simple commands for application deployment, updating and management. For example, to deploy a project, in most cases only three commands are required: install, init, and deploy.

  • Help with the scaling process. Scaling is a strong point of serverless technologies, and frameworks help to take advantage of this advantage: improve performance, implement an autoscaling process (yes, serverless platforms have this functionality, but it can be inconvenient or not functional enough for one reason or another) or manual scaling process when it may be necessary to change the code or configuration.

  • Solving the cold start problem. Cold start is a known issue in serverless applications and is being addressed several different methods, however, some frameworks free the user from having to solve it on their own.

  • Easy content management and content moderation. Serverless systems are tied to a service provider, especially if you use provider-provided databases, messaging buses, API gateways, and so on. Frameworks, on the other hand, become an intermediate link: they provide interchangeability of providers and make it possible to use the desired language and connect the necessary integrations.

  • Integration with other platforms and applications. Often, cloud service providers limit the programming languages ​​they use, and frameworks allow you to use familiar tools where the provider does not implement it.

How to choose a tool for your project

There are many tools suitable for working with Serverless, and they can be classified in different ways: for example, by functionality. So, some frameworks are auxiliary tools for some specific functions, while others allow you to integrate your own project with other platforms.

Serverless tools are used for application development, infrastructure management, container orchestration, and auxiliary tasks like testing. These tools evolve in two directions: some try to cover a large number of functions, while others focus on one specific functionality.

Multifunctional tools

Serverless Framework

One of the most famous and popular frameworks for building serverless applications. Due to its compatibility with multiple backend flavors, it is often used in conjunction with other frameworks. Serverless Framework supports both AWS and Google Cloud, Microsoft Azure Functions and Yandex.Cloud, so you can choose the platform you like. For example, you can use it to post jokes on twitter by timer or write a landing page

Why is he so good?

  • Open source and 40k stars on GitHub.

  • Written for JavaScript, but allows you to write functions (you can also write in Python, C #, F #, Go, Node.js, Ruby).

  • Extends its own capabilities with plugins.

  • Updates AWS lambda functions and their triggers with simple abstract YAML syntax.

  • Supports multiple backends including Kubernetes.

  • Has a flexible system of variables.

  • Supports several cloud platforms at once, including Yandex.Cloud.

Midway

A serverless framework from Chinese developers for building Node.js cloud functions: primarily designed for clouds from Alibaba and Tencent, but also compatible with AWS. It is suitable for building classic server and serverless applications, small programs and microservices. Midway lets you build apps that run in both container and virtual machines in the AWS ecosystem and in the clouds from Alibaba and Tencent.

Apex up

Tool for deploying scalable serverless applications, APIs and static websites. Apex Up focuses on deploying vanilla HTTP servers.

Peculiarities:

  • integration with AWS;

  • infrastructure as code;

  • support for Crystal, Node.js 10.x, Golang, Java and Python.

Webiny Serverless Application Framework

Webiny is an open source JavaScript framework for serverless applications with built-in CMS. It is only compatible with AWS for now, but the authors plan to make it cross-platform.

Zappa

A multifunctional framework for writing Python applications that allows you to freely work with AWS Lambda and API Gateway.

Peculiarities:

  • open source;

  • Forming a default identity and access management (IAM) policy.

Specialized tools

The second part of serverless frameworks has a narrow focus and is designed specifically for integration with any platform (for example, Yandex.Cloud or AWS) or for solving some problem (for example, local emulation of a cloud service).

Tools for working with AWS

AWS has many of its own tools that make certain tasks easier, and the number is growing every day. Most of the tools from other developers are more or less compatible with AWS: including Yandex.Cloud serverless services.

AWS Chalice

A framework for writing serverless applications in Python.

AWS Lambda Power Tuning

The tool is powered by stepwise AWS functions and helps you optimize Lambda functions for cost and / or performance based on data.

AWS Serverless Application Model (SAM)

An open source framework for building serverless applications.

Tools for working with Yandex.Cloud

Yappa

A tool for easily deploying Python web applications inspired by the Zappa framework. Was once abandoned, but now supported by enthusiasts

Peculiarities:

  • open source;

  • API Gateway support;

  • connection to Yandex Database;

  • authentication through its own CLI instead of Yandex CLI;

  • support for WSGI / ASGI applications (Flask, Django, FastAPI).

Ruby Tools

Ruby on Jets

A package of tools required to build applications using AWS Lambda, SNS, SQS, DynamoDB, and other services. Ideal for writing functions that aggregate AWS services and resources.

I love Ruby, which is why Ruby on Jets came to my liking.

Peculiarities:

  • active support service;

  • extensive technical documentation with a large number of examples

Infrastructure management

Architect

The architecture of the framework is based on the principle of “infrastructure as code”. This allows the infrastructure to be configured in a manner similar to software programming. Includes tools for local development and testing, building, deploying, and managing AWS Serverless Infrastructure.

Pulumi

A tool to simplify cloud infrastructure management, launch and project development. Works with virtual machines and databases as well as containers, Kubernetes clusters and serverless features.

Peculiarities:

  • open source;

  • low entry threshold;

  • Pulumi CrossGuard on guard for your safety;

  • support for TypeScript, JavaScript, Python, Go and .NET;

  • support for multiple cloud providers and Kubernetes.

Orchestrating containers

Kubeless

A framework that allows you to deploy small pieces of code without worrying about the underlying infrastructure. Kubernetes resources are used for auto scaling, API routing, monitoring, troubleshooting, and more. For those interested in the possibilities of using functions and options for serverless solutions on bare metal Kubernetes, I advise you to look at the excellent article “FaaS and serverless solutions using PoC kubeless functions as an example“.

Firecracker

Not a framework, but open source virtualization technology. Designed to create and manage secure multi-tenant container and functional services.

Emulation

LocalStack

A full-featured cloud service emulator for local development and testing of serverless applications. No connection to a cloud provider is required: LocalStack works autonomously and also supports a huge number of AWS services (AWS Lambda, S3, DynamoDB, Kinesis, SQS, SNS, and so on). For connoisseurs there is PRO version

If you are interested in the Serverless ecosystem and everything related to this, visit our community on Telegramwhere you can discuss serverless in general.

Similar Posts

Leave a Reply