ActorsReidar SollidThe actor programming modelDrammen25.10.2012
Erlang    • The world is concurrent    • Things in the world dont share data    • Things communicate with messages    • Th...
Original problem3                      Actors - Public
New problem4                 Actors - Public
Shared memory5                   Actors - Public
Shared memory model                  Shared                  memory      Process                        Process       thre...
Concurrency and shared memory7                  Actors - Public
What is the Actor Model    •   Light weight processes/tasks/agents        communicating through messaging        • Message...
React or receive    •   React is the “normal” actor, lightweight        process    •   Receive spins out a new Java thread...
Pattern matching10                      Actors - Public
Pattern matching11                      Actors - Public
Tail optimized recursion12                     Actors - Public
Tail recursion13                    Actors - Public
F# Agent14              Actors - Public
Scala actor15                 Actors - Public
Application security16                     Actors - Public
17   Actors - Public
Upcoming SlideShare
Loading in …5
×

Actors drammen

268
-1

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
268
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Actors drammen

  1. 1. ActorsReidar SollidThe actor programming modelDrammen25.10.2012
  2. 2. Erlang • The world is concurrent • Things in the world dont share data • Things communicate with messages • Things fail • - Joe Armstrong2 Actors - Public
  3. 3. Original problem3 Actors - Public
  4. 4. New problem4 Actors - Public
  5. 5. Shared memory5 Actors - Public
  6. 6. Shared memory model Shared memory Process Process thread thread Process thread6 Actors - Public
  7. 7. Concurrency and shared memory7 Actors - Public
  8. 8. What is the Actor Model • Light weight processes/tasks/agents communicating through messaging • Messages are buffered in a “mailbox” • No shared state • Isolated from other processes • Normally event systems are inversion of control • Adding a listener to an object • Hard to maintain in large systems • Humans do not share memory, we communicate through messages8 Actors - Public
  9. 9. React or receive • React is the “normal” actor, lightweight process • Receive spins out a new Java thread • In the paper * • 5000 threads • 1 200 000 actors • React uses partial functions to send the process to the heap • Receive runs on the stack and is heavyweight JVM threads (like Java) • *Actors That Unify Threads and Events P. Haller, M. Odersky9 Actors - Public
  10. 10. Pattern matching10 Actors - Public
  11. 11. Pattern matching11 Actors - Public
  12. 12. Tail optimized recursion12 Actors - Public
  13. 13. Tail recursion13 Actors - Public
  14. 14. F# Agent14 Actors - Public
  15. 15. Scala actor15 Actors - Public
  16. 16. Application security16 Actors - Public
  17. 17. 17 Actors - Public
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×