SlideShare uma empresa Scribd logo
1 de 21
Fábio Corrêa 
Polelo Research Group 
Computer Science Department 
University of Pretoria 
  The Free Lunch is Over 
  Multi‐core Processors 
  Software Crisis 
  Industry and Academia are in a quest 
   in order to improve this situation 
   before dozen cores arrive and 
   slowdown the whole industry 
  Millions of dollars are being 
   invested in research             Sourc
                                         e   : Intel
                                                     
  Ignored by most developers for years 
  Difficult to master 
  Threads, Locks, Race Condition, Deadlocks 
   and Shared/Mutable State 
  Non‐Deterministic and Difficult to Debug 
  Existing thread implementations 
   are somewhat low‐level 
   and not standardized 


                                    Source: AMD 
  A HIGH‐LEVEL programming model  
 1.  Easier to understand and master 
 2.  Deterministic 
 3.  Non‐shared/Non‐mutable state 
 4.  Utilize all available cores without any re‐
    configuration or re‐compilation 




                                                     ntel 
                                                    ce: I
                                                   Sour
  Actor Model of Concurrent Computation 
  Formalism defined by Carl Hewitt et al. [MIT 
   AI Lab, 1973] 
  Semantics solidified by Gul Agha [MIT AI Lab 
   (Message‐Passing Semantics Group), 1985] 
  Research and implementations done along 
   the years 
  Erlang is the flagship implementation 
  REACTIVE entities that have a unique name 
 (mail address) and, based on an incoming 
 message received through its individual inbox 
 (message queue), can: 
 1.  SEND a finite set of messages to other known 
     actors 
 2.  CREATE a finite set of new actors 
 3.  BEHAVE differently in relation to the next 
     incoming messages. 
  ONLY through the exchange of messages 
  Communication is ASYNCHRONOUS 
  Non‐blocking SEND 
  Blocking RECEIVE 
  Messages are IMMUTABLE 
  No synchronization devices (locks) required 
  Not subject to memory corruption 


  Actors are usually implemented on 
   lightweight processes (green threads) 
  Messages are processed using pattern 
   matching 
  In order to identify and model an actor 
  system, and its dynamics, the following must 
  be determined: 
 1.  All type of actors of the system (classes?) 
 2.  The contract that each actor responds to 
     (interfaces?) 
 3.  The behavior that each actor should take when 
     receiving a message (methods?) 
  An EMPIRICAL study that investigates the 
   viability of using the actor‐model as  the 
   programming model for tackling the 
   concurrency crisis for business applications 
  The audience is the developers community 
  Software Engineering Trade‐Offs  
    Effectiveness on multi‐cores  
    Scalability 
    Paradigm Change 
  Design of a real‐life business application 
  Develop a set of testing data 
  Java implementation of the application 
  Other implementations using: 
   1.  Erlang + Actors + FP 
   2.  Scala + Actors + OOP + FP 
   3.  Java + Kilim + Actors + OOP 
   4.  C# + CCR + Actors + OOP 
   5.  F# + CCR + Actors + FP + OOP 
A RATING ENGINE,  a.k.a. rater, is an important 
 
   module of a billing system (BSS ‐ business 
   support system) 
  A rater process input events and rate them 
   according to the price plan chosen by the 
   subscriber  
  Typical users of a rater:  
          fixed‐line/wireless telephony providers  
      
          cable/satellite TV providers  
      
          water/electricity utility providers  
      
          banks 
      
RATENG is a simplification of a rating engine for 
 
   a cellular carrier (wireless telephony provider) 
  Events describe voice calls (in/out), text 
   messages (SMS) or data sessions (internet) 
  Events were generated by subscribers (home or 
   roamers) 
  Events were carried over the home network or in 
   another one 
  As the outcome of each rated event, the balance 
   of the account and its related subscriptions must 
   be updated, according to the billing cycle when 
   the event occurred  
FÁBIO CORRÊA 
Mobile: 076‐816‐6848 
eMail: feamcor@gmail.com 
  No 3rd‐party tools will be used. All the 
   implementations somehow have to rely only 
   on the standard library of the tool that is 
   being used 
  The Java implementation will be the baseline 
   for evaluating software engineering aspects 
  The Erlang implementation will be the 
   baseline for evaluating scalability aspects 
Erlang is a dynamically typed functional 
 
   language that was developed by Ericsson in 1985 
   and released as open‐source on 1997 
  It was developed with soft real‐time, 
   concurrency, fault‐tolerance, distribution and 
   hot‐replacement in mind, due to the very nature 
   of the telephony environment 
  The only concurrent programming model 
   available in Erlang is the actor‐model, being 
   today the de facto implementation and 
   reference for other implementations 
  www.erlang.org 
