Bypassing Serverless Challenges with Webiny Serverless Application Framework

Serverless computing has been a major milestone ever since the 20th century when “cloud computing” became a term in a Compaq internal document. The idea that infrastructure could be abstracted away to the point when the end developer doesn’t have to worry about servers not only enables developers to focus on developing applications but also removes a point of failure for companies. In the modern day, all major cloud providers, i.e Amazon, Google, and Microsoft, have all specialized in providing the scalable infrastructure that once required significant capital expenditure to build and maintain to the point when they have developed “serverless” offerings like AWS Lambda that ensure all the maintenance and operation tasks are abstracted away. These offerings promise to offer benefits like cost reduction, scalability, and quicker deployment if used correctly.

 

Benefits of serverless

Traditional web applications are often divided into two major parts, the client and the server. The client handles some front end logic but oftentimes only provides logic to access the  server. The servers can do some additional front end logic and also handles all of the backend logic, security and databases. However with a serverless architecture, the client handles all of the front end logic and the server is divided into a suite of microservices each handling a specific part of the backend such as security, data retrieval and backend logic. These microservices are developed as functions on serverless offerings by cloud providers, such as AWS Lambda, Azure Function, or IBM OpenWhisk. By breaking out specific functions of the backend, you can more efficiently allocate resources by only running the services when they are called as opposed to having a server run 24/7. This not only enables you to have significant cost savings but also has the added benefits of easy maintainability and more efficient scaling. However even though a serverless architecture abstracts away servers that you had to path, update, and maintain, other problems emerge.

Traditional and serverless architecture

Developing a serverless application is hard and complex and often requires fundamental changes in thinking. You effectively have changed the architecture from a single server running multiple services to multiple services that are more or less isolated from each other. Traditional pain points such as API management, security, and routing are now compounded as each effective function is a different target. Software that previously monitored server health now needs to monitor function health and execution time. When you start building entire applications based on serverless this complexity only grows exponentially. It almost comes to the point that the server maintenance that was the original pain point serverless wanted to solve has been replaced with another more complex set of pain points that distract from application coding. 

That’s where Webiny comes into play. You still have a traditional cloud provider that provides the service offering. The most common ones are AWS, Azure, or GCP. Then you usually have some sort of monitoring software for the serverless functions you deploy on the provider. These are usually cloud specific or there are some third party ones such as Lumingo that you can use. In a regular serverless application you then have middleware to handle routing, security, and other non-application tasks. However by using Webiny you can greatly simplify or automate that middleware. Webiny sits on top of your infrastructure and automatically handles the ACL, routing, API, file storage, and other mundane tasks that are unique to a serverless environment so that coding a serverless application is as easy as developing locally.

Webiny provides several key benefits while still retaining the features that make serverless so promising. It has a library of ready-made React components, one of the largest existing UI frameworks in use today, making it easy to create both simple and complex interfaces while leveraging your existing talent. It eliminates the headache that is testing and debugging serverless applications. It has a built-in access control layer that allows you to fine tune user access rights to the smallest token. All of these features are included in the framework while still retaining the great serverless features of high availability, efficient scalability, and lower costs. The Webiny framework can be used to develop everything from microservices to full-stack web apps and everything in between, but let’s look at the headless GraphQL-based headless CMS that Webiny provides out of the box.

Webiny GraphQL Based Headless CMS

Actually created with the Webiny framework, deployment is quick and easy using the Webiny CLI. There are two APIs, one for content management and one for content delivery. For those who prefer a GUI there is a drag and drop editor that allows you to model your content and define relationships. For the more advanced users, the system is open source which allows you to modify, extend, and adapt the system to your needs. However the entire system is built on top of serverless infrastructure and with serverless infrastructure in mind, allowing you to save 60-80% of your cloud costs and only pay for what you use.

Serverless computing still has some major challenges to overcome especially when building full applications. Performance in terms of cold starts is still a problem. The same elastic nature that enables cost savings by spinning down and spinning up instances of serverless functions also means that startup time is often measured in seconds rather than milliseconds. Data storage can cause compliance and security issues. Finally, monitoring and debugging become hard when you are dealing with a multicomponent architecture. However, solutions like Webiny that solve some of these problems are actively being worked on and new and existing problems are solved every day. It looks like serverless computing is here to stay. 

Webiny supported platforms and integrations

Serverless computing is the next logical continuation from cloud computing. Now not only is the bringing up and maintenance of servers abstracted away but the actual servers are abstracted away. However, though there are various infrastructure providers that provide serverless functions and many solutions that help you run, deploy, and monitor serverless functions, Webiny is the only solution to help you actually code a serverless application. It’s an easier way to build serverless apps while saving on infrastructure and maintenance costs. It supports a wide variety of databases, serverless services, and deployment software with many more options coming soon. See their website for more info and quick start guides. 

 

Ashvin Nihalani

San Francisco, CA
Education: B. Eng, EECS, University of California

Originally from Texas. Graduated from Berkeley with an B.Eng in EECS. Interested in basically anything, well anything interesting. More recently focused on Machine Learning, Blockchain, and Embedded Systems.

Software Daily

Software Daily

 
Subscribe to Software Daily, a curated newsletter featuring the best and newest from the software engineering community.