Analysis / Technology

Serverless Offers a Framework for AWS Lambda

19 Feb 2016 6:27am, by

Using AWS Lambda at scale can be challenging for those that are just getting started with functions, or are new to serverless computing. Particularly if one is in an enterprise environment, getting up-and-running with Lambda in production is a race against time.

unnamed

That’s where the brand new company Serverless comes in. Providing developers with a stateless computing framework to manage IoT, mobile, and web applications running on AWS Lambda and AWS API Gateway, Serverless aims to get devs up-to-speed that are already working on projects in production.

Lambda, though efficient and innovative, offers little in the way of server administration. “When using AWS Lambda in a large project, there are lots of functions that can get disorderly if you don’t have a framework to fit them into,” said Serverless Founder Austen Collins. Initially looking for a way to corral function sprawl somehow, Collins initially worked on Serverless as a side project over the weekends, and when he posted the repository online, the response was immediate.

The Future of App Development Will Be Stateless

Even before launching officially, Serverless was used to build a fully-scalable application to market Guetta’s latest single, according to a  blog post detailing the development from Ryan S. Brown. The app allowed fans to enter a virtual recording studio of their own, with a multitude of unique user data generated with each session, including album art, vocal tracks, and the flag of their favorite team. Built for rapid scaling, Serverless executed the daunting task of powering an application to promote Guetta’s single with ease.

David Guetta 'This One's For You,' application testdroid on Google Nexus 10.

David Guetta ‘This One’s For You,’ application test droid on Google Nexus 10.

The advantages to onboarding Serverless are numerous though there are three primary benefits that will appeal to any enterprise-level developer working with AWS Lambda.

The first, of course, revolves around how the platform got its moniker. Serverless uses stateless computing technology to power its framework, though by stateless they mean developers don’t have to think about managing servers themselves. Though the state and its servers do physically exist, AWS manages them for the developer in question.

“We think Lambda is going to become the focal point of AWS”–Austen Collins, Serverless

With no physical server maintenance to handle, this means there is often very little administration required. With the freedom to containerize their application logic however its users find reasonable, Serverless initially modeled itself after microservices, before focusing on a more data-centric approach to managing an application framework.

Serverless also utilizes the AWS Lambda pricing model. This means that an enterprise considering implementing a Lambda framework at scale will only pay for the compute resources they actually use.

“Everybody has underutilized infrastructure they’re paying for all month. With Lambda, there’s no such thing. You’re only charged when a function actually runs,” Collins said.

Above all, Serverless is agile. By utilizing Lambda’s stateless computing framework, servers, containers, and application orchestration are managed automatically. Developers are then left to handle more important considerations, such as how to containerize the app’s logic.

This One's For You - Backend Architecture Map

The Backend Architecture Map for “This One’s For You” App. Source Parall.ax via Ryan S. Brown.

This agility offers devs both freedom and flexibility to push apps into production that are also easy to scale. Lambda relies on data patterns, which Serverless has interwoven its framework around in order to better support these patterns. Often, when building an application, a developer will use a REST API, along with individual Lambda functions for individual web points.

As the company continues to update its application, Serverless can update each individual API endpoint without affecting any others. “Other people will take a Lambda function and hook it up to multiple endpoints, playing around with a monolith pattern. They may have one or two functions containing all their application’s logic. We use GraphQL to offer them the ability to do that,” said Collins.

Out With the Old, in with the New

Rather than trying to force developers to embrace stateless computing overnight, Serverless aimed for a familiar approach to creating its platform. Trying to keep as close to traditional application development as possible, the company shied away from forcing new patterns on developers. Hyper-awareness of the current community environment surrounding too many different approaches, Serverless embraced traditional principles the developer community had accepted before building out.

There’s no limit to what can be accomplished with AWS Lambda today. Whereas some enterprises are rebuilding monolithic web applications  on the Lambda framework, others have saved hundreds by embracing stateless computing. Collins offered an insight that speaks to the nature of introspective and innovative application development.

“In the end, there’s no monolith applications, no microservices, no nanoservices. There is only your logic and the freedom to draw lines between it — Separating that logic however you’d like,” he said.

By moving away from always-on resources with tiered pricing, or those that charge users based on having their server running, a company could see a significant amount of savings over the year through serverless computing. Often, companies have IT costs set to recur automatically, without realizing they may be only using 15 percent of what they’re paying for. With AWS Lambda, users only pay for functions when they actually run.

AWS Lambda API Call Alert Setup Map

AWS Lambda API Call Alert Setup Map

Getting the most out of Serverless will undoubtedly require potential users to have at least a basic understanding of AWS, but less than you might imagine.

“You really don’t have to know that much. We try to spare people from going to the AWS dashboard, or the AWS documentation. We’d like to offer the entire AWS experience via the Serverless CLI,” said Collins.

AWS Lambda presents a wealth of opportunity to developers working with not only web-based applications, but for mobile and IoT apps as well. By utilizing Lambda and AWS API Gateway, nearly anything a developer can conceptualize is possible to run on the Serverless framework.

Collins notes that users can build an entire REST API backend with Serverless, with a multitude of functions set to respond to AWS events, handle REST, and wait for triggers on a user’s AWS account and execute the desired function.

AWS Lambda Function Upload in Console

AWS Lambda Function Upload in Console

Serverless is this is the first AWS Lambda powered development framework combining application code with infrastructure, Collins claimed. “We think Lambda is going to become the focal point of AWS,” said Collins.

Users can deploy a REST API and application logic to the cloud, control Dynamo, and more.  Serverless also supports multiple programming languages, giving developers the freedom to script their apps in a variety of popular scripting languages. Launching with support for Node.js and Python, Collins notes that Java support is in the works.

In addition to this, Serverless allows developers to combine their scripting languages, with the ability to mix JavaScript/Node.js and Python in the same application. Python support is something new for the Serverless team, as they are primarily Node.js-centric. Serverless is powered by Node.js on both the front and back end, with the majority of its framework comprised of JavaScript.

Using the same language on the front and makes Serverless accessible to programming newcomers or beginner JavaScript devs. Individuals just getting started in application development can look at the Serverless repository on GitHub and understand it without a herculean amount of effort. Collins notes that the team at Serverless strived to make the platform extensible, with a variety of ways to support developers in their efforts to improve the platform itself.

“Devs relate to being able to dig in and hack stuff. A good dev tool has to be 100 percent hackable, and completely modifiable,” he said.

To that end, anything Serverless can do, developers can overwrite or extend with the use of plugins.

The official Serverless website is set to launch in about a week, and will feature contributions from a variety of individuals interested in embracing a stateless framework for AWS Lambda. To-date, Serverless has racked up nearly 7,000 stars on its GitHub repo and shows  no signs of slowing down anytime soon.

Feature image via Pixabay. Embedded images via Ryan Brown.


A digest of the week’s most important stories & analyses.

View / Add Comments