Search code examples
mesosmesosphere

Mesos HTTP API vs Native API


I am trying to write a framework on top of Mesos and so far I was able to download Mesos for Ubuntu and start a master and slave on a single machine.

I want to build a Mesos framework using Python, should I use the HTTP API or the native API? What is the difference between them?

I was able to find no documentation on the Python native API, except for some examples.

The HTTP API has documentation but no examples on how to use it. Should I be building a web service if I choose to use the HTTP API?


Solution

  • You should use HTTP API

    Native API is easiest way to build Mesos Framework. Just include lib in your project and implement interfaces. Although it comes with some limitations:

    • Native API is no logger extended, new features goes only to HTTP API e.g., Maintenance Mode MESOS-2063
    • Native API require mesoslib to be available on system. This makes hard coupling between framework and platform it runs on. With HTTP API you can run your framework on any system no needed to load mesoslib.

    Documetnation for HTTP API exists here. It's language agnostic. So there are no examples in python, rather raw HTTP requests. But there are some tutorials how to use it. I can recomend one givien by Marco Massenzi at MesosCon EU 2015 Video Code Slides