I’m not entirely sure whether there are resources available (yet?), but I can attempt to explain it crudely. I’ll throw a bunch of terms around which you can either Google about, or ask for more info here
So, you’ve got the devices (Core/Photon/Electron/whatever), the Cloud (servers), and the client (user owned computer, devices, etc).
Let’s say you want to call a function.
Upon connection to the cloud (over TCP if I’m not mistaken), the device will broadcast its information (exposed variables, functions, and some special information regarding firmware versions). That will get registered in the cloud, and is exposed over a REST API. These are the HTML endpoints you make HTTP requests to, in order to get your desired information/action.
So, when you call a function with an HTML request, this gets processed at the REST endpoint. This checks whether the function is available (and the device is online, obviously), after which it will send the necessary information to the device over TCP.
The cloud is mainly the middle man that will pass your HTTP request on to the relevant device.
Getting a variable:
Device tells the cloud about exposed functions/variables when connected.
HTTP request -> REST endpoint -> cloud TCP to device -> device TCP to cloud -> REST endpoint back to your HTTP request.
Since it mostly (completely?) runs on node.js, you might want to investigate that specifically. I suspect they’re using something like Express to set up their endpoints, but they’d have to confirm that.
Anyhow, this is how I suspect it works. No guarantees that it does. Confirmation, or further explanation, from @dave would be nice. Alternatively, you could dive in to the Local Cloud, and see how that works. Should be very similar.