Poor Mans Cluster PHP library to run a cluster

I’ve been cleaning my laptop today, and came along a project I did for my Parallel Programming course, I’ve never published this because the code was never completed as I lost interest, the challenge was the idea and the concept, anyone can write a piece of code :) but few people can come up with innovative ideas!

I came up with the idea of writing a PHP library which will make my multiple servers work together in running a certain job, back then I had access to around 5 shared servers, 3 were mine, and 2 were from friends… As an example, I ran Monte Carlo using this concept. One server was the master, the other 4 were slaves. The master sent the jobs to the slaves, the slaves got random numbers from random.org, calculated the integral, and sent the results back to the master. Once the master received all the results, it calculated the average and outputted the result. This was just a simple example I did to prove that my idea worked…

Here is the power point presentation I wrote, you can download it below:

Slide 1 Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 Slide 8 Slide 9 Slide 10 Slide 11 Slide 12 Slide 13 Slide 14 Slide 15 Slide 16

And here is the source code, please keep in mind that the code was written only to demonstrate that the concept can be done, it’s far from complete, I don’t advise using it, I’m simply uploading for people to learn from, or if someone wishes to work on it (i’ll be glad to help!).

Master Source

Slave Source

Power Point Presentation

Let me know what you think of it!

This entry was posted in Client-Server, Cluster, Parallel Programming, PHP, Programming, Project, Tutorials. Bookmark the permalink.

2 Responses to Poor Mans Cluster PHP library to run a cluster

  1. Adi says:

    Incidently its seems like a early version of googles map reduce! You should take this forward and implement it on similar design. :-)

    adi

  2. admin says:

    nice :D iv never heard of googles map reduce before… i used a modified version of this for one of my projects which involves crawling, it worked flawlessly :)

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>