umegaya/luact — pull request #3 by umegaya (2014-12-23 07:41:49+00:00)
Title: Umegaya/feature/vid

#### purpose
implement Orleans style robust actor system.
we give file-system style unique name for such an actor.
vid is looks like below.
```
http+json://great.service.com/users/takehiro
```
yes, it may looks like CORBA, and you do not misunderstood it.
it is an analogy of GIOP for CORBA (and luact messaging protocol is IIOP)
but focus on robustness and flexibility in service design. (great point of Orleans)

#### what is it like?
you can register any actor for any vid.
for example, if actor registered in above vid has a method name hello,
to call method hello, you will be sent POST request with json-packed entity to
```
http://great.service.com/
```
entity is like following (without msgid)
```
["/users/takehiro", nil, "hello"]
```
if actor is stateless, you can put multiple actor in one vid.
request will be assigned to each actor by round-robin basis.

it also provide persist, statefull actor mechanism. each actor has state. and it is durable by copying 3 or 5 nodes by mechanism like raft.
and if the node which actor run on it, is died, another node which has a copy of actor state runs new actor and keep on serving request.

#### how to
I implement them following order
1. implement raft consensus algorithm
2. implement gossip protocol
3. implement persistent distribute hash table (implementation is like cockroach DB)