Note:This is a Beginning for Understanding the Framework of Mesos.
Mesos Frameworks
Frameworks
The Architecture of Mesos:
Apache Mesos is offen explained as being a kernel for data-centre, meaning that cluster resources (CPU, GPU, RAM, Disk…) are tracked ad offered to “user space” programs(i.e Frameworks) to do computations on the cluster.
From the above figure
Register The Framework
One of the first things that a Mesos Framework should do is to register itself with the elected Mesos master so that it can start receiving resource offers. These offers then need to end up in our scheduler implementation. In Java we can use the MesosSchdulerDriver to take care off this wiring for us. we set our new MesosSchedulerDriver up by passing in a reference to our scheduler and by telling it everything it needs to know to communicate and register with the Mesos master.
If we want wo develop our own Framework, the Library and the Interface below need to be included.
- The Scheduler Library Of Mesos
- The Executor Library Of Mesos
- The FrameworkScheduler Interface
- The FrameworkExecutor Interface
- Run FrameworkScheduler
- Run FrameworkExecutor
The first thing a Framework insterting into Mesos is to prepare two stuffs:
- One is the Scheduler of Framework FrameworkScheduler, a core class to schedule the resources achieved from Mesos-Master and execute the tasks that match the resources. FrameworkScheduler insteract with Mesos-Master trough MesosSchedulerDriver.
- The other is the Executor of Framework Execute the tasks that Frameworks deploy on Mesos-Slave.
When we create a FrameworkScheduler instance, with the (FrameworkID, MasterID, FrameworkScheduler) create SchedulerDriver instance. The instance of SchedulerDriver use for two things:
- Manage the FrameworkScheduler all the life-cycle, include start, stop, wait…