SlideShare a Scribd company logo
Akka
in 100 slides or less
Derek Wyatt
Twitter: @derekwyatt
Email: derek@derekwyatt.orgAugust 2015
Akka is Concurrency
Akka is Concurrency
Actors: Living objects with concurrent context
“I am for you,
Alrik of Valt.”
Akka is Concurrency
Actors: Living objects with concurrent context
Futures: These aren’t Java’s Futures
val	
  futureData	
  =	
  for	
  {	
  
	
  	
  response	
  <-­‐	
  httpGet(…)	
  
	
  	
  query	
  =	
  response.body.as[Query]	
  
	
  	
  (img,	
  text)	
  <-­‐	
  imageQuery(query)	
  
	
  	
  scaledImg	
  <-­‐	
  scaleImg(img)	
  
}	
  yield	
  NewPostData(text,	
  scaledImg)
“I am for you,
Alrik of Valt.”
Akka is Concurrency
Actors: Living objects with concurrent context
Futures: These aren’t Java’s Futures
val	
  futureData	
  =	
  for	
  {	
  
	
  	
  response	
  <-­‐	
  httpGet(…)	
  
	
  	
  query	
  =	
  response.body.as[Query]	
  
	
  	
  (img,	
  text)	
  <-­‐	
  imageQuery(query)	
  
	
  	
  scaledImg	
  <-­‐	
  scaleImg(img)	
  
}	
  yield	
  NewPostData(text,	
  scaledImg)
Asynchronous
Asynchronous
Asynchronous
Asynchronous
“I am for you,
Alrik of Valt.”
Akka is Concurrency
Actors: Living objects with concurrent context
Futures: These aren’t Java’s Futures
val	
  futureData	
  =	
  for	
  {	
  
	
  	
  response	
  <-­‐	
  httpGet(…)	
  
	
  	
  query	
  =	
  response.body.as[Query]	
  
	
  	
  (img,	
  text)	
  <-­‐	
  imageQuery(query)	
  
	
  	
  scaledImg	
  <-­‐	
  scaleImg(img)	
  
}	
  yield	
  NewPostData(text,	
  scaledImg)
Asynchronous
Asynchronous
Asynchronous
Asynchronous
Streams: Async Non-Blocking and Back-Pressured
Source
Sink
Demand
Supply
Http too…
“I am for you,
Alrik of Valt.”
Akka is Concurrency
Actors: Living objects with concurrent context
Futures: These aren’t Java’s Futures
val	
  futureData	
  =	
  for	
  {	
  
	
  	
  response	
  <-­‐	
  httpGet(…)	
  
	
  	
  query	
  =	
  response.body.as[Query]	
  
	
  	
  (img,	
  text)	
  <-­‐	
  imageQuery(query)	
  
	
  	
  scaledImg	
  <-­‐	
  scaleImg(img)	
  
}	
  yield	
  NewPostData(text,	
  scaledImg)