Hybrid programming language (FPL+OO) 
 
   created in 2003 at EPFL by Martin Odersky 
  It implements the actor‐model as a library, based 
   on the Erlang implementation 
  It compiles Java bytecodes and runs on top of a 
   JVM 
  Java code can be used on Scala programs 
   without any problem 
  Released as open‐source since its inception 
  www.scala‐lang.org 
Framework used to create robust and massively 
 
   concurrent actor systems in Java, which claims 
   to be, at least, 3x faster than Erlang 
  It makes use of a bytecode post‐processor called 
   Weaver and a runtime library. Weaver ensures 
   that, through annotations on the bytecode: 
1.  Threads will be ultra‐lightweight; 
2.  Messages will be treated as a special, and much 
     simpler, category of Java objects; and 
3.  Isolation is enforced on compile‐time 

www.malhar.net/sriram/kilim 
  The Microsoft Concurrency and Coordination 
   Runtime and Decentralized Software Services 
   Toolkit comprises of “a set of .NET and .NET 
   Compact Framework class libraries and tools 
   that enable developers to better deal with the 
   inherent complexities in creating loosely‐
   coupled concurrent and distributed 
   applications” 
  CCR is the foundation of Maestro, a DSL for 
   concurrency developed by MS Research 
The possible event scenarios, independently if the subscriber was in its 
 
     home network or in roaming (intra‐carrier or inter‐carrier), are: 
          Call to local fixed‐line number 
      
          Call to local wireless inter‐carrier number 
      
          Call to local wireless intra‐carrier number 
      
          Call to long‐distance fixed‐line number 
      
          Call to long‐distance wireless inter‐carrier number 
      
          Call to long‐distance wireless intra‐carrier number 
      
          Call to international fixed‐line number 
      
          Call to international wireless number 
      
          Incoming call 
      
          Text message to wireless inter‐carrier number 
      
          Text message to wireless intra‐carrier number 
      
          Text message to wireless international number 
      
          Incoming text message 
      
          Data session  
      
The rating of an event will be driven by parameters like: 
 
          Minimum unit of charge for voice calls (6 seconds) 
      
          Minimum unit of charge for text messages (150 characters) 
      
          Minimum unit of charge for data sessions (1 kilobyte) 
      
          Off‐peak periods (by hour range on days of the week and holidays) 
      
          Rate, per off/peak minute, for calls while in home network 
      
          Rate, per off/peak minute, for calls while in intra‐carrier roaming 
      
          Rate, per text message, for messages while in home network 
      
          Rate, per text message, for messages while in intra‐carrier roaming 
      
          Rate, per off/peak KB, for data sessions while in home network 
      
          Rate, per off/peak KB, for data sessions while in intra‐carrier roaming 
      
          Bucket of off/peak free minutes per subscription/account 
      
          Bucket of free text messages per subscription/account 
      
          Bucket of off/peak free data volume per subscription/account 
      
          All events that occurred while in inter‐carrier roaming are rated by the visited 
      
          carrier and a toll is charged by the home carrier 

Mais conteúdo relacionado

Semelhante a Actors in a New "Highly Parallel" World

07 Collada Overview
07 Collada Overview07 Collada Overview
07 Collada Overview
johny2008
 
The Enterprise Architecture You Always Wanted
The Enterprise Architecture You Always WantedThe Enterprise Architecture You Always Wanted
The Enterprise Architecture You Always Wanted
Thoughtworks
 
The Yahoo Open Stack
The Yahoo Open StackThe Yahoo Open Stack
The Yahoo Open Stack
Megan Eskey
 

Semelhante a Actors in a New "Highly Parallel" World (20)

Mark Collier Keynote - OpenStack Day London June 2014
Mark Collier Keynote -  OpenStack Day London June 2014Mark Collier Keynote -  OpenStack Day London June 2014
Mark Collier Keynote - OpenStack Day London June 2014
 
How Wiley Uses Word to Invite Authors, Engage Editors, Improve Production, an...
How Wiley Uses Word to Invite Authors, Engage Editors, Improve Production, an...How Wiley Uses Word to Invite Authors, Engage Editors, Improve Production, an...
How Wiley Uses Word to Invite Authors, Engage Editors, Improve Production, an...
 
Agile Java Testing With Open Source Frameworks
Agile Java Testing With Open Source FrameworksAgile Java Testing With Open Source Frameworks
Agile Java Testing With Open Source Frameworks
 
