An erlang binding for mesos. Currently working towards support for the 0.18.0 version.
erlang-mesos had been implemented as a nif. Messages are sent via the nif to mesos and mesos callbacks into erlang asynchronously. Although nifs are never ideal the asynchonous implmentaion of mesos lends itself nicely in this case.
The modules - scheduler.erl and executor.erl are directly equivialant to their counterparts in mesos. To add your own mesos scheduler or framework you implement the behaviours that they expose.
There is an example framework (scheduler) and executor in the src directory.
Install protobuf version 2.5 - mesos 0.18.0 requires a release >= 2.5
sudo apt-get install g++ gcc
git clone .....
cd erlang-mesos
Get the project dependancies
./rebar get-deps
Compile the application including the generated modules from the .proto file
./rebar compile
After that you should be all set with a
./rebar compile skip_deps=true
To run the example framework from a command window
erl -pa ebin
example_framework:init().
Note this will only work on a single node (development) cluster due to the way the example executor is run. This is only for convenience whilst developing.
erlang-mesos is a new library interfacing over a nif to a rapidly changing library so for the love of all things holy run please in another erlang node....maybe on mesos!
To debug mesos you can use the following enviromental variable before starting up the erlang runtime.
GLOG_v=1 erl -pa ebin
- c/c++ code review
mesos-go was an extremely helpful examplar