Microservices - golemfactory/golem-rd GitHub Wiki
Replicated state machines with replicated input
In general case we can't really guarantee that provider runs the service honestly - too much complexity. However, if we can represent a microservice as a state machine with replicated input, we should be able to have identical copies of microservice running by multiple providers, with network checking if same input leads to same outputs. If inputs are represented in form of log, we can use such log to start more copies of such microservice. Pros: we can force providers to behave honestly. Cons:
- someone should do the replication
-
- Q: guard node? A: reimbursement problem (Raiden :wink:) Q: verification of guard node's work? ... what if we make guard node a
secure scuttlebuttauthor? Nice thing about guard node is that it's behavior is not application-specific
- Q: guard node? A: reimbursement problem (Raiden :wink:) Q: verification of guard node's work? ... what if we make guard node a
-
- Q: requestor? A: extra load on requestor's network
- time should be provided to machines as a part of input (no local access to clock)
- PRNG should be seeded and may not be influenced by entropy sources (sudo rm -rf /dev/random; apt install mercenne_twister; mercenne_twister seed 4; mercenne_twister install /dev/random)
- application must be well written (only external, explicitly used sources of random values may influence output)
Babl
Babl = script that can be installed on user's machine + server + set of microservices running on cloud. Microservices are registered on the server. Script connects with server and is redirected to proper microservice. Babl prepared an API that allows user to connect microservices using pipes, so user can call:
cmd0 | babl cmd1 | babl cmd2
where
cmd0 may be a simple function producing output like cat or getting streaming from computer camera
cmd1 := microservice with registered identity; more precisely Docker with internet connection routed by Babl service.
cmd2 := another microservice with registered identity
Potential use cases for Golem
- Pinging other computers (like 21.co)
- Website monitoring
- Golem on demand
- video encoding (eg. input from computer camera)
- gnu parallel