A simple and idiomatic Clojure facade around the Mesos JAVA API
Contents
- About
- Resources
- Usage
- Examples
- Namespaces
- Type Conversions
- Release Notes
- Contributor Resources
- Donating
Mesomatic provides facilities to interact with Apache Mesos from clojure. It provides a simple and idiomatic facade around the Mesos JAVA API and facilities to help when writing mesos frameworks.
Mesomatic versions match the API version they target, a trailing minor
indicates the patch release number, for instance version 1.0.1-r0
will
target mesos 1.0.1
.
Note that the clojusc Github org has volunteered to maintain the
library originally created by pyr at pyr/mesomatic
. The new location,
clojusc/mesomatic
, is now the offical home for the library.
- An excellent Mesos presentation from ApacheCon 2014
- pyr's Euroclojure 2015 talk on Mesomatic
Add this to your leiningen profile:
:dependencies [[clojusc/mesomatic "1.0.1-r1"]]
If you want to use the core.async facade, you will need to pull it in as well:
:dependencies [[clojusc/mesomatic "1.0.1-r1"]
[clojusc/mesomatic-async "1.0.1-r1"]]
Be sure to examine the example frameworks built with mesomatic.
mesomatic.types
: contains a facade to and from all protobuf types.mesomatic.scheduler
: facades for schedulers and scheduler-driversmesomatic.executor
: facades for executors and executor-driversmesomatic.async.executor
: produce executor callbacks on a channelmesomatic.async.scheduler
: produce scheduler callbacks on a channelmesomatic.helpers
: utility helpers for cluster decisions
To go to and from protobuf types, mesomatic uses two simple functions:
pb->data
: yields a data structure from a mesos type, usually in the form of a record.data->pb
: converts a data structure to a mesos type.->pb
: convert a plain map to a mesos type hinted at by a keyword
By yielding records, mesomatic provides elements which are homomorphic to maps and can easily be converted back to protobuf.
A few cases do not yield records:
- Scalar values (
Protos.Value.Scalar
) yield doubles. - All enums yield keywords.
- Set values (
Protos.Value.Set
) yield sets. - Some types containing a single repeated field are unrolled
as a seq of their content, such as
Protos.Value.Ranges
.
- Target mesos 1.0.1
- Support for GPU resources
- Updates for API changes in Java bindings
- http://mesos.apache.org/documentation/latest/upgrades/
- https://github.com/ContainerSolutions/minimesos
- https://github.com/ContainerSolutions/minimesos-docker
- https://github.com/katacoda/minimesos-examples
- https://github.com/mesos/elasticsearch/tree/master/system-test/src/systemTest/java/org/apache/mesos/elasticsearch/systemtest
A donation account for supporting development on this project has been set up on Liberapay here:
You can learn more about Liberapay on its Wikipedia entry or on the service's "About" page.