Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

GSoC 2013 xmpp

magnific0 edited this page Feb 25, 2014 · 1 revision

Table of Contents

Interactive Cloud Optimisation via Google Talk (XMPP)

Project Description

left In order to increase PyGMO's usability and interactivity as well as improve user convenience and experience, we would like to extend PyGMO to be accessible through Google Talk interface. It will allow PyGMO users to turn their computer effectively into an optimisation server which can be controlled by sending commands via Google Talk and check on the progress of their jobs on remote computers or even mobile devices (i.e. Android phones and tablets).


The student will be mentored to implement in Python a modular and extensible application that will provide as many as possible of the following functionalities:

  • Create an interface to PyGMO via Google Talk to create an optimisation server on their own computers which could then be remotely accessible;
  • Ability to execute the full set of existing PyGMO commands on the server from a remote client;
  • Sending new problems/algorithms/topologies from a remote client either directly via text (meta-language or Python code) in the chat window or by uploading a description file via Google Talk;
  • Displaying objects and data visually on an appropriate remote client (graphs, archipelago topologies, etc.);
  • Implementing new methods that would allow a user to remotely check up on the progress and details of an optimisation process during run time;
Implementation Details: The student will be asked to implement the Google Talk communication functionality in Python and XMPP/Jabber.

The student is asked to write clean and well documented code.

Skills Required: Knowledge of Python and XMPP

Skills that help: Previous experience with web development and a good understanding of communication protocols

Mentors: JJ Merelo, Wiktor Piotrowski, Annalisa Riccardi

Student: Marcin Ciechowicz

Coding plan

Period Goal Further description
17.06-24.06 Gathering requirements, use cases, designing During the week should be prepared draft of interface, protocol etc
24.06-01.06 Interface mock implementation, problem representation design During the week should be provided mock objects for PyGMO agent interface. Problem representation should be described by this time.
01.07-08.07 Simple communication During the week simple communication between agents should be possible (possible with xmpp usage)
08.07-15.07 First milestone First milestone is achieved when agents are able to exchange simple problems and results (one way communication only is acceptable at this time)
15.07-22.07 Implementation Coding (additional communication protocols (xmpp, rest, websocket, other ?)
22.07-29.07 Implementation Coding (Description will be updated).
29.07-02.08 Midterm! Everything that has been created by that time must be prepared for evaluation.
03.08-10.08 Second milestone Second milestone is achived when agents are able to exchange user definied problems as well as graphical results of task. there should be no visible difference between normal and remote operation.
10.08-18.08 Robust communication (timeouts, missing agents handling). Description will be updated
18.08-25.08 Simple agent/hub job balancing Description will be updated
25.08-01.09 Third milestone Description will be updated
01.09-08.09 Goal will be updated Description will be updated
08.09-15.09 Fourth milestone Code freeze (core code cannot be changed after this time).
15.09-22.09 Bonus week Bonus week for missing features, documentation, tests, additions/fixes suggested by mentors etc
22.09-27.09 Project deadline Everything should be finished by this time.

Weblog

Use Case

As a baseline for the project we have discussed a use case we would like to have. This is a living text and will be modified throughout the project as to be able to be flexible and realistic.

on computer 1 .... import PyGMO %commands to create achipelago archi ag = PyGMO.agent(id='dario.izzo', pwd = 'dariopass') ag.create_hub('ACT', pwd='ACTpass')

subsequently on computer 2 ....

 import PyGMO
 ag = PyGMO.agent('wiktor', pwd = 'wiktorpass') 
 ag.list_hubs()
 % it returns the list of available computational hubs ex ['EPFL', 'ESA', 'ACT'...]
 ag.login('ACT','ACTpass')

back on computer 1 ...

 ag.list_agents('ACT')
 %  it returns the list of available agents in the network, in this case ['wiktor']
 archi_wiktor = ag.send_obj(archi,'wiktor')
 x = archi_wiktor.get_champion()

meanwhile on computer 2 ....

 %deserialization of the object archi
 %actual pagmo::archipelago::get_champion() method is run
 %result is returned to computer 1 in a serialized form

Comments: - PyGMO.agent is a new object of PyGMO encapsulating both the client and the server

- create_hub() allows to create a hub. A hub is a group of PyGMO agents willing to contribute to some optimization. The agent who creates a network is the administrator of it and the only one able to shut it down (here comes the need of having a password to identify agents)

- PyGMO.agent.login() the agent that calls this function, if succesfull, become part of the hub it joined and allows other agents to send him jobs and he can send jobs as well to all the other agents in the network. The agent who created a network automatically logs into it.

- A lock mechanism (or a job queue) needs to be created as to deal with multiple job requests

- PyGMO.agent.send_obj() is the cool part of this interface. It returns an object of a new type (remote_object). This remlote object is binded to the remote objevts created on the remote machine and responds like it, but the real computations are done remotly.

Clone this wiki locally