Apache mesos Communication architecture between modules

Source: Internet
Author: User
Keywords Apache mesos
Tags apache based communication framework functions listening open source open source library

1. Introduce

The Mesos consists of four components, respectively Mesos-master,mesos-save,scheduler and executor, which are based on protocal buffer between the components actor Model for communication (using Open Source Library libprocess). That is, each module is a server (in fact, a socket server) that listens to messages from other modules, and when a message is received, the corresponding message handler function is invoked to handle it.

(What is Apache Mesos?) Reference: "Unified resource management and scheduling platform (System) Introduction", this article analysis based on Mesos SVN Revision 1327410.

2. Overview of communication frameworks

For a computing framework (such as Hadoop,spark, etc.), if you want to access Mesos, you need to write two components, Frameworkschduler and Frameworkexecutor, respectively. The two components implement the scheduler and executor interfaces, respectively, through the Schedulerdriver and Executordriver access Mesos, such as the black dotted line in the figure, which indicates that these components are related through function calls.

Other components, that is, mesos-master,mesos-save,schedulerprocess and executorprocess, communicate through the messaging mechanism (using the Libprocess Open Source Library).

(1) "Schedulerprocess and Mesos-master": Mesos-master allocates resources for each framework, which are passed directly to schedulerprocess and then called by schedulerprocess Frameworkscheduler related functions, which are assigned by Frameworkscheduler to tasks in the framework and returned to Mesos-master, forwarded by Mesos-master to the corresponding mesos-slave.

(2) "Schedulerprocess and Mesos-slave": If the Mesos-slave address is saved in schedulerprocess, the relevant message is sent directly to Mesos-slave. No more forwarding by Mesos-master.

(3) "Mesos-master and Mesos-slave": mesos-master management mesos-slave, such as monitoring slave health status, etc.

(4) "Mesos-slave and executorprocess": Mesos-slave is responsible for managing the executor of each framework and allocating resources for executor.

As shown in the following figure.

3. Message types and their processing functions

message types and processing functions of 3.1 Mesos-slave

message types and processing functions of 3.2 mesos-master

message types and processing functions of 3.3 Scheduler

Located in Sched/sched.cpp, implemented by Schedulerprocess/mesosschedulerdriver

message types and processing functions of 3.4 executor

In file Exec/exec.cpp, implemented by exectorprocess

you might also like: 1 Apache mesos overall architecture 2 Apache Mesos underlying base 3 uncover the distributed cloud computing framework you don't know

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.