Running the Distributed Mandelbrot app

This app (download from Google play) demonstrates sharing jobs on mobile devices using Wi-Fi Direct. This is a prototype developed as proof-of-concept for the Honeybee model for my PhD dissertation. In this app, we generate the Mandelbrot set, with the aid of multiple mobile devices.

Delegator & workers:
The device that offloads work to other devices is referred to as the delegator, and the devices that take on work are referred to as the workers.

Step 01:
Since Wi-Fi Direct is still relatively new, some implementations are somewhat unpredictable. Therefore, I would recommend that the devices be ‘primed’ to use Wi-Fi Direct (especially the p2p group formation) before you run the app. Here’s what to do:

  1. Disconnect from any Wi-Fi network that the device is connected to. A live Wi-Fi connection can sometimes interfere with Wi-Fi Direct transmission. Keep Wi-Fi ‘on’, but ‘forget’ any networks that the device automatically connects to.wifiDisc
  2. Switch on Wi-Fi Direct.                                       wifidon
  3. In this example, we will use 3 devices. The device ‘Android_1’ will be the delegator, and the other 2 will be workers. We will now manually pair the devices and create a Wi-Fi p2p group, where the delegator is the p2p Group Owner (GO). The delegator needs to be the GO as only the GO can ‘see’ and connect to other devices. In the app, this is done programmatically. However, for some devices, things run smoother if the process is manually done first.
  4. Click ‘Search for devices’ on all 3.                       wifidSearchall
  5. Use Android_1 to connect to the other 2 devices.                                  connect3
  6. Done! Now disconnect the 2 devices before running the app. discon1

 

Step 02:
Now the app is ready to run. Run it on all three devices. Select option ‘Look for work’ on the workers (Android 2 & Android 3 in this example). Select ‘Share my work with others’ on the delegator (Android_1), and type the number of ‘iterations’ for the Mandelbrot algorithm. The higher the number of iterations are, the more resource intense the task becomes.
honey2

 

Step 03:
Click ‘Look for work’ on the worker devices.

 

Step 04:
Click ‘Look for other devices’ on the delegator device. This will start the resource discovery on the delegator and soon, the worker devices will be displayed as a list. Click on each entry on the list to connect to each worker.

deleConnect2

 

Step 05:

The delegator would have already started executing jobs in Step 04, in parallel to its resource discovery procedure. Workers start executing jobs as soon as they connect. Although this is not visible on the app, you can see this taking place in the logcat output in the ADT if you connect the devices to a computer through USB.

Some useful log cat tags 
There are several debug tags in the program, that can be used to monitor the program execution. Some of these are as follows:

Jobs done: use on the delegator device. Shows the number of jobs done so far.
Queenbee: use on the delegator device. Shows the end result after the task completes. This outputs the total program time, battery level and no. of jobs done by each device.
RANDOM: use on the delegator device. Shows the heartbeats of the worker devices connected. If a timestamp==null becomes false, this signifies a worker has disconnected. The delegator will add the said worker’s jobs back to the job pool in this case.

Screen Shot 2014-08-19 at 2.36.21 PM

A screenshot of the Logcat output using the ADT plug-in in Eclipse.

Some experiments to try out:

  • Disconnect one or more workers while they are working.
  • Try out the continuous resource discovery by introducing workers at random intervals.
  • Increase\decrease the iteration count.
  • Use heterogenous devices (in terms of computation capability). Which device combinations give the most speedup?

Step 06:

the delegator will display the generated Mandelbrot image upon task completion. Some program stats will also be shown. Exit the program and start again if you want to do more experiments.

endDele