Implementing a production Shibboleth IdP service at Cardiff University
Implementing a production Shibboleth IdP service at Cardiff UniversityImplementing a production Shibboleth IdP service at Cardiff University
Implementing a production Shibboleth IdP service at Cardiff University
 
API's, Freebase, and the Collaborative Semantic web
API's, Freebase, and the Collaborative Semantic webAPI's, Freebase, and the Collaborative Semantic web
API's, Freebase, and the Collaborative Semantic web
 
How to use cache scope component
How to use cache scope componentHow to use cache scope component
How to use cache scope component
 
07 Collada Overview
07 Collada Overview07 Collada Overview
07 Collada Overview
 
Language Computer Corporation: Text Extraction Profile
Language Computer Corporation:  Text Extraction ProfileLanguage Computer Corporation:  Text Extraction Profile
Language Computer Corporation: Text Extraction Profile
 
The Enterprise Architecture You Always Wanted
The Enterprise Architecture You Always WantedThe Enterprise Architecture You Always Wanted
The Enterprise Architecture You Always Wanted
 
Part 1 General Purpose Or Specialized Processors
Part 1 General Purpose Or Specialized ProcessorsPart 1 General Purpose Or Specialized Processors
Part 1 General Purpose Or Specialized Processors
 
JSON Viewer XPATH Workbook
JSON Viewer XPATH WorkbookJSON Viewer XPATH Workbook
JSON Viewer XPATH Workbook
 
T5 Oli Aro
T5 Oli AroT5 Oli Aro
T5 Oli Aro
 
Administrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA HumAdministrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA Hum
 
Administrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA HumAdministrivia: Golden Tips for Making JIRA Hum
Administrivia: Golden Tips for Making JIRA Hum
 
Standardizing the Web: A Look into the Why of Web Standards
Standardizing the Web: A Look into the Why of Web StandardsStandardizing the Web: A Look into the Why of Web Standards
Standardizing the Web: A Look into the Why of Web Standards
 
The Yahoo Open Stack
The Yahoo Open StackThe Yahoo Open Stack
The Yahoo Open Stack
 
My History with Atlassian Tools, and Why I'm Moving to Studio
My History with Atlassian Tools, and Why I'm Moving to StudioMy History with Atlassian Tools, and Why I'm Moving to Studio
My History with Atlassian Tools, and Why I'm Moving to Studio
 
Using Wordpress 2009 04 29
Using Wordpress 2009 04 29Using Wordpress 2009 04 29
Using Wordpress 2009 04 29
 
MySQL Proxy
MySQL ProxyMySQL Proxy
MySQL Proxy
 
Sparsha intro tek
Sparsha intro tekSparsha intro tek
Sparsha intro tek
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 

Actors in a New "Highly Parallel" World

  • 2.   The Free Lunch is Over    Multi‐core Processors    Software Crisis    Industry and Academia are in a quest   in order to improve this situation   before dozen cores arrive and   slowdown the whole industry    Millions of dollars are being   invested in research  Sourc e : Intel  
  • 3.   Ignored by most developers for years    Difficult to master    Threads, Locks, Race Condition, Deadlocks  and Shared/Mutable State    Non‐Deterministic and Difficult to Debug    Existing thread implementations   are somewhat low‐level   and not standardized  Source: AMD 
  • 4.   A HIGH‐LEVEL programming model   1.  Easier to understand and master  2.  Deterministic  3.  Non‐shared/Non‐mutable state  4.  Utilize all available cores without any re‐ configuration or re‐compilation  ntel  ce: I Sour
  • 5.   Actor Model of Concurrent Computation    Formalism defined by Carl Hewitt et al. [MIT  AI Lab, 1973]    Semantics solidified by Gul Agha [MIT AI Lab  (Message‐Passing Semantics Group), 1985]    Research and implementations done along  the years    Erlang is the flagship implementation 
  • 6.   REACTIVE entities that have a unique name  (mail address) and, based on an incoming  message received through its individual inbox  (message queue), can:  1.  SEND a finite set of messages to other known  actors  2.  CREATE a finite set of new actors  3.  BEHAVE differently in relation to the next  incoming messages. 
  • 8.   Messages are IMMUTABLE    No synchronization devices (locks) required    Not subject to memory corruption    Actors are usually implemented on  lightweight processes (green threads)    Messages are processed using pattern  matching 
  • 9.   In order to identify and model an actor  system, and its dynamics, the following must  be determined:  1.  All type of actors of the system (classes?)  2.  The contract that each actor responds to  (interfaces?)  3.  The behavior that each actor should take when  receiving a message (methods?) 
  • 10.   An EMPIRICAL study that investigates the  viability of using the actor‐model as  the  programming model for tackling the  concurrency crisis for business applications    The audience is the developers community    Software Engineering Trade‐Offs     Effectiveness on multi‐cores     Scalability    Paradigm Change 
  • 11.   Design of a real‐life business application    Develop a set of testing data    Java implementation of the application    Other implementations using:  1.  Erlang + Actors + FP  2.  Scala + Actors + OOP + FP  3.  Java + Kilim + Actors + OOP  4.  C# + CCR + Actors + OOP  5.  F# + CCR + Actors + FP + OOP 
  • 12. A RATING ENGINE,  a.k.a. rater, is an important    module of a billing system (BSS ‐ business  support system)    A rater process input events and rate them  according to the price plan chosen by the  subscriber     Typical users of a rater:   fixed‐line/wireless telephony providers     cable/satellite TV providers     water/electricity utility providers     banks   
  • 13. RATENG is a simplification of a rating engine for    a cellular carrier (wireless telephony provider)    Events describe voice calls (in/out), text  messages (SMS) or data sessions (internet)    Events were generated by subscribers (home or  roamers)    Events were carried over the home network or in  another one    As the outcome of each rated event, the balance  of the account and its related subscriptions must  be updated, according to the billing cycle when  the event occurred  
  • 15.   No 3rd‐party tools will be used. All the  implementations somehow have to rely only  on the standard library of the tool that is  being used    The Java implementation will be the baseline  for evaluating software engineering aspects    The Erlang implementation will be the  baseline for evaluating scalability aspects 
  • 16. Erlang is a dynamically typed functional    language that was developed by Ericsson in 1985  and released as open‐source on 1997    It was developed with soft real‐time,  concurrency, fault‐tolerance, distribution and  hot‐replacement in mind, due to the very nature  of the telephony environment    The only concurrent programming model  available in Erlang is the actor‐model, being  today the de facto implementation and  reference for other implementations    www.erlang.org 
  • 17. Hybrid programming language (FPL+OO)    created in 2003 at EPFL by Martin Odersky    It implements the actor‐model as a library, based  on the Erlang implementation    It compiles Java bytecodes and runs on top of a  JVM    Java code can be used on Scala programs  without any problem    Released as open‐source since its inception    www.scala‐lang.org 
  • 18. Framework used to create robust and massively    concurrent actor systems in Java, which claims  to be, at least, 3x faster than Erlang    It makes use of a bytecode post‐processor called  Weaver and a runtime library. Weaver ensures  that, through annotations on the bytecode:  1.  Threads will be ultra‐lightweight;  2.  Messages will be treated as a special, and much  simpler, category of Java objects; and  3.  Isolation is enforced on compile‐time  www.malhar.net/sriram/kilim 
  • 19.   The Microsoft Concurrency and Coordination  Runtime and Decentralized Software Services  Toolkit comprises of “a set of .NET and .NET  Compact Framework class libraries and tools  that enable developers to better deal with the  inherent complexities in creating loosely‐ coupled concurrent and distributed  applications”    CCR is the foundation of Maestro, a DSL for  concurrency developed by MS Research 
  • 20. The possible event scenarios, independently if the subscriber was in its    home network or in roaming (intra‐carrier or inter‐carrier), are:  Call to local fixed‐line number    Call to local wireless inter‐carrier number    Call to local wireless intra‐carrier number    Call to long‐distance fixed‐line number    Call to long‐distance wireless inter‐carrier number    Call to long‐distance wireless intra‐carrier number    Call to international fixed‐line number    Call to international wireless number    Incoming call    Text message to wireless inter‐carrier number    Text message to wireless intra‐carrier number    Text message to wireless international number    Incoming text message    Data session    
  • 21. The rating of an event will be driven by parameters like:    Minimum unit of charge for voice calls (6 seconds)    Minimum unit of charge for text messages (150 characters)    Minimum unit of charge for data sessions (1 kilobyte)    Off‐peak periods (by hour range on days of the week and holidays)    Rate, per off/peak minute, for calls while in home network    Rate, per off/peak minute, for calls while in intra‐carrier roaming    Rate, per text message, for messages while in home network    Rate, per text message, for messages while in intra‐carrier roaming    Rate, per off/peak KB, for data sessions while in home network    Rate, per off/peak KB, for data sessions while in intra‐carrier roaming    Bucket of off/peak free minutes per subscription/account    Bucket of free text messages per subscription/account    Bucket of off/peak free data volume per subscription/account    All events that occurred while in inter‐carrier roaming are rated by the visited    carrier and a toll is charged by the home carrier