AKKAWriting 'SCALA' ble & concurrent code
CHENSE meetup , Aug 24 2013
AGENDA
What is a concurrent system?
Paradigm
AKKA / Actors
My First Akka Code & Code walk through
Where & How could I use ...
WHAT IS A CONCURRENT
SYSTEM?
"Concurrency solves the problem of having
scarce CPU resources and many tasks. So,
you create...
WHAT IS A CONCURRENT
SYSTEM ? (CONTD.)
capable of doing as many tasks but only one task at a time
like our mind - human mi...
EXAMPLE - "GOPHER'S BURNING PROBLEM" W/O
CONCURRENCY
EXAMPLE - HELPING GOPHERS WITH CONCURRENCY
Note : Multiple Gophers => Multicore CPU
PARADIGM
actor - a concurrent abstraction much like our human
mind
actors over threads to handle concurrency
communicate t...
ACTORS <=> AKKA
lightweight objects which handle message via case
classes in Scala
use pattern matching to receive msgs
as...
CODE KATA - MY FIRST
ACTOR
class Greeter extends Actor {
var greeting = ""
def receive = {
case WhoToGreet(who) => {
greet...
CODE KATA - WRITING
AKKA CLIENT
object HelloAkkaScala extends App {
// Create the 'helloakka' actor system
val system = Ac...
LET'S GET REAL !!!
WHERE & HOW COULD I
USE AKKA ?
concurrent applications
modeling concurrency
clustered message processing
Q & A
SESSION WHERE ABOUTS
Source :- https://github.com/prassee/hello-akka
Chense G+ page
https://plus.google.com/communities/10...
Upcoming SlideShare
Loading in...5
×

Introduction to akka chense

524

Published on

Presentation given on CHENSE meetup about akka

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
524
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
8
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Introduction to akka chense

  1. 1. AKKAWriting 'SCALA' ble & concurrent code CHENSE meetup , Aug 24 2013
  2. 2. AGENDA What is a concurrent system? Paradigm AKKA / Actors My First Akka Code & Code walk through Where & How could I use Akka? Q&A
  3. 3. WHAT IS A CONCURRENT SYSTEM? "Concurrency solves the problem of having scarce CPU resources and many tasks. So, you create threads or independent paths of execution through code in order to share time on the scarce resource"
  4. 4. WHAT IS A CONCURRENT SYSTEM ? (CONTD.) capable of doing as many tasks but only one task at a time like our mind - human mind capability is infinite but we can do at most one task at a time handle thread lock and manage resources very efficiently great for writing scalable application
  5. 5. EXAMPLE - "GOPHER'S BURNING PROBLEM" W/O CONCURRENCY
  6. 6. EXAMPLE - HELPING GOPHERS WITH CONCURRENCY Note : Multiple Gophers => Multicore CPU
  7. 7. PARADIGM actor - a concurrent abstraction much like our human mind actors over threads to handle concurrency communicate through message passing (async/ sync) let actors decide what task to pick up at any instant of time (take a deep breath)
  8. 8. ACTORS <=> AKKA lightweight objects which handle message via case classes in Scala use pattern matching to receive msgs async in nature
  9. 9. CODE KATA - MY FIRST ACTOR class Greeter extends Actor { var greeting = "" def receive = { case WhoToGreet(who) => { greeting = s"hello, $who" println(greeting) } } }
  10. 10. CODE KATA - WRITING AKKA CLIENT object HelloAkkaScala extends App { // Create the 'helloakka' actor system val system = ActorSystem("helloakka") // Create the 'greeter' actor val greeter = system.actorOf(Props[Greeter], "greeter") greeter.!(WhoToGreet("first message")) system.shutdown() }
  11. 11. LET'S GET REAL !!!
  12. 12. WHERE & HOW COULD I USE AKKA ? concurrent applications modeling concurrency clustered message processing
  13. 13. Q & A
  14. 14. SESSION WHERE ABOUTS Source :- https://github.com/prassee/hello-akka Chense G+ page https://plus.google.com/communities/10010288600516114105 -> THANKS <-
  1. A particular slide catching your eye?

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

×