Startup runs its app without servers or virtual machines
- 21 December, 2015 14:12
The founders of Teletext.io, Marcel Panse and Sander Nagtegaal, are into quirky work rules. For example, when meetings at an earlier startup of theirs went too long, a rule was instituted that speakers must dance while they talk.
Teletext.io, a content management as a service platform, has its own unusual rule: Its developers can’t use any servers or virtual machines.
+MORE AT NETWORK WORLD: How Notre Dame is going all in using Amazon’s cloud | Video: 2015 in the cloud – a year of big moves +
Instead of using on-premises servers or provisioning Amazon Web Services’ Elastic Compute Cloud (EC2) virtual machines, they’ve decided to embrace an emerging trend in the world of application development. They’re building a serverless application. And they’re using AWS’s Lambda to do it.
Machines serve problems
The serverless app trend could “completely change the game for how applications are built and deployed,” says 451 Research Group’s Donnie Berkholz, who tracks the application development market. Much of the trend has been fueled by AWS’s release of Lambda in 2014.
The trend could have a profound impact on infrastructure and operations professionals. It could basically remove the need for ops workers to provision infrastructure, or even manage virtual machines and the operating systems that run on top of them. It enables a devops model that gives coders almost complete control over building and managing the life cycle of an application – from development through to managing it in production.
The Teletext.io team outlined its approach in a post on the website HighScalability.com. It says servers and VMs have disadvantages, such as:
- At least one server or VM needs to be on all the time to serve traffic or potential incoming traffic;
- It requires maintenance of server software and operating systems;
- Scaling is clunky – spinning up a whole other VM to increase compute capacity can be overkill sometimes;
Teletext.io allows developers to make changes to code in production. For example, it could allow a developer to edit HTML code through a graphic interface without having to manipulate the back-end code. (The GIF below shows Teletext.io in action)
Panse and Nagtegaal had some core criteria for their service: It had to never go down and it had to be really fast.
Who needs a server?
In a previous world they may have used services like AWS EC2 VM instances to host the code, Elastic Load Balancers to distribute load, and a relational database service to store data.
Instead, they’re using a micro-services, API-driven, serverless architecture approach. They use three AWS products: AWS API Gateway (which manages incoming API calls and converts them into other AWS jobs); AWS Lambda (the event-driven computing platform that executes actions when required); and DynamoDB (AWS’s NoSQL database as a service).
Lambda, one of AWS’s newer services, is the key enabler. Developers upload their code to Lambda and the system carries out functions. Think of it like the popular app “If This Then That” (ITTT). In both systems, an event triggers actions. For example, ITTT can automatically save a photo taken on your phone to DropBox. Or ITTT can automatically save any update to Twitter in a Google Drive document.
Lambda and ITTT are not related, but they work similarly. Lambda can automatically convert an image uploaded into AWS’s Simple Storage Service (S3) and resize it. Lambda can automatically take information uploaded to a database and place it in an analytics tool for further analysis.
At its most basic level, Panse and Nagtegaal have programmed Lambda so that when a Teletext.io customer takes an action an API call is made to AWS. The API Gateway triggers a Lambda function to run and Lambda integrates with DynamoDB to retrieve stored data needed to execute the user’s request.
This serverless architecture has advantages, the company says:
Functions are only executed when needed, so there are no virtual machines or servers to fail. “Lambda functions … only appear when needed. And what isn't up, can't come down.”
And you only pay for functions that are executed. Teletext.io’s costs correlate directly to how many customers are using the service. When no customers use the service, Teletext.io isn’t paying for Lambda functions to be executed or API calls to be made. The only idle cost is the storage of data in DynamoDB.