Your SlideShare is downloading. ×
Actors drammen
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Actors drammen

192
views

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
192
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. ActorsReidar SollidThe actor programming modelDrammen25.10.2012
  • 2. Erlang • The world is concurrent • Things in the world dont share data • Things communicate with messages • Things fail • - Joe Armstrong2 Actors - Public
  • 3. Original problem3 Actors - Public
  • 4. New problem4 Actors - Public
  • 5. Shared memory5 Actors - Public
  • 6. Shared memory model Shared memory Process Process thread thread Process thread6 Actors - Public
  • 7. Concurrency and shared memory7 Actors - Public
  • 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. 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. Pattern matching10 Actors - Public
  • 11. Pattern matching11 Actors - Public
  • 12. Tail optimized recursion12 Actors - Public
  • 13. Tail recursion13 Actors - Public
  • 14. F# Agent14 Actors - Public
  • 15. Scala actor15 Actors - Public
  • 16. Application security16 Actors - Public
  • 17. 17 Actors - Public