Serverless computing is rewriting the rules of web architecture. This technology is allowing developers to move into an infinitely expandable space where the development of an application itself has changed and single lines of code are becoming discreet, agile actions. Here’s why it’s such a game-changer.
From a “Server Closet” to the Cloud
Twenty years ago, every company had at least one on-premises server, usually stuck in a small space in the back of the building, affectionately referred to as “the server closet” (as you can see in the image above). While employees would use their individual desktop computers to send emails or use word processing programs, the business’ servers handled all the more complicated functions such as corporate databases, accounting applications, and customer relationship management (CRM) applications.
In the late 90s, Salesforce pioneered the concept of cloud computing with their battle cry of “No Software.” The idea was that instead of installing software on some server in the company’s “server closet”, Salesforce would store their data and users could access it via the internet.
The advantage was that the company no longer needed to manage the server and all the software that was installed on it—you simply logged onto salesforce.com and you could run your business.
While Salesforce gained vast adoption, and expanded its platform to allow developers to build more than just CRM applications, the company’s “server closet” still had to exist. This is because there were enterprise applications that simply did not run on Salesforce: email applications, accounting applications, enterprise resource planning (ERP) applications, and most predominate “home-grown” legacy applications.
Enter Amazon’s EC2, Elastic Cloud Computing. EC2 was created to “lift-and-shift”—that is, “lift” the many servers that were left in the “server closet” and “shift” them to Amazon data centers. The incentive for companies to do this included:
- The ability to size the server to the applications—instead of “one server-size fits all applications” you could now buy small servers for applications with a limited number of users, and larger ones for critical enterprise applications.
- The advantage of never having to worry about a server going down or crashing; Amazon manages hot-swappable backs of everything—CPU, RAM, disk space, connectively, even the data center itself has a back-up.
- And of course, price. In the “server closet” you paid for the full server 24 hours a day, 365 days a year, whether you needed it or not. With EC2, you could turn the servers off at night, and spin them back up in the morning—only paying for what you used.
While EC2 solved the problem of managing the “server closet,” developers were still responsible for the management of the servers. They still had to make sure they were sized correctly, they were responsible for system patches and virus scanning. They also had to make sure they didn’t install conflicting versions of software that would crash the server.
The Arrival of Serverless Computing
While EC2 alleviated the burden of IT troubleshooting, there was still one problem it didn’t solve: the ability to scale efficiently. Developers were now free of the burden of managing the infrastructure, but they still needed to manage scale.
In the new age of connected products and devices, many businesses are tracking millions of data points on potentially thousands of devices. In the IoT, there is no longer time to perform server upgrades to handle peak periods; systems must be able to scale automatically and infinitely. Enter Amazon’s serverless computing.
With serverless computing (i.e. Amazon Lambda), all the developer does is upload their code, one function at a time. There is no need to worry about server software, server instances, server size, or the amount of traffic that might be accessing your application. All the maintenance, monitoring, and scaling is managed by Amazon. While there are certainly “servers” someplace deep in the stack of resources, the idea of serverless computing is that all the effort and expense of maintaining the servers are removed from being the responsibility of the developers.
The Benefits of Serverless Computing
This means that you don’t have to manage your server, so you don’t need to worry if the server needs updating or the OS needs patching. You don’t have to worry about versions of software, and crucially—you don’t have to pay for all the time that no one is using the server.
With EC2, companies were charged by time the server spent “active,” so if the server ran for eight hours you would be charged .0x per hour, regardless of whether users were accessing the system or not. Now with serverless computing, you are only charged for the number of milliseconds in which your code is executed. If there are no users, there is no charge.
In addition to this, developers are free to use their programming language of choice. In the old, server-based world, a server was built to run a specific language, for example, java, python, or node. In the new, serverless world, a java developer and python developer can be working on the same application, each taking advantage of the mastery of their chosen language to build a common application—now much faster, because neither needs to learn a new language.
But most importantly, the benefit of serverless computing when developing Internet of Things applications is the scalability. While building a connected product application, a developer generally has no way of knowing when or how many devices could be sending data. Therefore, the application must be able to handle one device or one million devices. Clearly, you don’t want to pay for a system capable of handling a million devices, when you’ve only got one in the field.
Of course, there are still some advantages to using a server. If your cost per use is very high, a server may make the most business sense. But for many businesses, rather than paying for a server that reserves bandwidth for all of your device functions around the clock, a serverless system is the smart business decision.
Which gets us to this new era.
What’s arising today is a significant new space for innovation within the IoT industry. When I co-founded ThingLogix in the spring of 2014, it was built entirely on this new reality of serverless computing.
We architected a platform called Foundry that runs on top of the AWS serverless stack of services, such as AWS IoT, Lambda, DynamoDB, API Gateway, Kenesis, and so on. Foundry is more than an “application” or a “product,” it represents five years of research and development into how to build the best possible framework for creating IoT solutions.
In my 25 years of application development, I have seen many different ways to solve a technical problem, and I’ve maintained that there are often many equally good solutions to one single problem. However, when it comes to developing IoT solutions, the Foundry architecture is perhaps the single best solution out there. I can say this with confidence because we built an inadequate platform five different times before AWS released it’s serverless stack. Each time we hit a wall when trying to scale. The AWS serverless stack changed everything and opened the gates to Foundry.
Foundry is to IoT what Salesforce was to CRM.
Foundry is to IoT what Salesforce was to CRM. Suddenly, companies don’t need to invest in servers or software anymore. They don’t need to worry about hiring the right IT person to build a system that will deliver their unique solution. You don’t need an enormous budget to get your proof-of-concept up and running—and most importantly, you don’t need to worry about scale or performance. This represents a tremendous new creative space for developers to step into, where they are free to unleash their innovative ideas.