Presentation is loading. Please wait.

Presentation is loading. Please wait.

Poor Mans Cluster (PMC) Johny Balian. Outline What is PMC How it works Concept Positive aspects Negative aspects Good and Bad Application ideas Monte.

Similar presentations


Presentation on theme: "Poor Mans Cluster (PMC) Johny Balian. Outline What is PMC How it works Concept Positive aspects Negative aspects Good and Bad Application ideas Monte."— Presentation transcript:

1 Poor Mans Cluster (PMC) Johny Balian

2 Outline What is PMC How it works Concept Positive aspects Negative aspects Good and Bad Application ideas Monte Carlo example Q&A

3 What is it? PMC is a library for PHP Provides parallelization methods like MPI Written in PHP Open source, still in beta stage, you can participate on:

4 How it Works Master Slave 1 Slave 2 Slave 3 Slave 4 1) Master sends jobs to Slaves

5 How it Works Master Slave 1 Slave 2 Slave 3 Slave 4 2) Master waits, slaves execute job While(#results != #slaves) sleep(1); Execute job

6 How it Works Master Slave 1 Slave 2 Slave 3 Slave 4 3) Slaves are done, they can either send result to Master or to another place (eg: database) The code of the slaves and the results are stored in files (we’ll see later how communication is done)

7 Concept The concept is the same as MPI But MPI is limited, its not practical to use on the web, you can’t install it on 4$ servers! That’s where PMC comes handy, its main idea is to make it run on almost any web server. Hence the name, Poor Mans Cluster

8 Positive Aspects (to name a few) Very cheap to maintain, servers cost 4$/month, a cluster of 100 slaves will run at 400$/month (relatively cheap) Easy to install, upload the files on the slaves and add the slaves to the masters config file, the master takes care of everything after that. Open source all the way (Linux,Apache,PHP,PMC) Very easy to use for web applications since PHP is a web language. …

9 Negative Aspects Big communication overload (a msg takes from seconds)

10 Good Application Ideas… PMC is mainly used for high bandwidth web applications, such as crawling the internet, because PMC is installed on web servers which have very high speed internet connections. 100 slaves with 1mbps each = 100 mbps for the application! The applications can range from security to anything you can think of, example of security: you can tell the slaves to ping a website (DoS) with large packets, this way you can test if the website is vulnerable to DoS attacks… (not recommended but doable!) You can make a powerful search engine by crawling the web using the slaves…

11 Bad Application Ideas Applications that heavily rely on the processor are not recommended unless you have dedicated servers (over 100$/month) Examples of bad applications for PMC are: Monte Carlo Genetic Algorithms…

12 Monte Carlo example Master Slave 1 Slave 2 Slave 3 Slave 4 Master sends the jobs to the slaves

13 Monte Carlo example Master Slave 1 Slave 2 Slave 3 Slave 4 Random.org The slaves will fetch random numbers from random.org While(#results != #slaves) sleep(1);

14 Monte Carlo example Master Slave 1 Slave 2 Slave 3 Slave 4 While(#results != #slaves) sleep(1); Execute job true

15 Monte Carlo example Master Slave 1 Slave 2 Slave 3 Slave 4 While(#results != #slaves) sleep(1); Calculate average and output false

16 Source Code

17 Screenshot

18 Questions?


Download ppt "Poor Mans Cluster (PMC) Johny Balian. Outline What is PMC How it works Concept Positive aspects Negative aspects Good and Bad Application ideas Monte."

Similar presentations


Ads by Google