View stunning SlideShares in full-screen with the new iOS app!Introducing SlideShare for AndroidExplore all your favorite topics in the SlideShare appGet the SlideShare app to Save for Later — even offline
View stunning SlideShares in full-screen with the new Android app!View stunning SlideShares in full-screen with the new iOS app!
Implementing Lock Free Concurrency with AKKASameer Arora
Agenda● Actor Model for Concurrency.● Actors V Threads.● Sleeping Barber Problem.● Introduction to Akka.● Demo● Questions & Feedback 2
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
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.