1 / 11

Actor Model vs Master Worker

Actor Model vs Master Worker. Patterns for Concurrent Reactive Process Design by Emanuele Gherardini (e.gherardini@yahoo.it). Agenda. Who am I ( aka disclaimer ) Why on the earth should we care about this stuff ?! The stuff …. Who am I == !(Who I am not). ! Martin Fowler.

ezhno
Download Presentation

Actor Model vs Master Worker

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Actor ModelvsMaster Worker Patterns for Concurrent ReactiveProcess Design by Emanuele Gherardini (e.gherardini@yahoo.it)

  2. Agenda • Whoam I (akadisclaimer) • Why on the earthshouldwe care aboutthisstuff ?! • The stuff…

  3. Who am I == !(Who I am not) ! Martin Fowler ! Joshua Bloch ! Kent Beck ! Robert Martin ! Brian Goetz ! Martin Odersky

  4. Who I am… Really ^_- 31 Yearsold Software Engineer Always a passionate and enthusiaststudent… 6 years of professionalexperience Working @ Ringmaster: System Architect of the GTech Gaming Platform DO NOT BELIEVE ME (tryit!)

  5. Why should I care? Cloudy reasons… http://www.reactivemanifesto.org/ We (devs) nowhavegreattools…

  6. The question is… Do weknowhow to use them ? Probablynot…

  7. Super-Simple-Use-Case: online tickets

  8. Master-Worker Worker Workers are stateless + Self-tunable + Dynamicscalable + Resilient - Sharedmutable staterequiresLOCKS ‘eventX’request ‘eventX’request Worker ‘eventY’request ‘eventY’request ‘eventZ’request ‘eventZ’request Worker Queue Implementationtips: ride the Camel! (and yourpreferreddistributedmessaginginfrastructure) 1 – Create yourroute 2 – Configureit to be local or distributed

  9. Actor-Model • Actors are stateful • + SharedMutable State doesnotexist: no need for complexconcurrency-awarelogic. • Loadshould be • partitionedat design time ifpossible (or implementedusing Router-Actors, etc) ‘eventX’request ‘eventX’request Actor Business Logic ‘eventY’request ‘eventY’request ‘eventZ’request ‘eventZ’request MailBox Implementationtips: Akka

  10. Comparison: whichis the best? Itdepends… The best results come from choosing the concurrency model by the business process. Near-stateless, heavely loaded, business processes Master-Worker Statefull business processes  Actor-Model

  11. THANKS Questions?

More Related