General purpose library for Mesos framework development
This library aims to be a general purpose Golang library for writing Mesos frameworks.
Mesos frameworks, at a minimum, require a scheduler to tell the framework how to run tasks on the cluster when offers come in.
If you are unfamiliar with the Mesos architecture you can find more information here.
This SDK specifically targets the newer V1 streaming API of Mesos. V0 support is not provided. The API can be broken down into a lower-level API as well as a higher-level API which provides more abstractions at the cost of being more opinionated.
The Low-level API gives maximum flexibility to the developer.
In this case, the low-level API is simply the protobufs that are generated by protoc, along with the defined interfaces per component.
We use the standard protoc implementation and pull directly from the official Mesos codebase to keep versioning simple. This allows us to pull protobufs for a specific version of Mesos and run protoc to generate the appropriate bindings.
The high-level API takes an opinionated stance on the architecture of a mesos framework.
A basic framework will handle, at minimum:
A basic framework can then be minimally made with a scheduler, event controller, event handler, task manager, and resource manager.
These four components will be enough to handle the previous mentioned responsibilities of a basic Mesos framework.
Using the default implementation of the high level SDK will make this easy.
The only custom logic one needs to write is the event controller. This is a sort of "router" that routes events coming from the Mesos master and passes them off to your event handlers.
You will need Go 1.7 at the minimum. Note that the SDK is link-only and not built on its own.
Tests can be run with make test
. Similarly, you can run benchmarks with make bench
.