This is a trivial and incomplete implementation of the linda language.
The purpose is to implement the dinner of the philosopher as described in page 451 of the document Linda in Context from Nicholas Carriero and David Gelernter.
the v0.3 introduces a new primitive: evalc.
evalc works like eval but insted of triggering a new goroutine, it post an event in etcd that is captured by another agent.
Get a description here
See this blog post for more details.
For more information about the v0.1, please refer to this blog post
Running the example
go get -v github.com/ditrit/go-linda
cd $GOPATH/src/github.com/ditrit/go-linda/worker && go build
Make sure an
etcd daemon is available and accessible.
Then export the following configuration vaiable to reflect your settings. For example:
launch 5 workers (one per philosopher):
and launch the main routine:
(or use two separates commands)
This project is not production ready at all and has not been tested. The API may change at each commit.