title: Apache Mesos Schedulers and Executors by example
body: <p>I am trying to understand how the various components of <a href="http://mesos.apache.org/">Mesos</a> work together, and found <a href="https://www.digitalocean.com/community/tutorials/an-introduction-to-mesosphere">this excellent tutorial</a> that contains the following architectural overview:</p>
  
  <p><img src="https://i.stack.imgur.com/4Fgau.png" alt="enter image description here"></p>
  
  <p>I have a few concerns about this that aren't made clear (either in the article or in the official <a href="http://mesos.apache.org/documentation/latest/">Mesos docs</a>):</p>
  
  <ul>
  <li>Where are the <em>Schedulers</em> running? Are there "Scheduler nodes" where only the Schedulers should be running?</li>
  <li>If I was writing my own Mesos framework, what Scheduler functionality would I need to implement? Is it just a binary yes/no or accept/reject for Offers sent by the Master? Any concrete examples?</li>
  <li>If I was writing my own Mesos framework, what Executor functionality would I need to implement? Any concrete examples?</li>
  <li>What's a concrete example of a Task that would be sent to an Executor?</li>
  <li>Are Executors "pinned" (permanently installed on) Slaves, or do they float around in an "on demand" type fashion, being installed and executed dynamically/on-the-fly?</li>
  </ul>