Master Slave Protocol

There are three important tasks in the Master- Slave Architecture to be used for PyTI

  1. Slave Registration
  2. Commanding the slave
  3. Reporting the master
  4. Status reporting

The following protocols is what I propose to be used for the master – slave architecture . I am just concentrating on a simple implementation for now and adding on to it when need arises.

1) Slave Registration :

A new slave wants to register with the master . It sends a request to the master.
The master processes the request and sends and acknowledgement back.
To keep the prototype simple , i didnt include any authentication
mechanism for the slave . The slave simply registers itself with the master by sending a message providing details
Some of the details which the slave needs to send :

  • The platform/architecture of the slave machine
  • The operating system of vm it configures
  • Name and email address of the maintainer

The master acknowledges the slave with either ok or with an error message.

2) Commanding the slave :
When the master detects a new distribution uploaded in PyPI , it wants to command the slave for the distribution to be downloaded and tested.
So the master initiates a test request to the slave .
The slave replies back the master with an acknowledgement.
The slave performs the request as specified by the master(i.e first downloads the distribution to be tested along with the dependencies and then tests the distributions)

P2P protocol

3) Reporting the master :
Reporting the master the following processes when they happen

  1. Distributions downloaded as asked
  2. VM started (i.e testing is in progress)
  3. Tests completed

The master will notified of what a particular slave is currently doing .If the slave has problems with the distributions or during testing, it sends an error message to the master at the appropriate stage notifying of failure.

4)Status Reporting
Now the slave has performed the tests and it needs to send the raw data ( got from the tests output) to the master . Status reporting might require a completely new blog . And will post it once the implementation of the above three protocols are done.

Advertisements

One thought on “Master Slave Protocol

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s