Asynchronous
Asynchronous
Asynchronous
Asynchronous
Streams: Async Non-Blocking and Back-Pressured
Source
Sink
Demand
Supply
Http too…
“I am for you,
Alrik of Valt.”
Support for Scala and Java (but use Scala, cuz…)
Actors: Concurrency in Isolation
Actors: Concurrency in Isolation
count: _
alert: _
score: _
Actors: Concurrency in Isolation
count: 2
alert: Y
score: 16
count: 4
alert: N
score: 2
count: 33
alert: G
score: 71
count: 13
alert: G
score: 12
count: 7
alert: X
score: 5
count: 8
alert: N
score: 11
count: 2
alert: I
score: 14
count: 87
alert: G
score: 0
count: 1
alert: B
score: 6
count: 7
alert: W
score: 32
count: 7
alert: O
score: 19
count: 4
alert: G
score: 99
count: _
alert: _
score: _
✗Construct as many as you’d like
Actors: Concurrency in Isolation
count: 2
alert: Y
score: 16
count: 4
alert: N
score: 2
count: 33
alert: G
score: 71
count: 13
alert: G
score: 12
count: 7
alert: X
score: 5
count: 8
alert: N
score: 11
count: 2
alert: I
score: 14
count: 87
alert: G
score: 0
count: 1
alert: B
score: 6
count: 7
alert: W
score: 32
count: 7
alert: O
score: 19
count: 4
alert: G
score: 99
count: _
alert: _
score: _
✗Construct as many as you’d like
✗Each one encapsulates its own state
Actors: Concurrency in Isolation
count: 2
alert: Y
score: 16
count: 4
alert: N
score: 2
count: 33
alert: G
score: 71
count: 13
alert: G
score: 12
count: 7
alert: X
score: 5
count: 8
alert: N
score: 11
count: 2
alert: I
score: 14
count: 87
alert: G
score: 0
count: 1
alert: B
score: 6
count: 7
alert: W
score: 32
count: 7
alert: O
score: 19
count: 4
alert: G
score: 99
Thread
Thread
count: _
alert: _
score: _
✗Construct as many as you’d like
✗Each one encapsulates its own state
✗They all (can) share the same thread pool
Actors: Concurrency in Isolation
count: 2
alert: Y
score: 16
count: 4
alert: N
score: 2
count: 33
alert: G
score: 71
count: 13
alert: G
score: 12
count: 7
alert: X
score: 5
count: 8
alert: N
score: 11
count: 2
alert: I
score: 14
count: 87
alert: G
score: 0
count: 1
alert: B
score: 6
count: 7
alert: W
score: 32
count: 7
alert: O
score: 19
count: 4
alert: G
score: 99
Thread
Thread
count: _
alert: _
score: _
✗Construct as many as you’d like
✗Each one encapsulates its own state
✗They all (can) share the same thread pool
✗They cannot interfere with each other
Actors: Concurrency in Isolation
count: 2
alert: Y
score: 16
count: 4
alert: N
score: 2
count: 33
alert: G
score: 71
count: 8
alert: N
score: 11
count: 2
alert: I
score: 14
count: 87
alert: G
score: 0
count: 1
alert: B
score: 6
count: 7
alert: W
score: 32
count: 7
alert: O
score: 19
count: 4
alert: G
score: 99
Thread
Thread
count: _
alert: _
score: _
✗Construct as many as you’d like
✗Each one encapsulates its own state
✗They all (can) share the same thread pool
✗They cannot interfere with each other
✗Their life-cycles are entirely under your control
It’s all about the messages!
It’s all about the messages!
Actors have no public methods⦿ A
It’s all about the messages!
Actors have no public methods⦿
Actors have no publicly accessible data⦿
A B
It’s all about the messages!
Actors have no public methods⦿
Actors have no publicly accessible data⦿
You cannot communicate with Actors
Synchronously
⦿
A B
It’s all about the messages!
Actors have no public methods⦿
Actors have no publicly accessible data⦿
You cannot communicate with Actors
Synchronously
⦿
The only way to talk to them is with
Messages
⦿
A B
hey
It’s all about the messages!
Actors have no public methods⦿
Actors have no publicly accessible data⦿
You cannot communicate with Actors
Synchronously
⦿
The only way to talk to them is with
Messages
⦿
The only way to access their data is with
Messages
⦿
A B
83
It’s all about the messages!
Actors have no public methods⦿
Actors have no publicly accessible data⦿
You cannot communicate with Actors
Synchronously
⦿
The only way to talk to them is with
Messages
⦿
The only way to access their data is with
Messages
⦿
Messages can (and should) carry
conversational state
⦿
A B
A
It’s all about the messages!
Actors have no public methods⦿
Actors have no publicly accessible data⦿
You cannot communicate with Actors
Synchronously
⦿
The only way to talk to them is with
Messages
⦿
The only way to access their data is with
Messages
⦿
Messages can (and should) carry
conversational state
⦿
A B
A
Done(a,b,c)
Actors are Fault Tolerant
Parent
Child Child Child
Mailbox
Mailbox
Mailbox Mailbox
Actors are Fault Tolerant
Actors supervise their children Parent
Child Child Child
Mailbox
Mailbox
Mailbox Mailbox
Actors are Fault Tolerant
Actors supervise their children
Failed Actors are restarted (or stopped,
or resumed, or escalated) by their supervisors
Parent
Child Child Child
Mailbox
Mailbox
Mailbox Mailbox
Actors are Fault Tolerant
Actors supervise their children
Failed Actors are restarted (or stopped,
or resumed, or escalated) by their supervisors
Restarted Actors are given a fresh state
Parent
Child Child Child
Mailbox
Mailbox
Mailbox Mailbox
Actors are Fault Tolerant
Actors supervise their children
Failed Actors are restarted (or stopped,
or resumed, or escalated) by their supervisors
Restarted Actors are given a fresh state
The message they were processing is lost
Parent
Child Child Child
Mailbox
Mailbox
Mailbox Mailbox
Actors are Fault Tolerant
Actors supervise their children
Failed Actors are restarted (or stopped,
or resumed, or escalated) by their supervisors
Restarted Actors are given a fresh state
The message they were processing is lost
Parent
Child Child
Mailbox
Mailbox
Mailbox Mailbox
Child
Death is Actionable
Parent
Child ChildChild
Deathwatch
Mailbox
Death is Actionable
❉ Restarting is invisible to outsiders…
❉ …But Actor Death is visible
❉ Deathwatch lets Actors react to death,
such as to recreate a child
Parent
Child ChildChild
Deathwatch
Mailbox
Death is Actionable
❉ Restarting is invisible to outsiders…
❉ …But Actor Death is visible
❉ Deathwatch lets Actors react to death,
such as to recreate a child
Parent
ChildChildChild
Deathwatch
Mailbox
Death is Actionable
❉ Restarting is invisible to outsiders…
❉ …But Actor Death is visible
❉ Deathwatch lets Actors react to death,
such as to recreate a child
Parent
ChildChildChild
Deathwatch
Mailbox
❉
… Or a transaction is complete, or it’s
time to shut down, or a current stage of
processing is finished, or…
Death is Actionable
❉ Restarting is invisible to outsiders…
❉ …But Actor Death is visible
❉ Deathwatch lets Actors react to death,
such as to recreate a child
Parent
ChildChildChild
Deathwatch
Mailbox
❉ Remember that this is death, so the
mailbox contents are lost
❉
… Or a transaction is complete, or it’s
time to shut down, or a current stage of
processing is finished, or…
So, why would I use Actors?
So, why would I use Actors?
✗Actors help you manage concurrency
Reasoning
So, why would I use Actors?
✗Actors help you manage concurrency
✗Actors let you implement services within your system
Reasoning
Service decoupling
So, why would I use Actors?
✗Actors help you manage concurrency
✗Actors let you implement services within your system
✗Actors let you design an entirely asynchronous system
Reasoning
Service decoupling
Capacity and Throughput
So, why would I use Actors?
✗Actors help you manage concurrency
✗Actors let you implement services within your system
✗Actors let you design an entirely asynchronous system
✗Actors let you define the resiliency of your applications
Reasoning
Service decoupling
Capacity and Throughput
Fault Tolerance
So, why would I use Actors?
✗Actors help you manage concurrency
✗Actors let you implement services within your system
✗Actors let you design an entirely asynchronous system
✗Actors let you define the resiliency of your applications
✗
Eventual consistency, and message delivery failure are realities
that Actors help you deal with throughout your code
Reasoning
Service decoupling
Capacity and Throughput
Fault Tolerance
Massive Scale
Self Healing
So, why would I use Actors?
✗Actors help you manage concurrency
✗Actors let you implement services within your system
✗Actors let you design an entirely asynchronous system
✗Actors let you define the resiliency of your applications
✗
Eventual consistency, and message delivery failure are realities
that Actors help you deal with throughout your code
✗
Most importantly, Actors help you think about the problem differently and express
your solutions more creatively
Reasoning
Service decoupling
Capacity and Throughput
Fault Tolerance
Massive Scale
Self Healing
Sanity, Clarity, and Reasonability!!
“Functional” Futures
“Functional” Futures
◎ A Future is just a value, but not yet…
“Functional” Futures
◎ A Future is just a value, but not yet…
◎
java.util.concurrent.Future is a bad Future.
Akka gave us Futures that compose!
“Functional” Futures
◎ A Future is just a value, but not yet…
◎
java.util.concurrent.Future is a bad Future.
Akka gave us Futures that compose!
◎
Composable Futures let us abstract over Future
values, rather than wait for them
for {
“Functional” Futures
◎ A Future is just a value, but not yet…
◎
java.util.concurrent.Future is a bad Future.
Akka gave us Futures that compose!
◎
Composable Futures let us abstract over Future
values, rather than wait for them
for {
a <- futureA()
futureA()
futureB(a)
“Functional” Futures
◎ A Future is just a value, but not yet…
◎
java.util.concurrent.Future is a bad Future.
Akka gave us Futures that compose!
◎
Composable Futures let us abstract over Future
values, rather than wait for them
for {
a <- futureA()
b <- futureB(a)
futureA()
futureC(a,b) futureB(a)
“Functional” Futures
◎ A Future is just a value, but not yet…
◎
java.util.concurrent.Future is a bad Future.
Akka gave us Futures that compose!
◎
Composable Futures let us abstract over Future
values, rather than wait for them
for {
a <- futureA()
b <- futureB(a)
c <- futureC(a,b)
futureA()
futureC(a,b) futureB(a)
“Functional” Futures
◎ A Future is just a value, but not yet…
◎
java.util.concurrent.Future is a bad Future.
Akka gave us Futures that compose!
◎
Composable Futures let us abstract over Future
values, rather than wait for them
for {
a <- futureA()
b <- futureB(a)
c <- futureC(a,b)
} yield c
futureA()
One
composed
Future
futureC(a,b) futureB(a)
“Functional” Futures
◎ A Future is just a value, but not yet…
◎
java.util.concurrent.Future is a bad Future.
Akka gave us Futures that compose!
◎
Composable Futures let us abstract over Future
values, rather than wait for them
for {
a <- futureA()
b <- futureB(a)
c <- futureC(a,b)
} yield c
futureA()
◎
Futures compose as Monads compose, which makes them “standard”
functional abstractions, and that’s a powerful thing
One
composed
Future
Abolish Callback Hell
Abolish Callback Hell
public void restHandler(RESTRequest req) {
idservice.validate(req.userInfo, new Callback<ValidateResult>() {
public void run(ValidateResult result) {
if (result.isValid) {
db.getProfile(req.userId, new Callback<UserProfile>() {
public void run(UserProfile profile) {
picServer.get(profile.pic1, new Callback<Pic>() {
public void run(Pic p1) {
picServer.get(profile.pic2, new Callback<Pic>() {
public void run(Pic p2) {
picServer.get(profile.pic3, new Callback<Pic>() {
public void run(Pic p3) {
picServer.get(profile.pic4, new Callback<Pic>() {
public void run(Pic p4) {
picServer.get(profile.pic5, new Callback<Pic>() {
public void run(Pic p5) {
twitterServer.getRecentActivity(req.userInfo, new Callback<TwitterActivity>() {
public void run(TwitterActivity activity) {
req.sendResponse(pic1, pic2, pic3, pic4, pic5, activity)
}
}
}
}
}
}
}
}
Abolish Callback Hell
public void restHandler(RESTRequest req) {
idservice.validate(req.userInfo, new Callback<ValidateResult>() {
public void run(ValidateResult result) {
if (result.isValid) {
db.getProfile(req.userId, new Callback<UserProfile>() {
public void run(UserProfile profile) {
picServer.get(profile.pic1, new Callback<Pic>() {
public void run(Pic p1) {
picServer.get(profile.pic2, new Callback<Pic>() {
public void run(Pic p2) {
picServer.get(profile.pic3, new Callback<Pic>() {
public void run(Pic p3) {
picServer.get(profile.pic4, new Callback<Pic>() {
public void run(Pic p4) {
picServer.get(profile.pic5, new Callback<Pic>() {
public void run(Pic p5) {
twitterServer.getRecentActivity(req.userInfo, new Callback<TwitterActivity>() {
public void run(TwitterActivity activity) {
req.sendResponse(pic1, pic2, pic3, pic4, pic5, activity)
}
}
}
}
}
}
}
}
We didn’t handle errors
We didn’t handle timeouts
It’s not necessarily Threadsafe
It’s incredibly hard to read
Compose your Futures
implicit val _timeout = Timeout(30.seconds)
def restHandler(req: RESTRequest): Future[RESTResponse] = {
val resp = for {
validity <- idService.validate(req.userInfo)
if validity.isValid
profile <- db.getProfile(req.userId)
pic1 <- picServer.get(profile.pic1)
pic2 <- picServer.get(profile.pic2)
pic3 <- picServer.get(profile.pic3)
pic4 <- picServer.get(profile.pic4)
pic5 <- picServer.get(profile.pic5)
activity <- twitterServer.getRecentActivity(req.userInfo)
} yield SuccessfulResponse(pic1, pic2, pic3, pic4, pic5, activity)
resp recover { e: Throwable => FailedResponse(e) }
}
Compose your Futures
implicit val _timeout = Timeout(30.seconds)
def restHandler(req: RESTRequest): Future[RESTResponse] = {
val resp = for {
validity <- idService.validate(req.userInfo)
if validity.isValid
profile <- db.getProfile(req.userId)
pic1 <- picServer.get(profile.pic1)
pic2 <- picServer.get(profile.pic2)
pic3 <- picServer.get(profile.pic3)
pic4 <- picServer.get(profile.pic4)
pic5 <- picServer.get(profile.pic5)
activity <- twitterServer.getRecentActivity(req.userInfo)
} yield SuccessfulResponse(pic1, pic2, pic3, pic4, pic5, activity)
resp recover { e: Throwable => FailedResponse(e) }
}
Errors have been handled
Timeouts have been handled
It’s (probably) Threadsafe
I didn’t have to shrink the font
So why would I use Futures?
So why would I use Futures?
Asynchronous programming is still hard⦿
So why would I use Futures?
Asynchronous programming is still hard⦿
Programming synchronously isn’t a reasonable response⦿
Thread starvation
timeouts
capacity issues
thread thrashing
So why would I use Futures?
Asynchronous programming is still hard⦿
Programming synchronously isn’t a reasonable response⦿
Scala Futures embody asynchronous values⦿
Thread starvation
timeouts
capacity issues
thread thrashing
Everything is a value
So why would I use Futures?
Asynchronous programming is still hard⦿
Programming synchronously isn’t a reasonable response⦿
Scala Futures embody asynchronous values⦿
They let us express composed asynchronous computation⦿
Thread starvation
timeouts
capacity issues
thread thrashing
Everything is a value
Less Side Effects
So why would I use Futures?
Asynchronous programming is still hard⦿
Programming synchronously isn’t a reasonable response⦿
Scala Futures embody asynchronous values⦿
They let us express composed asynchronous computation⦿
Futures let us propagate errors and recover from them⦿
Thread starvation
timeouts
capacity issues
thread thrashing
Everything is a value
Less Side Effects
Graceful Failure
Resiliency
So why would I use Futures?
Asynchronous programming is still hard⦿
Programming synchronously isn’t a reasonable response⦿
Scala Futures embody asynchronous values⦿
They let us express composed asynchronous computation⦿
Futures let us propagate errors and recover from them⦿
Asynchronous programming has always been possible but
Futures now make it much more viable
⦿
Thread starvation
timeouts
capacity issues
thread thrashing
Everything is a value
Less Side Effects
Graceful Failure
Resiliency
Operating on Data Streams
Operating on Data Streams
❉ In the real world, we communicate with things
Networks
Disks
Databases Services Slower Algorithms
Operating on Data Streams
❉ In the real world, we communicate with things
Networks
Disks
Databases Services Slower Algorithms
❉ Polling sucks. We live in a real time world.
Operating on Data Streams
❉ In the real world, we communicate with things
Networks
Disks
Databases Services Slower Algorithms
❉ Polling sucks. We live in a real time world.
❉ Eventing can be hard, since it doesn’t compose
Operating on Data Streams
❉ In the real world, we communicate with things
Networks
Disks
Databases Services Slower Algorithms
❉ Polling sucks. We live in a real time world.
❉ Eventing can be hard, since it doesn’t compose
❉ Throttling is a real problem we never address
Operating on Data Streams
❉ In the real world, we communicate with things
Networks
Disks
Databases Services Slower Algorithms
❉ Polling sucks. We live in a real time world.
❉ Eventing can be hard, since it doesn’t compose
❉ Throttling is a real problem we never address
❉ Akka Streams help us solve all of these problems
Operating on Data Streams
❉ In the real world, we communicate with things
Networks
Disks
Databases Services Slower Algorithms
❉ Polling sucks. We live in a real time world.
❉ Eventing can be hard, since it doesn’t compose
❉ Throttling is a real problem we never address
❉ Akka Streams help us solve all of these problems
Source
Transformation
Flow
Transformation
Flow
Sink
Demand
Supply
BackPressure is key Source
Sink
BackPressure is key
◎ Fast producers can kill; we only have so much RAM
Source
Sink
BackPressure is key
◎ Fast producers can kill; we only have so much RAM
◎ Producers can’t be artificially slow just to be nice
Source
Sink
BackPressure is key
◎ Fast producers can kill; we only have so much RAM
◎ Producers can’t be artificially slow just to be nice
◎ Consumers signal demand, Producers signal supply
Source
Sink
BackPressure is key
◎ Fast producers can kill; we only have so much RAM
◎ Producers can’t be artificially slow just to be nice
◎ Consumers signal demand, Producers signal supply
◎ When a consumer is slow, it signals no demand
Source
Sink
BackPressure is key
◎ Fast producers can kill; we only have so much RAM
◎ Producers can’t be artificially slow just to be nice
◎ Consumers signal demand, Producers signal supply
◎ When a consumer is slow, it signals no demand
◎ When a producer is slow, it doesn’t supply
Source
Sink
BackPressure is key
◎ Fast producers can kill; we only have so much RAM
◎ Producers can’t be artificially slow just to be nice
◎ Consumers signal demand, Producers signal supply
◎ When a consumer is slow, it signals no demand
◎ When a producer is slow, it doesn’t supply
Source
Sink Supply
Composable Binary Protocols
Composable Binary Protocols
Framer
ByteString ByteString
BidiFlow
Serializer
Object ByteString
BidiFlow
Chunker
ByteString ByteString
BidiFlow
Composable Binary Protocols
Framer
ByteString ByteString
BidiFlow
Serializer
Object ByteString
BidiFlow
Chunker
ByteString ByteString
BidiFlow
Application
Object Object
Source Sink
Network
ByteString ByteString
Source Sink
BidiFlow
ByteStringObject
Composable Binary Protocols
Framer
ByteString ByteString
BidiFlow
Serializer
Object ByteString
BidiFlow
Chunker
ByteString ByteString
BidiFlow
Application
Object Object
Source Sink
Network
ByteString ByteString
Source Sink
BidiFlow
ByteStringObject
✗Entirely reusable components that fit in any BiDirectional Flow
Composable Binary Protocols
Framer
ByteString ByteString
BidiFlow
Serializer
Object ByteString
BidiFlow
Chunker
ByteString ByteString
BidiFlow
Application
Object Object
Source Sink
Network
ByteString ByteString
Source Sink
BidiFlow
ByteStringObject
✗Entirely reusable components that fit in any BiDirectional Flow
✗Type safe (or as type safe as byte string marshaling gets)
Composable Binary Protocols
Framer
ByteString ByteString
BidiFlow
Serializer
Object ByteString
BidiFlow
Chunker
ByteString ByteString
BidiFlow
Application
Object Object
Source Sink
Network
ByteString ByteString
Source Sink
BidiFlow
ByteStringObject
✗Entirely reusable components that fit in any BiDirectional Flow
✗Type safe (or as type safe as byte string marshaling gets)
✗Entirely back pressured from end to end
Composable Binary Protocols
Framer
ByteString ByteString
BidiFlow
Serializer
Object ByteString
BidiFlow
Chunker
ByteString ByteString
BidiFlow
Application
Object Object
Source Sink
Network
ByteString ByteString
Source Sink
BidiFlow
ByteStringObject
✗Entirely reusable components that fit in any BiDirectional Flow
✗Type safe (or as type safe as byte string marshaling gets)
✗Entirely back pressured from end to end
✗100% event driven and reactive Realtime Speeds
No Blocking Threads
Natural Throttling
graceful performance degradationNot a Crash
Why Would I use Streams?
Why Would I use Streams?
Streaming is (probably) the crown jewel of Akka’s offering (but it’s a tough call)
Why Would I use Streams?
Streaming is (probably) the crown jewel of Akka’s offering
The need to respond to backpressure is real and we never do it !
(but it’s a tough call)
Why Would I use Streams?
Streaming is (probably) the crown jewel of Akka’s offering
The need to respond to backpressure is real and we never do it
The need to treat our threads with respect is important
!
!
(but it’s a tough call)
Why Would I use Streams?
Streaming is (probably) the crown jewel of Akka’s offering
The need to respond to backpressure is real and we never do it
The need to treat our threads with respect is important
The need to be reactive and fast is vital to the user experience
!
!
!
(but it’s a tough call)
Why Would I use Streams?
Streaming is (probably) the crown jewel of Akka’s offering
The need to respond to backpressure is real and we never do it
The need to treat our threads with respect is important
The need to be reactive and fast is vital to the user experience
Streams give us all of this and let us use our hardware to its fullest
!
!
!
!!!
(but it’s a tough call)
Akka from 20k feetAkka from 20k feet
Akka from 20k feetAkka from 20k feet
Actors!
Actors!
Live Objects
Supervised
Asynchronous
Message Passing
Services
State Machines
Network Ready
Akka from 20k feetAkka from 20k feet
Actors!
Actors!
Futures!
Futures!
Live Objects
Supervised
Asynchronous
Message Passing
Services
State Machines
Network Ready
Composable Values
Reactive
Monadic
Immutable
Threadsafe
Work Well with Actors
Akka from 20k feetAkka from 20k feet
Actors!
Actors!
Futures!
Futures!
Streams!
Streams!
Live Objects
Supervised
Asynchronous
Message Passing
Services
State Machines
Network Ready
Composable Values
Reactive
Monadic
Immutable
Threadsafe
Work Well with Actors
BackPressured
Composable
Reusable
Event Driven
Flexible
Lots of Activity and Support
Work with Futures and Actors
Go Get AKKA!Go Get AKKA!
Website: http://akka.io
Scala Reference: http://doc.akka.io/docs/akka/current/scala.html
Java Reference: http://doc.akka.io/docs/akka/current/java.html
Streams Reference: http://doc.akka.io/docs/akka-stream-and-http-experimental/current/scala.html
Derek Wyatt
Twitter: @derekwyatt
Email: derek@derekwyatt.orgAugust 2015

More Related Content

Viewers also liked

Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015
Evan Chan
 
Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)mircodotta
 
Akka cluster overview at 010dev
Akka cluster overview at 010devAkka cluster overview at 010dev
Akka cluster overview at 010devRoland Kuhn
 
Akka Fundamentals
Akka FundamentalsAkka Fundamentals
Akka Fundamentals
Michael Kendra
 
Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...
Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...
Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...
Jonas Bonér
 
Event-sourced architectures with Akka
Event-sourced architectures with AkkaEvent-sourced architectures with Akka
Event-sourced architectures with Akka
Sander Mak (@Sander_Mak)
 
Actor-based concurrency and Akka Fundamentals
Actor-based concurrency and Akka FundamentalsActor-based concurrency and Akka Fundamentals
Actor-based concurrency and Akka FundamentalsNgoc Dao
 
Go lang - What is that thing?
Go lang - What is that thing?Go lang - What is that thing?
Go lang - What is that thing?
Ezequiel Maraschio
 
Introduction to the Actor Model
Introduction to the Actor ModelIntroduction to the Actor Model
Introduction to the Actor Model
BoldRadius Solutions
 
Akka framework
Akka frameworkAkka framework
Akka framework
mitesh_sharma
 
Actors and Threads
Actors and ThreadsActors and Threads
Actors and Threads
mperham
 
Functional Programming and Concurrency Patterns in Scala
Functional Programming and Concurrency Patterns in ScalaFunctional Programming and Concurrency Patterns in Scala
Functional Programming and Concurrency Patterns in Scala
kellogh
 
Effective Scala: Programming Patterns
Effective Scala: Programming PatternsEffective Scala: Programming Patterns
Effective Scala: Programming PatternsVasil Remeniuk
 
Scala’s implicits
Scala’s implicitsScala’s implicits
Scala’s implicits
Pablo Francisco Pérez Hidalgo
 
Go Lang Tutorial
Go Lang TutorialGo Lang Tutorial
Go Lang Tutorial
Wei-Ning Huang
 
Real-World Scala Design Patterns
Real-World Scala Design PatternsReal-World Scala Design Patterns
Real-World Scala Design PatternsNLJUG
 
Scala Implicits - Not to be feared
Scala Implicits - Not to be fearedScala Implicits - Not to be feared
Scala Implicits - Not to be feared
Derek Wyatt
 
Akka streams
Akka streamsAkka streams
Akka streams
mircodotta
 
Mongo db - How we use Go and MongoDB by Sam Helman
Mongo db - How we use Go and MongoDB by Sam HelmanMongo db - How we use Go and MongoDB by Sam Helman
Mongo db - How we use Go and MongoDB by Sam Helman
Hakka Labs
 

Viewers also liked (19)

Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015
 
Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)
 
Akka cluster overview at 010dev
Akka cluster overview at 010devAkka cluster overview at 010dev
Akka cluster overview at 010dev
 
Akka Fundamentals
Akka FundamentalsAkka Fundamentals
Akka Fundamentals
 
Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...
Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...
Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...
 
Event-sourced architectures with Akka
Event-sourced architectures with AkkaEvent-sourced architectures with Akka
Event-sourced architectures with Akka
 
Actor-based concurrency and Akka Fundamentals
Actor-based concurrency and Akka FundamentalsActor-based concurrency and Akka Fundamentals
Actor-based concurrency and Akka Fundamentals
 
Go lang - What is that thing?
Go lang - What is that thing?Go lang - What is that thing?
Go lang - What is that thing?
 
Introduction to the Actor Model
Introduction to the Actor ModelIntroduction to the Actor Model
Introduction to the Actor Model
 
Akka framework
Akka frameworkAkka framework
Akka framework
 
Actors and Threads
Actors and ThreadsActors and Threads
Actors and Threads
 
Functional Programming and Concurrency Patterns in Scala
Functional Programming and Concurrency Patterns in ScalaFunctional Programming and Concurrency Patterns in Scala
Functional Programming and Concurrency Patterns in Scala
 
Effective Scala: Programming Patterns
Effective Scala: Programming PatternsEffective Scala: Programming Patterns
Effective Scala: Programming Patterns
 
Scala’s implicits
Scala’s implicitsScala’s implicits
Scala’s implicits
 
Go Lang Tutorial
Go Lang TutorialGo Lang Tutorial
Go Lang Tutorial
 
Real-World Scala Design Patterns
Real-World Scala Design PatternsReal-World Scala Design Patterns
Real-World Scala Design Patterns
 
Scala Implicits - Not to be feared
Scala Implicits - Not to be fearedScala Implicits - Not to be feared
Scala Implicits - Not to be feared
 
Akka streams
Akka streamsAkka streams
Akka streams
 
Mongo db - How we use Go and MongoDB by Sam Helman
Mongo db - How we use Go and MongoDB by Sam HelmanMongo db - How we use Go and MongoDB by Sam Helman
Mongo db - How we use Go and MongoDB by Sam Helman
 

Similar to Akka in 100 slides or less

How to make good teams great - Sven Peters
How to make good teams great - Sven PetersHow to make good teams great - Sven Peters
How to make good teams great - Sven Peters
JAX London
 
[GAN by Hung-yi Lee]Part 2: The application of GAN to speech and text processing
[GAN by Hung-yi Lee]Part 2: The application of GAN to speech and text processing[GAN by Hung-yi Lee]Part 2: The application of GAN to speech and text processing
[GAN by Hung-yi Lee]Part 2: The application of GAN to speech and text processing
NAVER Engineering
 
Pissing against the wind
Pissing against the windPissing against the wind
Pissing against the wind
Alberto Brandolini
 
identifica y usa las propiedades de lo exponenentes
identifica y usa las propiedades de lo exponenentesidentifica y usa las propiedades de lo exponenentes
identifica y usa las propiedades de lo exponenentes
RaquelMercado11
 
002 Example Of Descriptive Essay Essays Examples O
002 Example Of Descriptive Essay Essays Examples O002 Example Of Descriptive Essay Essays Examples O
002 Example Of Descriptive Essay Essays Examples O
April Ford
 
Slaying The Legacy Dragon: Practical Lessons in Replacing Old Software
Slaying The Legacy Dragon: Practical Lessons in Replacing Old SoftwareSlaying The Legacy Dragon: Practical Lessons in Replacing Old Software
Slaying The Legacy Dragon: Practical Lessons in Replacing Old Software
Tim Berglund
 
How to make good teams great
How to make good teams greatHow to make good teams great
How to make good teams great
Sven Peters
 
From the Inside Out: How Self-Talk Affects Your Community
From the Inside Out: How Self-Talk Affects Your CommunityFrom the Inside Out: How Self-Talk Affects Your Community
From the Inside Out: How Self-Talk Affects Your Community
dreamwidth
 
Fundamentals of Program Impact Evaluation
Fundamentals of Program Impact EvaluationFundamentals of Program Impact Evaluation
Fundamentals of Program Impact Evaluation
MEASURE Evaluation
 
Goodparts
GoodpartsGoodparts
Goodparts
damonjablons
 
7 Things: How to make good teams great
7 Things: How to make good teams great7 Things: How to make good teams great
7 Things: How to make good teams great
Sven Peters
 
Tickets Make Ops Unnecessarily Miserable: The Journey to Self-Service
Tickets Make Ops Unnecessarily Miserable: The Journey to Self-ServiceTickets Make Ops Unnecessarily Miserable: The Journey to Self-Service
Tickets Make Ops Unnecessarily Miserable: The Journey to Self-Service
Rundeck
 
Emily Greer at GDC 2018: Data-Driven or Data-Blinded?
Emily Greer at GDC 2018: Data-Driven or Data-Blinded?Emily Greer at GDC 2018: Data-Driven or Data-Blinded?
Emily Greer at GDC 2018: Data-Driven or Data-Blinded?
Kongregate
 
Building a site for people with big imaginations
Building a site for people with big imaginationsBuilding a site for people with big imaginations
Building a site for people with big imaginations
Mark Mansour
 
Intuition & Use-Cases of Embeddings in NLP & beyond
Intuition & Use-Cases of Embeddings in NLP & beyondIntuition & Use-Cases of Embeddings in NLP & beyond
Intuition & Use-Cases of Embeddings in NLP & beyond
C4Media
 
02 naive bays classifier and sentiment analysis
02 naive bays classifier and sentiment analysis02 naive bays classifier and sentiment analysis
02 naive bays classifier and sentiment analysis
Subhas Kumar Ghosh
 
ML Study Jams - Session 3.pptx
ML Study Jams - Session 3.pptxML Study Jams - Session 3.pptx
ML Study Jams - Session 3.pptx
MayankChadha14
 
Page 1 of 13Psyc-E1900 Start of Block Default
 Page 1 of 13Psyc-E1900  Start of Block Default Page 1 of 13Psyc-E1900  Start of Block Default
Page 1 of 13Psyc-E1900 Start of Block Default
TatianaMajor22
 
Presentation Redux @ Lanco Infratch
Presentation Redux @ Lanco InfratchPresentation Redux @ Lanco Infratch
Presentation Redux @ Lanco Infratch
Mohit Chhabra
 
Evolutionary Algorithms In Ruby
Evolutionary Algorithms In RubyEvolutionary Algorithms In Ruby
Evolutionary Algorithms In Ruby
Avarteq
 

Similar to Akka in 100 slides or less (20)

How to make good teams great - Sven Peters
How to make good teams great - Sven PetersHow to make good teams great - Sven Peters
How to make good teams great - Sven Peters
 
[GAN by Hung-yi Lee]Part 2: The application of GAN to speech and text processing
[GAN by Hung-yi Lee]Part 2: The application of GAN to speech and text processing[GAN by Hung-yi Lee]Part 2: The application of GAN to speech and text processing
[GAN by Hung-yi Lee]Part 2: The application of GAN to speech and text processing
 
Pissing against the wind
Pissing against the windPissing against the wind
Pissing against the wind
 
identifica y usa las propiedades de lo exponenentes
identifica y usa las propiedades de lo exponenentesidentifica y usa las propiedades de lo exponenentes
identifica y usa las propiedades de lo exponenentes
 
002 Example Of Descriptive Essay Essays Examples O
002 Example Of Descriptive Essay Essays Examples O002 Example Of Descriptive Essay Essays Examples O
002 Example Of Descriptive Essay Essays Examples O
 
Slaying The Legacy Dragon: Practical Lessons in Replacing Old Software
Slaying The Legacy Dragon: Practical Lessons in Replacing Old SoftwareSlaying The Legacy Dragon: Practical Lessons in Replacing Old Software
Slaying The Legacy Dragon: Practical Lessons in Replacing Old Software
 
How to make good teams great
How to make good teams greatHow to make good teams great
How to make good teams great
 
From the Inside Out: How Self-Talk Affects Your Community
From the Inside Out: How Self-Talk Affects Your CommunityFrom the Inside Out: How Self-Talk Affects Your Community
From the Inside Out: How Self-Talk Affects Your Community
 
Fundamentals of Program Impact Evaluation
Fundamentals of Program Impact EvaluationFundamentals of Program Impact Evaluation
Fundamentals of Program Impact Evaluation
 
Goodparts
GoodpartsGoodparts
Goodparts
 
7 Things: How to make good teams great
7 Things: How to make good teams great7 Things: How to make good teams great
7 Things: How to make good teams great
 
Tickets Make Ops Unnecessarily Miserable: The Journey to Self-Service
Tickets Make Ops Unnecessarily Miserable: The Journey to Self-ServiceTickets Make Ops Unnecessarily Miserable: The Journey to Self-Service
Tickets Make Ops Unnecessarily Miserable: The Journey to Self-Service
 
Emily Greer at GDC 2018: Data-Driven or Data-Blinded?
Emily Greer at GDC 2018: Data-Driven or Data-Blinded?Emily Greer at GDC 2018: Data-Driven or Data-Blinded?
Emily Greer at GDC 2018: Data-Driven or Data-Blinded?
 
Building a site for people with big imaginations
Building a site for people with big imaginationsBuilding a site for people with big imaginations
Building a site for people with big imaginations
 
Intuition & Use-Cases of Embeddings in NLP & beyond
Intuition & Use-Cases of Embeddings in NLP & beyondIntuition & Use-Cases of Embeddings in NLP & beyond
Intuition & Use-Cases of Embeddings in NLP & beyond
 
02 naive bays classifier and sentiment analysis
02 naive bays classifier and sentiment analysis02 naive bays classifier and sentiment analysis
02 naive bays classifier and sentiment analysis
 
ML Study Jams - Session 3.pptx
ML Study Jams - Session 3.pptxML Study Jams - Session 3.pptx
ML Study Jams - Session 3.pptx
 
Page 1 of 13Psyc-E1900 Start of Block Default
 Page 1 of 13Psyc-E1900  Start of Block Default Page 1 of 13Psyc-E1900  Start of Block Default
Page 1 of 13Psyc-E1900 Start of Block Default
 
Presentation Redux @ Lanco Infratch
Presentation Redux @ Lanco InfratchPresentation Redux @ Lanco Infratch
Presentation Redux @ Lanco Infratch
 
Evolutionary Algorithms In Ruby
Evolutionary Algorithms In RubyEvolutionary Algorithms In Ruby
Evolutionary Algorithms In Ruby
 

Recently uploaded

top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 

Recently uploaded (20)

top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 

Akka in 100 slides or less

  • 1. Akka in 100 slides or less Derek Wyatt Twitter: @derekwyatt Email: derek@derekwyatt.orgAugust 2015
  • 3. Akka is Concurrency Actors: Living objects with concurrent context “I am for you, Alrik of Valt.”
  • 4. Akka is Concurrency Actors: Living objects with concurrent context Futures: These aren’t Java’s Futures val  futureData  =  for  {      response  <-­‐  httpGet(…)      query  =  response.body.as[Query]      (img,  text)  <-­‐  imageQuery(query)      scaledImg  <-­‐  scaleImg(img)   }  yield  NewPostData(text,  scaledImg) “I am for you, Alrik of Valt.”
  • 5. Akka is Concurrency Actors: Living objects with concurrent context Futures: These aren’t Java’s Futures val  futureData  =  for  {      response  <-­‐  httpGet(…)      query  =  response.body.as[Query]      (img,  text)  <-­‐  imageQuery(query)      scaledImg  <-­‐  scaleImg(img)   }  yield  NewPostData(text,  scaledImg) Asynchronous Asynchronous Asynchronous Asynchronous “I am for you, Alrik of Valt.”
  • 6. Akka is Concurrency Actors: Living objects with concurrent context Futures: These aren’t Java’s Futures val  futureData  =  for  {      response  <-­‐  httpGet(…)      query  =  response.body.as[Query]      (img,  text)  <-­‐  imageQuery(query)      scaledImg  <-­‐  scaleImg(img)   }  yield  NewPostData(text,  scaledImg) Asynchronous Asynchronous Asynchronous Asynchronous Streams: Async Non-Blocking and Back-Pressured Source Sink Demand Supply Http too… “I am for you, Alrik of Valt.”
  • 7. Akka is Concurrency Actors: Living objects with concurrent context Futures: These aren’t Java’s Futures val  futureData  =  for  {      response  <-­‐  httpGet(…)      query  =  response.body.as[Query]      (img,  text)  <-­‐  imageQuery(query)      scaledImg  <-­‐  scaleImg(img)   }  yield  NewPostData(text,  scaledImg) Asynchronous Asynchronous Asynchronous Asynchronous Streams: Async Non-Blocking and Back-Pressured Source Sink Demand Supply Http too… “I am for you, Alrik of Valt.” Support for Scala and Java (but use Scala, cuz…)
  • 9. Actors: Concurrency in Isolation count: _ alert: _ score: _
  • 10. Actors: Concurrency in Isolation count: 2 alert: Y score: 16 count: 4 alert: N score: 2 count: 33 alert: G score: 71 count: 13 alert: G score: 12 count: 7 alert: X score: 5 count: 8 alert: N score: 11 count: 2 alert: I score: 14 count: 87 alert: G score: 0 count: 1 alert: B score: 6 count: 7 alert: W score: 32 count: 7 alert: O score: 19 count: 4 alert: G score: 99 count: _ alert: _ score: _ ✗Construct as many as you’d like
  • 11. Actors: Concurrency in Isolation count: 2 alert: Y score: 16 count: 4 alert: N score: 2 count: 33 alert: G score: 71 count: 13 alert: G score: 12 count: 7 alert: X score: 5 count: 8 alert: N score: 11 count: 2 alert: I score: 14 count: 87 alert: G score: 0 count: 1 alert: B score: 6 count: 7 alert: W score: 32 count: 7 alert: O score: 19 count: 4 alert: G score: 99 count: _ alert: _ score: _ ✗Construct as many as you’d like ✗Each one encapsulates its own state
  • 12. Actors: Concurrency in Isolation count: 2 alert: Y score: 16 count: 4 alert: N score: 2 count: 33 alert: G score: 71 count: 13 alert: G score: 12 count: 7 alert: X score: 5 count: 8 alert: N score: 11 count: 2 alert: I score: 14 count: 87 alert: G score: 0 count: 1 alert: B score: 6 count: 7 alert: W score: 32 count: 7 alert: O score: 19 count: 4 alert: G score: 99 Thread Thread count: _ alert: _ score: _ ✗Construct as many as you’d like ✗Each one encapsulates its own state ✗They all (can) share the same thread pool
  • 13. Actors: Concurrency in Isolation count: 2 alert: Y score: 16 count: 4 alert: N score: 2 count: 33 alert: G score: 71 count: 13 alert: G score: 12 count: 7 alert: X score: 5 count: 8 alert: N score: 11 count: 2 alert: I score: 14 count: 87 alert: G score: 0 count: 1 alert: B score: 6 count: 7 alert: W score: 32 count: 7 alert: O score: 19 count: 4 alert: G score: 99 Thread Thread count: _ alert: _ score: _ ✗Construct as many as you’d like ✗Each one encapsulates its own state ✗They all (can) share the same thread pool ✗They cannot interfere with each other
  • 14. Actors: Concurrency in Isolation count: 2 alert: Y score: 16 count: 4 alert: N score: 2 count: 33 alert: G score: 71 count: 8 alert: N score: 11 count: 2 alert: I score: 14 count: 87 alert: G score: 0 count: 1 alert: B score: 6 count: 7 alert: W score: 32 count: 7 alert: O score: 19 count: 4 alert: G score: 99 Thread Thread count: _ alert: _ score: _ ✗Construct as many as you’d like ✗Each one encapsulates its own state ✗They all (can) share the same thread pool ✗They cannot interfere with each other ✗Their life-cycles are entirely under your control
  • 15. It’s all about the messages!
  • 16. It’s all about the messages! Actors have no public methods⦿ A
  • 17. It’s all about the messages! Actors have no public methods⦿ Actors have no publicly accessible data⦿ A B
  • 18. It’s all about the messages! Actors have no public methods⦿ Actors have no publicly accessible data⦿ You cannot communicate with Actors Synchronously ⦿ A B
  • 19. It’s all about the messages! Actors have no public methods⦿ Actors have no publicly accessible data⦿ You cannot communicate with Actors Synchronously ⦿ The only way to talk to them is with Messages ⦿ A B hey
  • 20. It’s all about the messages! Actors have no public methods⦿ Actors have no publicly accessible data⦿ You cannot communicate with Actors Synchronously ⦿ The only way to talk to them is with Messages ⦿ The only way to access their data is with Messages ⦿ A B 83
  • 21. It’s all about the messages! Actors have no public methods⦿ Actors have no publicly accessible data⦿ You cannot communicate with Actors Synchronously ⦿ The only way to talk to them is with Messages ⦿ The only way to access their data is with Messages ⦿ Messages can (and should) carry conversational state ⦿ A B A
  • 22. It’s all about the messages! Actors have no public methods⦿ Actors have no publicly accessible data⦿ You cannot communicate with Actors Synchronously ⦿ The only way to talk to them is with Messages ⦿ The only way to access their data is with Messages ⦿ Messages can (and should) carry conversational state ⦿ A B A Done(a,b,c)
  • 23. Actors are Fault Tolerant Parent Child Child Child Mailbox Mailbox Mailbox Mailbox
  • 24. Actors are Fault Tolerant Actors supervise their children Parent Child Child Child Mailbox Mailbox Mailbox Mailbox
  • 25. Actors are Fault Tolerant Actors supervise their children Failed Actors are restarted (or stopped, or resumed, or escalated) by their supervisors Parent Child Child Child Mailbox Mailbox Mailbox Mailbox
  • 26. Actors are Fault Tolerant Actors supervise their children Failed Actors are restarted (or stopped, or resumed, or escalated) by their supervisors Restarted Actors are given a fresh state Parent Child Child Child Mailbox Mailbox Mailbox Mailbox
  • 27. Actors are Fault Tolerant Actors supervise their children Failed Actors are restarted (or stopped, or resumed, or escalated) by their supervisors Restarted Actors are given a fresh state The message they were processing is lost Parent Child Child Child Mailbox Mailbox Mailbox Mailbox
  • 28. Actors are Fault Tolerant Actors supervise their children Failed Actors are restarted (or stopped, or resumed, or escalated) by their supervisors Restarted Actors are given a fresh state The message they were processing is lost Parent Child Child Mailbox Mailbox Mailbox Mailbox Child
  • 29. Death is Actionable Parent Child ChildChild Deathwatch Mailbox
  • 30. Death is Actionable ❉ Restarting is invisible to outsiders… ❉ …But Actor Death is visible ❉ Deathwatch lets Actors react to death, such as to recreate a child Parent Child ChildChild Deathwatch Mailbox
  • 31. Death is Actionable ❉ Restarting is invisible to outsiders… ❉ …But Actor Death is visible ❉ Deathwatch lets Actors react to death, such as to recreate a child Parent ChildChildChild Deathwatch Mailbox
  • 32. Death is Actionable ❉ Restarting is invisible to outsiders… ❉ …But Actor Death is visible ❉ Deathwatch lets Actors react to death, such as to recreate a child Parent ChildChildChild Deathwatch Mailbox ❉ … Or a transaction is complete, or it’s time to shut down, or a current stage of processing is finished, or…
  • 33. Death is Actionable ❉ Restarting is invisible to outsiders… ❉ …But Actor Death is visible ❉ Deathwatch lets Actors react to death, such as to recreate a child Parent ChildChildChild Deathwatch Mailbox ❉ Remember that this is death, so the mailbox contents are lost ❉ … Or a transaction is complete, or it’s time to shut down, or a current stage of processing is finished, or…
  • 34. So, why would I use Actors?
  • 35. So, why would I use Actors? ✗Actors help you manage concurrency Reasoning
  • 36. So, why would I use Actors? ✗Actors help you manage concurrency ✗Actors let you implement services within your system Reasoning Service decoupling
  • 37. So, why would I use Actors? ✗Actors help you manage concurrency ✗Actors let you implement services within your system ✗Actors let you design an entirely asynchronous system Reasoning Service decoupling Capacity and Throughput
  • 38. So, why would I use Actors? ✗Actors help you manage concurrency ✗Actors let you implement services within your system ✗Actors let you design an entirely asynchronous system ✗Actors let you define the resiliency of your applications Reasoning Service decoupling Capacity and Throughput Fault Tolerance
  • 39. So, why would I use Actors? ✗Actors help you manage concurrency ✗Actors let you implement services within your system ✗Actors let you design an entirely asynchronous system ✗Actors let you define the resiliency of your applications ✗ Eventual consistency, and message delivery failure are realities that Actors help you deal with throughout your code Reasoning Service decoupling Capacity and Throughput Fault Tolerance Massive Scale Self Healing
  • 40. So, why would I use Actors? ✗Actors help you manage concurrency ✗Actors let you implement services within your system ✗Actors let you design an entirely asynchronous system ✗Actors let you define the resiliency of your applications ✗ Eventual consistency, and message delivery failure are realities that Actors help you deal with throughout your code ✗ Most importantly, Actors help you think about the problem differently and express your solutions more creatively Reasoning Service decoupling Capacity and Throughput Fault Tolerance Massive Scale Self Healing Sanity, Clarity, and Reasonability!!
  • 42. “Functional” Futures ◎ A Future is just a value, but not yet…
  • 43. “Functional” Futures ◎ A Future is just a value, but not yet… ◎ java.util.concurrent.Future is a bad Future. Akka gave us Futures that compose!
  • 44. “Functional” Futures ◎ A Future is just a value, but not yet… ◎ java.util.concurrent.Future is a bad Future. Akka gave us Futures that compose! ◎ Composable Futures let us abstract over Future values, rather than wait for them for {
  • 45. “Functional” Futures ◎ A Future is just a value, but not yet… ◎ java.util.concurrent.Future is a bad Future. Akka gave us Futures that compose! ◎ Composable Futures let us abstract over Future values, rather than wait for them for { a <- futureA() futureA()
  • 46. futureB(a) “Functional” Futures ◎ A Future is just a value, but not yet… ◎ java.util.concurrent.Future is a bad Future. Akka gave us Futures that compose! ◎ Composable Futures let us abstract over Future values, rather than wait for them for { a <- futureA() b <- futureB(a) futureA()
  • 47. futureC(a,b) futureB(a) “Functional” Futures ◎ A Future is just a value, but not yet… ◎ java.util.concurrent.Future is a bad Future. Akka gave us Futures that compose! ◎ Composable Futures let us abstract over Future values, rather than wait for them for { a <- futureA() b <- futureB(a) c <- futureC(a,b) futureA()
  • 48. futureC(a,b) futureB(a) “Functional” Futures ◎ A Future is just a value, but not yet… ◎ java.util.concurrent.Future is a bad Future. Akka gave us Futures that compose! ◎ Composable Futures let us abstract over Future values, rather than wait for them for { a <- futureA() b <- futureB(a) c <- futureC(a,b) } yield c futureA() One composed Future
  • 49. futureC(a,b) futureB(a) “Functional” Futures ◎ A Future is just a value, but not yet… ◎ java.util.concurrent.Future is a bad Future. Akka gave us Futures that compose! ◎ Composable Futures let us abstract over Future values, rather than wait for them for { a <- futureA() b <- futureB(a) c <- futureC(a,b) } yield c futureA() ◎ Futures compose as Monads compose, which makes them “standard” functional abstractions, and that’s a powerful thing One composed Future
  • 51. Abolish Callback Hell public void restHandler(RESTRequest req) { idservice.validate(req.userInfo, new Callback<ValidateResult>() { public void run(ValidateResult result) { if (result.isValid) { db.getProfile(req.userId, new Callback<UserProfile>() { public void run(UserProfile profile) { picServer.get(profile.pic1, new Callback<Pic>() { public void run(Pic p1) { picServer.get(profile.pic2, new Callback<Pic>() { public void run(Pic p2) { picServer.get(profile.pic3, new Callback<Pic>() { public void run(Pic p3) { picServer.get(profile.pic4, new Callback<Pic>() { public void run(Pic p4) { picServer.get(profile.pic5, new Callback<Pic>() { public void run(Pic p5) { twitterServer.getRecentActivity(req.userInfo, new Callback<TwitterActivity>() { public void run(TwitterActivity activity) { req.sendResponse(pic1, pic2, pic3, pic4, pic5, activity) } } } } } } } }
  • 52. Abolish Callback Hell public void restHandler(RESTRequest req) { idservice.validate(req.userInfo, new Callback<ValidateResult>() { public void run(ValidateResult result) { if (result.isValid) { db.getProfile(req.userId, new Callback<UserProfile>() { public void run(UserProfile profile) { picServer.get(profile.pic1, new Callback<Pic>() { public void run(Pic p1) { picServer.get(profile.pic2, new Callback<Pic>() { public void run(Pic p2) { picServer.get(profile.pic3, new Callback<Pic>() { public void run(Pic p3) { picServer.get(profile.pic4, new Callback<Pic>() { public void run(Pic p4) { picServer.get(profile.pic5, new Callback<Pic>() { public void run(Pic p5) { twitterServer.getRecentActivity(req.userInfo, new Callback<TwitterActivity>() { public void run(TwitterActivity activity) { req.sendResponse(pic1, pic2, pic3, pic4, pic5, activity) } } } } } } } } We didn’t handle errors We didn’t handle timeouts It’s not necessarily Threadsafe It’s incredibly hard to read
  • 53. Compose your Futures implicit val _timeout = Timeout(30.seconds) def restHandler(req: RESTRequest): Future[RESTResponse] = { val resp = for { validity <- idService.validate(req.userInfo) if validity.isValid profile <- db.getProfile(req.userId) pic1 <- picServer.get(profile.pic1) pic2 <- picServer.get(profile.pic2) pic3 <- picServer.get(profile.pic3) pic4 <- picServer.get(profile.pic4) pic5 <- picServer.get(profile.pic5) activity <- twitterServer.getRecentActivity(req.userInfo) } yield SuccessfulResponse(pic1, pic2, pic3, pic4, pic5, activity) resp recover { e: Throwable => FailedResponse(e) } }
  • 54. Compose your Futures implicit val _timeout = Timeout(30.seconds) def restHandler(req: RESTRequest): Future[RESTResponse] = { val resp = for { validity <- idService.validate(req.userInfo) if validity.isValid profile <- db.getProfile(req.userId) pic1 <- picServer.get(profile.pic1) pic2 <- picServer.get(profile.pic2) pic3 <- picServer.get(profile.pic3) pic4 <- picServer.get(profile.pic4) pic5 <- picServer.get(profile.pic5) activity <- twitterServer.getRecentActivity(req.userInfo) } yield SuccessfulResponse(pic1, pic2, pic3, pic4, pic5, activity) resp recover { e: Throwable => FailedResponse(e) } } Errors have been handled Timeouts have been handled It’s (probably) Threadsafe I didn’t have to shrink the font
  • 55. So why would I use Futures?
  • 56. So why would I use Futures? Asynchronous programming is still hard⦿
  • 57. So why would I use Futures? Asynchronous programming is still hard⦿ Programming synchronously isn’t a reasonable response⦿ Thread starvation timeouts capacity issues thread thrashing
  • 58. So why would I use Futures? Asynchronous programming is still hard⦿ Programming synchronously isn’t a reasonable response⦿ Scala Futures embody asynchronous values⦿ Thread starvation timeouts capacity issues thread thrashing Everything is a value
  • 59. So why would I use Futures? Asynchronous programming is still hard⦿ Programming synchronously isn’t a reasonable response⦿ Scala Futures embody asynchronous values⦿ They let us express composed asynchronous computation⦿ Thread starvation timeouts capacity issues thread thrashing Everything is a value Less Side Effects
  • 60. So why would I use Futures? Asynchronous programming is still hard⦿ Programming synchronously isn’t a reasonable response⦿ Scala Futures embody asynchronous values⦿ They let us express composed asynchronous computation⦿ Futures let us propagate errors and recover from them⦿ Thread starvation timeouts capacity issues thread thrashing Everything is a value Less Side Effects Graceful Failure Resiliency
  • 61. So why would I use Futures? Asynchronous programming is still hard⦿ Programming synchronously isn’t a reasonable response⦿ Scala Futures embody asynchronous values⦿ They let us express composed asynchronous computation⦿ Futures let us propagate errors and recover from them⦿ Asynchronous programming has always been possible but Futures now make it much more viable ⦿ Thread starvation timeouts capacity issues thread thrashing Everything is a value Less Side Effects Graceful Failure Resiliency
  • 62. Operating on Data Streams
  • 63. Operating on Data Streams ❉ In the real world, we communicate with things Networks Disks Databases Services Slower Algorithms
  • 64. Operating on Data Streams ❉ In the real world, we communicate with things Networks Disks Databases Services Slower Algorithms ❉ Polling sucks. We live in a real time world.
  • 65. Operating on Data Streams ❉ In the real world, we communicate with things Networks Disks Databases Services Slower Algorithms ❉ Polling sucks. We live in a real time world. ❉ Eventing can be hard, since it doesn’t compose
  • 66. Operating on Data Streams ❉ In the real world, we communicate with things Networks Disks Databases Services Slower Algorithms ❉ Polling sucks. We live in a real time world. ❉ Eventing can be hard, since it doesn’t compose ❉ Throttling is a real problem we never address
  • 67. Operating on Data Streams ❉ In the real world, we communicate with things Networks Disks Databases Services Slower Algorithms ❉ Polling sucks. We live in a real time world. ❉ Eventing can be hard, since it doesn’t compose ❉ Throttling is a real problem we never address ❉ Akka Streams help us solve all of these problems
  • 68. Operating on Data Streams ❉ In the real world, we communicate with things Networks Disks Databases Services Slower Algorithms ❉ Polling sucks. We live in a real time world. ❉ Eventing can be hard, since it doesn’t compose ❉ Throttling is a real problem we never address ❉ Akka Streams help us solve all of these problems Source Transformation Flow Transformation Flow Sink Demand Supply
  • 69. BackPressure is key Source Sink
  • 70. BackPressure is key ◎ Fast producers can kill; we only have so much RAM Source Sink
  • 71. BackPressure is key ◎ Fast producers can kill; we only have so much RAM ◎ Producers can’t be artificially slow just to be nice Source Sink
  • 72. BackPressure is key ◎ Fast producers can kill; we only have so much RAM ◎ Producers can’t be artificially slow just to be nice ◎ Consumers signal demand, Producers signal supply Source Sink
  • 73. BackPressure is key ◎ Fast producers can kill; we only have so much RAM ◎ Producers can’t be artificially slow just to be nice ◎ Consumers signal demand, Producers signal supply ◎ When a consumer is slow, it signals no demand Source Sink
  • 74. BackPressure is key ◎ Fast producers can kill; we only have so much RAM ◎ Producers can’t be artificially slow just to be nice ◎ Consumers signal demand, Producers signal supply ◎ When a consumer is slow, it signals no demand ◎ When a producer is slow, it doesn’t supply Source Sink
  • 75. BackPressure is key ◎ Fast producers can kill; we only have so much RAM ◎ Producers can’t be artificially slow just to be nice ◎ Consumers signal demand, Producers signal supply ◎ When a consumer is slow, it signals no demand ◎ When a producer is slow, it doesn’t supply Source Sink Supply
  • 77. Composable Binary Protocols Framer ByteString ByteString BidiFlow Serializer Object ByteString BidiFlow Chunker ByteString ByteString BidiFlow
  • 78. Composable Binary Protocols Framer ByteString ByteString BidiFlow Serializer Object ByteString BidiFlow Chunker ByteString ByteString BidiFlow Application Object Object Source Sink Network ByteString ByteString Source Sink BidiFlow ByteStringObject
  • 79. Composable Binary Protocols Framer ByteString ByteString BidiFlow Serializer Object ByteString BidiFlow Chunker ByteString ByteString BidiFlow Application Object Object Source Sink Network ByteString ByteString Source Sink BidiFlow ByteStringObject ✗Entirely reusable components that fit in any BiDirectional Flow
  • 80. Composable Binary Protocols Framer ByteString ByteString BidiFlow Serializer Object ByteString BidiFlow Chunker ByteString ByteString BidiFlow Application Object Object Source Sink Network ByteString ByteString Source Sink BidiFlow ByteStringObject ✗Entirely reusable components that fit in any BiDirectional Flow ✗Type safe (or as type safe as byte string marshaling gets)
  • 81. Composable Binary Protocols Framer ByteString ByteString BidiFlow Serializer Object ByteString BidiFlow Chunker ByteString ByteString BidiFlow Application Object Object Source Sink Network ByteString ByteString Source Sink BidiFlow ByteStringObject ✗Entirely reusable components that fit in any BiDirectional Flow ✗Type safe (or as type safe as byte string marshaling gets) ✗Entirely back pressured from end to end
  • 82. Composable Binary Protocols Framer ByteString ByteString BidiFlow Serializer Object ByteString BidiFlow Chunker ByteString ByteString BidiFlow Application Object Object Source Sink Network ByteString ByteString Source Sink BidiFlow ByteStringObject ✗Entirely reusable components that fit in any BiDirectional Flow ✗Type safe (or as type safe as byte string marshaling gets) ✗Entirely back pressured from end to end ✗100% event driven and reactive Realtime Speeds No Blocking Threads Natural Throttling graceful performance degradationNot a Crash
  • 83. Why Would I use Streams?
  • 84. Why Would I use Streams? Streaming is (probably) the crown jewel of Akka’s offering (but it’s a tough call)
  • 85. Why Would I use Streams? Streaming is (probably) the crown jewel of Akka’s offering The need to respond to backpressure is real and we never do it ! (but it’s a tough call)
  • 86. Why Would I use Streams? Streaming is (probably) the crown jewel of Akka’s offering The need to respond to backpressure is real and we never do it The need to treat our threads with respect is important ! ! (but it’s a tough call)
  • 87. Why Would I use Streams? Streaming is (probably) the crown jewel of Akka’s offering The need to respond to backpressure is real and we never do it The need to treat our threads with respect is important The need to be reactive and fast is vital to the user experience ! ! ! (but it’s a tough call)
  • 88. Why Would I use Streams? Streaming is (probably) the crown jewel of Akka’s offering The need to respond to backpressure is real and we never do it The need to treat our threads with respect is important The need to be reactive and fast is vital to the user experience Streams give us all of this and let us use our hardware to its fullest ! ! ! !!! (but it’s a tough call)
  • 89. Akka from 20k feetAkka from 20k feet
  • 90. Akka from 20k feetAkka from 20k feet Actors! Actors! Live Objects Supervised Asynchronous Message Passing Services State Machines Network Ready
  • 91. Akka from 20k feetAkka from 20k feet Actors! Actors! Futures! Futures! Live Objects Supervised Asynchronous Message Passing Services State Machines Network Ready Composable Values Reactive Monadic Immutable Threadsafe Work Well with Actors
  • 92. Akka from 20k feetAkka from 20k feet Actors! Actors! Futures! Futures! Streams! Streams! Live Objects Supervised Asynchronous Message Passing Services State Machines Network Ready Composable Values Reactive Monadic Immutable Threadsafe Work Well with Actors BackPressured Composable Reusable Event Driven Flexible Lots of Activity and Support Work with Futures and Actors
  • 93. Go Get AKKA!Go Get AKKA! Website: http://akka.io Scala Reference: http://doc.akka.io/docs/akka/current/scala.html Java Reference: http://doc.akka.io/docs/akka/current/java.html Streams Reference: http://doc.akka.io/docs/akka-stream-and-http-experimental/current/scala.html Derek Wyatt Twitter: @derekwyatt Email: derek@derekwyatt.orgAugust 2015