Today Microsoft announced Azure Functions, joining Google Cloud Functions and (from 2014) AWS Lambda. This is fun stuff, and might be a big deal.

In the beginning was the server. The last one I ever bought was from Dell; I can remember hauling it out of the cardboard and sliding it into the rack. I pinched a finger badly enough that there was blood on the floor. Then I had to argue with the sysadmin over Debian vs Red Hat.

So, now that we have cloud biggies like the three companies named in the first paragraph [disclosure, I work for AWS]  nobody has to shed blood deploying servers. Even more important, nobody has to find the money to buy the suckers.

But you do still have to have those arguments about operating systems, and how much memory, and the load-balancing setup, and how many servers in the rack. Except maybe not, with Lambda and its competitors.

GAE · I can remember when Google App Engine came out. I was working for Sun then and totally in love with the idea. When I write server-side code I want to think about handling HTTP requests and passing messages and updating databases. I totally don’t care about operating systems and web servers and mostly I don’t even care that much about frameworks like Node and Rails and so on.

Later, when I worked for Google, I wrote a couple of App Engine apps and that was mostly OK; the APIs were nicely-thought-out, but I could never get comfy with the built-in datastore. I honestly don’t know whether Google sees App Engine as a success these days; but way too many people are still configuring operating systems.

Functions · So the new idea, initially from Lambda, now from all the Cloud heavyweights, is that the natural unit of computation is a function, which runs in response to an “Event”. An Event could obviously be an HTTP request, but it could also be a message in a queue or an upload arriving in a datastore. If you’re using CloudWatch Events on AWS [Yay, I helped write that] the Event can be, well, more or less anything that happens in your Cloud deployment.

The first time I got excited was when this engineer who sits near me told me about his wife’s website; she’s a photographer and sells pictures, which occasionally gets high-volume when she shoots classrooms or graduations or whatever.

He was running her site on some low-rent Web framework on EC2 and it cost him under $10/month. Then he re-wrote it as a bunch of static files and a couple of Lambda functions which among other things called out to their payment processor. There was a whole lot less code, and suddenly the bills were under 10¢.

Well OK then, you’ve got my attention now.

Functions? · I think there’s a lot to like about the function as the natural unit of cloud computation. Statelessness is good. No local storage is good. Not much need for proprietary APIs is good.

Are they the whole solution? Obviously not; every Lambda I’ve ever looked at is mostly callouts to databases and REST endpoints and messaging APIs. But they really do mean that you never have to argue Debian vs Red Hat again, and that feels like real progress.

I should disclose that I don’t work on Lambda, although code I wrote is helping send lots of events from AWS services I didn’t write to Lambda functions I didn’t write.

I guess saying that functions are cool is about the safest thing ever, what with Google and Microsoft piling on board. If you haven’t given them a try yet, go ahead, there’s really not much to it.


Comment feed for ongoing:Comments feed

From: Jason Heiss (Apr 01 2016, at 05:29)

Someone should write a web framework (a la Rails) based on Lambda/Cloud Functions/Azure Functions


From: Ian McKellar (Apr 01 2016, at 07:35)

> ev­ery Lamb­da I’ve ev­er looked at is most­ly call­outs to databas­es and REST end­points and mes­sag­ing APIs

To me this means that the database, REST and messaging APIs we have aren't rich enough. We should be able to call them from our clients and have our security and other policies applied.

One interesting thing that Firebase does is that it has a security schema for its database so you can let clients hit it directly. I don't know that what they've built is complete or general purpose enough, but I'd love to see tools like Lambda relegated to interfacing with legacy APIs (oh, and server-side computation I guess) rather than how our clients communicate with every back-end.


From: Chris E (Apr 14 2016, at 08:52)

"There was a whole lot less code, and sud­den­ly the bills were un­der 10¢."

It's difficult to conceptualise this without some more content/context around this.

Don't you need an AWS gateway ?


author · Dad
colophon · rights
picture of the day
March 31, 2016
· Technology (90 fragments)
· · Cloud (24 more)

By .

The opinions expressed here
are my own, and no other party
necessarily agrees with them.

A full disclosure of my
professional interests is
on the author page.

I’m on Mastodon!