SlideShare a Scribd company logo
Browser-based distributed evolutionary computation




                     Browser-based distributed evolutionary
                                 computation
                                  Performance and scaling behavior


                         Merelo, Mora-Garc´ Laredo, Lupi´n, Tricas
                                          ıa,           o


                                                     July 5, 2007
Browser-based distributed evolutionary computation
   Outline


       1 Introduction
               Ad-hoc Computing
               Stealth Computing
             AJAX at work
       2
               Basic mechanisms
             Ruby on Rails
       3
               Why?
             Distributed Computation on Rails
       4
               General scheme
             Experiments
       5
               Setup
               Tests
             Results
       6
             Conclusions
       7
               All’s well that ends well
             The End
       8
               Thanks for your attention
Browser-based distributed evolutionary computation
   Introduction
     Ad-hoc Computing


What is your computer doing now?




                  Nothing!
Browser-based distributed evolutionary computation
   Introduction
     Ad-hoc Computing


What is your computer doing now?




                  Nothing!
                  ... Probably
Browser-based distributed evolutionary computation
   Introduction
     Ad-hoc Computing


What is in every computer?
Browser-based distributed evolutionary computation
   Introduction
     Ad-hoc Computing


What is in every computer?
Browser-based distributed evolutionary computation
   Introduction
     Ad-hoc Computing


What is in every computer?
Browser-based distributed evolutionary computation
   Introduction
     Ad-hoc Computing


And every browser is a virtual machine


              JavaScript is a standard
              language, with
              implementations in every
              browser.
              JavaScript programs are
              embedded in websites,
              and run within the
              browser
              Limitations: access to
              local files
              Speed? Better don’t ask.
Browser-based distributed evolutionary computation
   Introduction
     Stealth Computing


Again, what’s your computer doing now?




              Javascript programs run
              unnoticed
              And they can call back
Browser-based distributed evolutionary computation
   AJAX at work
     Basic mechanisms


Asynchronous Javascript and XML



              AJAX includes an
              asynchronous mechanism
              of communication based
              in XML
              Important thing about A:
              does not block the
              browser.
Browser-based distributed evolutionary computation
   AJAX at work
     Basic mechanisms


Checklist for AJAX



              Most browser include
              ECMAScript/Javascript
Browser-based distributed evolutionary computation
   AJAX at work
     Basic mechanisms


Checklist for AJAX



              Most browser include
              ECMAScript/Javascript
              Object model is mostly
              compatible.
Browser-based distributed evolutionary computation
   AJAX at work
     Basic mechanisms


Checklist for AJAX



              Most browser include
              ECMAScript/Javascript
              Object model is mostly
              compatible.
              XMLHttpRequest object
              required for async calls.
Browser-based distributed evolutionary computation
   AJAX at work
     Basic mechanisms


A picture is worth a thousand...
Browser-based distributed evolutionary computation
   Ruby on Rails
     Why?


It’s fast and small and sexy



              Well, not really.
Browser-based distributed evolutionary computation
   Ruby on Rails
     Why?


It’s fast and small and sexy



              Well, not really.
              Rapid development
              environment based on
              Ruby (the language),
              AJAX and a RDBMS
              (usually MySQL).
Browser-based distributed evolutionary computation
   Ruby on Rails
     Why?


It’s fast and small and sexy



              Well, not really.
              Rapid development
              environment based on
              Ruby (the language),
              AJAX and a RDBMS
              (usually MySQL).
              Natural communication
              client-server using
              Javascript Object
              Notation (JSON).
Browser-based distributed evolutionary computation
   Ruby on Rails
     Why?


But there could be other alternatives


              Really, all you need is a
              web browser, a server and
              (X)Emacs
              Google Web Toolkit could
              be an alternative
              Also Django, or other
              MVC frameworks.
              RoR was just the first
              thing we thought about
              we knew how to code with
Browser-based distributed evolutionary computation
   Distributed Computation on Rails
     General scheme


There you have it
Browser-based distributed evolutionary computation
   Distributed Computation on Rails
     General scheme


Setting up the algorithms
Browser-based distributed evolutionary computation
   Distributed Computation on Rails
     General scheme


Downloading from server
Browser-based distributed evolutionary computation
   Experiments
     Setup


Experimental setup
Browser-based distributed evolutionary computation
   Experiments
     Tests




              Floating-point tests using
              the 10-variable Griewank
              function.
                             n                 n
                                   xi 2                xi
                                                  cos √ +1
              F (x) =                   +
                                  4000                   i
                            i=1               i=1
                                                   (1)
              20-bit binary
              chromosome.
              80% 2-point crossover,
              20% mutation.
Browser-based distributed evolutionary computation
   Results




Which JS virtual machine?
Browser-based distributed evolutionary computation
   Results




Effect of packet size
Browser-based distributed evolutionary computation
   Results




Scaling behaviour
Browser-based distributed evolutionary computation
   Results




Influence of debugging info on/off
Browser-based distributed evolutionary computation
   Conclusions
     All’s well that ends well


Still at the proof-of-concept stage


                 Stealth/browser-based evolutionary
                 computation shows its promise.
                 Problems at the browser level: low
                 performance of the JS virtual machine
                 as compared with state-of-the-art
                 languages.
                       But that will be solved in the near
                       future with JIT Tamarin
                 Problems at the server level: highly
                 multiprocessing, multithreaded,
                 load-balanced server needed.
                       Or reduce server load by offloading
                       most things to browser
Browser-based distributed evolutionary computation
   The End
     Thanks for your attention


 Any question?




       Visit http:
       //geneura.wordpress.com,
       our group blog!

More Related Content

Dconrails Gecco Presentation