Indic threads pune12-akka-actors

600 views
531 views

Published on

The 7th Annual IndicThreads Pune Conference was held on 14-15 December 2012. http://pune12.indicthreads.com/

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
600
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Indic threads pune12-akka-actors

  1. 1. Implementing Lock Free Concurrency with AKKASameer Arora
  2. 2. Agenda● Actor Model for Concurrency.● Actors V Threads.● Sleeping Barber Problem.● Introduction to Akka.● Demo● Questions & Feedback 2
  3. 3. Actors● Are Objects that communicate only by means of Asynchronous messagepassing.● Do not expose their state to other objects/actors.● Provide a Non Blocking,highly performant event-driven programming model . 3
  4. 4. Actors V Threads● Writing Concurrent programs using Threads is too hard to write and test.● Shared Memory Model causes Race Conditions, Lowered throughput, deadlocks.● Actors are Lightweight - consume ~600 bytes memory.● Do not map one-to-one with OS Threads.● Actors remain in a suspended state – function via Schedulers running underneath.● Actors Offer a Lock-free approach to concurrency – helps in Scaling and increased 4 Throughput.
  5. 5. Sleeping Barber Problem 5
  6. 6. AKKA● Provides a Run time for Actors Programming model.● Manages the Actors life-cycle● Has API for Java and Scala .● Provides Integration with Spring Integration,Apache Camel, Google Guice etc. 6
  7. 7. DemoSleeping Barber problem with AkkaSimple Routing Application on Akka 7
  8. 8. Questions/Comments/Feedback 8

×