by infinisil · 9y ago · 0 comments
[1]: http://ipfs.io/
A missing piece is decentralized compute at scale. That's hard, especially for security reasons.
It's too bad Amazon branded "serverless" because lambda is not serverless. It's one big mainframe server. This stuff is serverless.
First, you don't get something for nothing. So you need computers (surprise). Now, how do you share code? You can share code directly via IPFS. Now, admittedly, binary is the fastest, but limits your architecture rather greatly. So an interpreted language seems better.
I'm looking at Erlang, given its functional attributes and ability of swapping code with no downtime. It also works in a cluster.
I also look at Tor for entry points to get requests on these machines. We already can interact with IPFS for files, but it has no logic capability. And Ethereum is a joke in many ways (and it simply can't interact outside its blockchain).
The idea: IPFS filestore for storing functions, and chaining IPFS hashes to be ran by a Erlang cloud connected by Tor Onion links.
It's not completely serverless computation, but you can ideally abstract out the server so it doesn't matter where it is, or who handles it.
Other ways to go about this would be homomorphic encryption (way too computationally expensive at this time)... Or some sort of trusted computing (shudder).
Ethereum is/was pretty interesting; but as with all blockchains, it's solving a globally-distributed byzantine/trustless problem, at the expense of being massively inefficient.
It's a good idea for that domain, but such constraints don't apply to the majority of computing problems. For example, Web app A might want its events to appear in the same order to all of its clients, and Web app B might want the same for its events, but there's no reason to enforce that all clients of all apps see all events of all apps in the same interleaved order, in an open world where new apps can be created without any central authority, and where no app or client trusts any other app or client.
Regarding a practical language, I think something like Morte/Annah/Dhall would be nice as a way to:
- Use pure functional computation as a powerful 'sandbox' against causing nasty effects or having results affected by outside interference
- Use IPFS URLs as function names
- Use Church (et al) encoding and strong normalisation as a form of statically-checkable duck-typing (i.e. if it encodes to a duck, then it's a duck)
* JavaScript function to run, stored on IPFS
* Input data stored on IPFS
* Result of the execution gets stored on IPFS and hash written as contract fulfillment
Look at the DAO. It's more than enough reason to dismiss this as a libertarian capitalist's experiment, with straight up dictatorialism if they don't get their way.
If I'm writing a mobile app that needs heavy compute (too heavy for small mobile devices) can I distribute that compute across larger peers like desktops, NAS boxes, etc.? Not easily and not if it involves anything that anyone might ever want to attack or spy on.
Or is there another way to outsource computation in a secure manner?
might be worth asking there