One thought on “Running the Distributed Mandelbrot app

  1. Howardslind

    Your comment is awaiting moderation.

    Thank you, An abundance of posts!
    http://canadianpharmacyntx.com/
    canadian drugs without prescription canadian online pharmacy best online pharmacies no prescription [url=http://canadianpharmaciesnnm.com/]canada drug[/url]
    discount pharmaceuticals
    online pharmacy
    canada pharmacies prescription drugs
    drugstore online
    <a href="http://meier-mediadesign.ch/?s=+Thanks%2C+I+appreciate+it%21+http%3A%2F%2Fcanadianpharmacymim.com%2F+best+online+pharmacy+stores+canadian+online+pharmacy+canadapharmacy+canadian+online+pharmacy+%0D%0Adiscount+prescription+drug+%0D%0Aonline+drugstore+%0D%0Acanadian+drugstore+online+%0D%0Acanada+drugs+online+pharmacy+%0D%0Apharmacy+prices+%0D%0Abuying+drugs+canada”>prescription drug price comparison
    mexican pharmacies shipping to usa

    Reply
  2. Howardslind

    Your comment is awaiting moderation.

    You actually reported it effectively!
    http://canadianonlinepharmacynnm.com/
    global pharmacy canada canadian pharmaceuticals online international pharmacies that ship to the usa [url=http://canadianpharmaciesnnm.com/]canadian pharmacies without an rx[/url]
    prescription cost
    reputable canadian mail order pharmacies
    canadian pharmacies that ship to us
    canada pharmacies online prescriptions
    canadian pharmacies that ship to us
    safeway pharmacy

    Reply
  3. Quentinrophy

    Your comment is awaiting moderation.

    Nicely put, Regards!
    https://nicktambone.com/
    canadian pharmacy reviews global pharmacy canada drugstore online [url=https://nicktambone.com/]canadian pharcharmy[/url]
    <a href="http://shket.ua/product/detskiy-naduvnoy-basseyn-bestway-51110/?DIGNITY=You+actually+explained+this+adequately.+http%3A%2F%2Fcialisttk.com%2F+cialis+si+pu%D0%93%D0%86+dividere+buy+cialis+online+%0D%0Acialis+italia+senza+ricetta+%0D%0Acialis+20+mg&SHORTCOMINGS=You+actually+explained+this+adequately.+%0D%0Ahttp%3A%2F%2Fcialisttk.com%2F+%0D%0Acialis+si+pu%D0%93%D0%86+dividere+%0D%0Abuy+cialis+online+%0D%0Acialis+italia+senza+ricetta+%0D%0Acialis+20+mg&COMMENT=You+actually+explained+this+adequately.+%0D%0Ahttp%3A%2F%2Fcialisttk.com%2F+%0D%0Acialis+si+pu%D0%93%D0%86+dividere+%0D%0Abuy+cialis+online+%0D%0Acialis+italia+senza+ricetta+%0D%0Acialis+20+mg&NAME=Petermen&USED=&RATING=0&PRODUCT_NAME=%D0%94%D0%B5%D1%82%D1%81%D0%BA%D0%B8%D0%B9+%D0%BD%D0%B0%D0%B4%D1%83%D0%B2%D0%BD%D0%BE%D0%B9+%D0%B1%D0%B0%D1%81%D1%81%D0%B5%D0%B9%D0%BD+Bestway+%2851110%29&PRODUCT_ID=28461″>online canadian pharmacies
    canada online pharmacy
    canada pharmacies without script
    ed meds online
    mexican online pharmacies
    drugstore online

    Reply
  4. Quentinrophy

    Your comment is awaiting moderation.

    Cheers, Numerous material.
    https://nicktambone.com/
    mail order pharmacy canada drugs top rated online canadian pharmacies [url=http://canadianpharmaciescubarx.com/]canadianpharmacy[/url]
    online pharmacy
    online pharmacies no prescription
    canada pharmacies without script
    canada pharmacy online
    medical information online
    <a href="http://inv4zi0n.blogspot.com/mailto:viiih.dellicious@gmail.com?subject=canadian+pharmacy+no+prescription+tofs&body=+Useful+forum+posts.+Many+thanks%21+http%3A%2F%2Fcanadianonlinepharmacynnm.com%2F+online+pharmacy+canada+drugs+online+prescription+drug+%5Burl%3Dhttps%3A%2F%2Fnicktambone.com%2F%5Daarp+approved+canadian+online+pharmacies%5B%2Furl%5D+%0D%0Adiscount+pharmacy+online+%0D%0Adrugs+online+%0D%0Aglobal+pharmacy+canada+%0D%0Acanada+pharmacy+online+orders+%0D%0Anorthwest+pharmacy+canada+%0D%0Acheap+canadian+drugs&submit=Enviar”>canada pharmacies prescription drugs

    Reply
  5. Quentinrophy

    Your comment is awaiting moderation.

    Thank you. An abundance of knowledge.
    https://nicktambone.com/
    pain meds online without doctor prescription canadian viagra us pharmacy no prior prescription [url=http://canadianpharmaciesnnm.com/]canada pharmaceuticals online[/url]
    canadian pharmacy no prescription needed
    prescription drug
    canada drug prices
    canada pharmacies online
    <a href="http://meier-mediadesign.ch/?s=+Thank+you%2C+Useful+stuff.+http%3A%2F%2Fcanadianpharmacyntx.com%2F+best+price+prescription+drugs+aarp+approved+canadian+online+pharmacies+northwestpharmacy+canadian+cialis+%0D%0Abest+online+canadian+pharcharmy+%0D%0Acanadian+drugstore+reviews+%0D%0Apharmacy+tech+%0D%0Apharmacy+drug+store+%0D%0Aoverseas+pharmacy+forum+%0D%0Alegitimate+online+pharmacies”>mexican online pharmacies
    price prescription drugs

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *