Introduction to akka

Mike Slinn
Mike SlinnEntrepreneur at EmpathyWorks.ai
Introduction to Akka 1.2

          Mike Slinn
       SF Scala Meetup
        Nov 21, 2011
akka.actor.Actor
• Will replace scala.actors.Actor 'real soon
  now'
• Are managed by akka.actor.ActorRefs
• ActorRefs are opaque (cannot inspect Actor
  properties or call methods)
• Must communicate with Actors via messages sent
  to their ActorRef
Messages
• Arrive at actor mailboxes in the order they were
  sent.
• Actors can reply to messages, except
• Only Actors can receive messages
• If an actor is sent a message by a non-actor, no reply is possible
Actors and Dispatchers
•   Actors are scheduled by dispatchers
•   The default dispatcher works fine for many uses
•   Various dispatcher algorithms are available
•   Do not code to a specific dispatcher algorithm;
    the algorithm is usually defined in akka.conf
akka.stm.Ref
• STM: Software Transactional Memory
• Each Ref get/set is always atomic (wrapped in a
  transaction)
• Transactions are (relatively) expensive
How to Obtain Partial Simulation Results?
1.Create an inner class that accesses a property
  outside its scope, or
2.Use an STM Ref


• Inner class approach breaks OO encapsulation
Now we are ready to look at Hanuman
1 of 7

Recommended

Scala adoption by enterprises by
Scala adoption by enterprisesScala adoption by enterprises
Scala adoption by enterprisesMike Slinn
8K views37 slides
Sbt, idea and eclipse by
Sbt, idea and eclipseSbt, idea and eclipse
Sbt, idea and eclipseMike Slinn
1.4K views20 slides
Hanuman by
HanumanHanuman
HanumanMike Slinn
905 views25 slides
Composable Futures with Akka 2.0 by
Composable Futures with Akka 2.0Composable Futures with Akka 2.0
Composable Futures with Akka 2.0Mike Slinn
4.5K views41 slides
RTBI_Impact report_Final_PDF file by
RTBI_Impact report_Final_PDF fileRTBI_Impact report_Final_PDF file
RTBI_Impact report_Final_PDF fileParasuram K
453 views24 slides
Engineering Degree by
Engineering DegreeEngineering Degree
Engineering DegreeVaibhav Shukla
212 views2 slides

More Related Content

Viewers also liked

Certificate_1 by
Certificate_1Certificate_1
Certificate_1Artur Zielinski
117 views1 slide
Help u india online education portal. find colleges, institutes in india by
Help u india  online education portal. find colleges, institutes in indiaHelp u india  online education portal. find colleges, institutes in india
Help u india online education portal. find colleges, institutes in indiaHelp u india
207 views14 slides
XML Amsterdam 2012 Keynote by
XML Amsterdam 2012 KeynoteXML Amsterdam 2012 Keynote
XML Amsterdam 2012 Keynotejimfuller2009
6.9K views87 slides
Groovy on Android (as of 2016) by
Groovy on Android (as of 2016)Groovy on Android (as of 2016)
Groovy on Android (as of 2016)Kevin H.A. Tan
833 views28 slides
Scala at Netflix by
Scala at NetflixScala at Netflix
Scala at NetflixManish Pandit
8.8K views52 slides
2012 11-20 smc 070 bas hoogland by
2012 11-20 smc 070 bas hoogland2012 11-20 smc 070 bas hoogland
2012 11-20 smc 070 bas hooglandSMC070
1.3K views28 slides

Viewers also liked(14)

Help u india online education portal. find colleges, institutes in india by Help u india
Help u india  online education portal. find colleges, institutes in indiaHelp u india  online education portal. find colleges, institutes in india
Help u india online education portal. find colleges, institutes in india
Help u india207 views
XML Amsterdam 2012 Keynote by jimfuller2009
XML Amsterdam 2012 KeynoteXML Amsterdam 2012 Keynote
XML Amsterdam 2012 Keynote
jimfuller20096.9K views
Groovy on Android (as of 2016) by Kevin H.A. Tan
Groovy on Android (as of 2016)Groovy on Android (as of 2016)
Groovy on Android (as of 2016)
Kevin H.A. Tan833 views
2012 11-20 smc 070 bas hoogland by SMC070
2012 11-20 smc 070 bas hoogland2012 11-20 smc 070 bas hoogland
2012 11-20 smc 070 bas hoogland
SMC0701.3K views
Maximize Your Social Media: Branding and Journalism by Mandy Jenkins
Maximize Your Social Media: Branding and JournalismMaximize Your Social Media: Branding and Journalism
Maximize Your Social Media: Branding and Journalism
Mandy Jenkins1.4K views
Writing quality code, as a team. by e0ipso
Writing quality code, as a team.Writing quality code, as a team.
Writing quality code, as a team.
e0ipso929 views
What about-those-who-have-never-heard (1) by SSMC
What about-those-who-have-never-heard (1)What about-those-who-have-never-heard (1)
What about-those-who-have-never-heard (1)
SSMC450 views
Raising godly children 19 jun 15 by SSMC
Raising godly children 19 jun 15Raising godly children 19 jun 15
Raising godly children 19 jun 15
SSMC469 views
Social Media Strategy for College Newsrooms by Mandy Jenkins
Social Media Strategy for College NewsroomsSocial Media Strategy for College Newsrooms
Social Media Strategy for College Newsrooms
Mandy Jenkins590 views
02 06 Napoli Business by ClubIN
02 06 Napoli Business02 06 Napoli Business
02 06 Napoli Business
ClubIN521 views

More from Mike Slinn

Evaluating Blockchain Companies by
Evaluating Blockchain CompaniesEvaluating Blockchain Companies
Evaluating Blockchain CompaniesMike Slinn
166 views36 slides
Fullsize Smart Contracts That Learn by
Fullsize Smart Contracts That Learn Fullsize Smart Contracts That Learn
Fullsize Smart Contracts That Learn Mike Slinn
73 views66 slides
Dotty (Scala 3) Preview by
Dotty (Scala 3) PreviewDotty (Scala 3) Preview
Dotty (Scala 3) PreviewMike Slinn
184 views28 slides
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid Platform by
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid PlatformEmpathyWorks – Towards an Event-Based Simulation/ML Hybrid Platform
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid PlatformMike Slinn
134 views23 slides
Smart Contracts That Learn by
Smart Contracts That LearnSmart Contracts That Learn
Smart Contracts That LearnMike Slinn
1.2K views65 slides
Polyglot Ethereum - Smart Contracts for the Enterprise by
Polyglot Ethereum - Smart Contracts for the EnterprisePolyglot Ethereum - Smart Contracts for the Enterprise
Polyglot Ethereum - Smart Contracts for the EnterpriseMike Slinn
378 views16 slides

More from Mike Slinn(8)

Evaluating Blockchain Companies by Mike Slinn
Evaluating Blockchain CompaniesEvaluating Blockchain Companies
Evaluating Blockchain Companies
Mike Slinn166 views
Fullsize Smart Contracts That Learn by Mike Slinn
Fullsize Smart Contracts That Learn Fullsize Smart Contracts That Learn
Fullsize Smart Contracts That Learn
Mike Slinn73 views
Dotty (Scala 3) Preview by Mike Slinn
Dotty (Scala 3) PreviewDotty (Scala 3) Preview
Dotty (Scala 3) Preview
Mike Slinn184 views
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid Platform by Mike Slinn
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid PlatformEmpathyWorks – Towards an Event-Based Simulation/ML Hybrid Platform
EmpathyWorks – Towards an Event-Based Simulation/ML Hybrid Platform
Mike Slinn134 views
Smart Contracts That Learn by Mike Slinn
Smart Contracts That LearnSmart Contracts That Learn
Smart Contracts That Learn
Mike Slinn1.2K views
Polyglot Ethereum - Smart Contracts for the Enterprise by Mike Slinn
Polyglot Ethereum - Smart Contracts for the EnterprisePolyglot Ethereum - Smart Contracts for the Enterprise
Polyglot Ethereum - Smart Contracts for the Enterprise
Mike Slinn378 views
Play Architecture, Implementation, Shiny Objects, and a Proposal by Mike Slinn
Play Architecture, Implementation, Shiny Objects, and a ProposalPlay Architecture, Implementation, Shiny Objects, and a Proposal
Play Architecture, Implementation, Shiny Objects, and a Proposal
Mike Slinn749 views
Adobe Flash Platform for the Enterprise by Mike Slinn
Adobe Flash Platform for the EnterpriseAdobe Flash Platform for the Enterprise
Adobe Flash Platform for the Enterprise
Mike Slinn1K views

Recently uploaded

Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueShapeBlue
96 views7 slides
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool by
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPoolShapeBlue
40 views10 slides
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TCloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TShapeBlue
56 views34 slides
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsShapeBlue
111 views13 slides
Data Integrity for Banking and Financial Services by
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial ServicesPrecisely
56 views26 slides
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...ShapeBlue
57 views25 slides

Recently uploaded(20)

Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue96 views
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool by ShapeBlue
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool
ShapeBlue40 views
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by ShapeBlue
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TCloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
ShapeBlue56 views
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by ShapeBlue
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystems
ShapeBlue111 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely56 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue57 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue46 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software344 views
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... by The Digital Insurer
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue74 views
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ... by ShapeBlue
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
ShapeBlue77 views
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... by ShapeBlue
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
ShapeBlue48 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue102 views
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue35 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue85 views
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue83 views
NTGapps NTG LowCode Platform by Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu141 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc77 views

Introduction to akka

  • 1. Introduction to Akka 1.2 Mike Slinn SF Scala Meetup Nov 21, 2011
  • 2. akka.actor.Actor • Will replace scala.actors.Actor 'real soon now' • Are managed by akka.actor.ActorRefs • ActorRefs are opaque (cannot inspect Actor properties or call methods) • Must communicate with Actors via messages sent to their ActorRef
  • 3. Messages • Arrive at actor mailboxes in the order they were sent. • Actors can reply to messages, except • Only Actors can receive messages • If an actor is sent a message by a non-actor, no reply is possible
  • 4. Actors and Dispatchers • Actors are scheduled by dispatchers • The default dispatcher works fine for many uses • Various dispatcher algorithms are available • Do not code to a specific dispatcher algorithm; the algorithm is usually defined in akka.conf
  • 5. akka.stm.Ref • STM: Software Transactional Memory • Each Ref get/set is always atomic (wrapped in a transaction) • Transactions are (relatively) expensive
  • 6. How to Obtain Partial Simulation Results? 1.Create an inner class that accesses a property outside its scope, or 2.Use an STM Ref • Inner class approach breaks OO encapsulation
  • 7. Now we are ready to look at Hanuman