The following is an excerpt from 'The Infinite Machine'
Modern cloud based systems are a true wonder of the world.
Only a very short time ago, if you wanted to build computer systems at scale, you had to own servers and networks and maybe buildings, and employ armies of clever people to plan and coordinate and operate all that infrastructure.
Now, if you’ve got your credit card handy, you can sign up for a cloud service and in a couple of minutes be looking at a console like this:
That’s a graph with time along the X-Axis, and number of “instances” (roughly, virtual computers) along the Y-Axis.
What you’re looking at is an unshackling from computational limits, the dream of potentially unbounded scaling. That’s what this publication, The Infinite Machine, is all about, focusing on what I consider to be the world’s best and most underrated distributed computing platform, Google App Engine.
An Infinite Machine is amazing. However, it leaves us with a big, still poorly answered question, which is how on earth are we to program this thing?
Most of modern pop culture computing focuses around front-end development, the world’s bike shed. People agonise endlessly about how they might start some asynchronous task in a single threaded environment and then later respond to the result of that, retaining context and tractability as the size of their software grows. And that’s not an entirely trivial problem. Mostly, but not entirely.
What I notice is that almost all the good answers to this problem are some variant of functional programming.
What would be really brilliant would be if we could abstract away the difficult details of a horizontally scaling distributed computing platform far enough that it would be amenable to similar techniques.
That is, can we do Functional Distributed Programming on the Infinite Machine?
What is Functional Programming?
Functional programming in a nutshell is the ability to program with First Class Functions. First-class functions boil down to the following:
- Higher-order functions: passing functions as arguments
- Anonymous and nested functions
- Non-local variables and closures
- Higher-order functions: returning functions as results
- Assigning functions to variables
- Equality of functions
I’ll address each of these factors shortly. But first let’s reduce the possible solution space.
Emlyn O'Regan is a Co-Founder and the CTO of xapiapps, and the author of "The Infinite Machine"