SlideShare una empresa de Scribd logo
1 de 115
Descargar para leer sin conexión
Go Reactive
Event-Driven,
Scalable,
Resilient &
Responsive
Systems

Jonas Bonér
CTO Typesafe
@jboner
New Tools for a New Era
• The demands and expectations for applications have
changed dramatically in recent years
New Tools for a New Era
• The demands and expectations for applications have
changed dramatically in recent years
• We need to write applications that manages
1. Mobile devices
2. Multicore architectures
3. Cloud computing environments
New Tools for a New Era
• The demands and expectations for applications have
changed dramatically in recent years
• We need to write applications that manages
1. Mobile devices
2. Multicore architectures
3. Cloud computing environments

• Deliver applications that are
1. Interactive & Real-time
2. Responsive
3. Collaborative
New Tools for a New Era
New Tools for a New Era
We to need to build systems that:
New Tools for a New Era
We to need to build systems that:
•

react to events — Event-Driven
New Tools for a New Era
We to need to build systems that:
•

react to events — Event-Driven

•

react to load

— Scalable
New Tools for a New Era
We to need to build systems that:
•

react to events — Event-Driven

•

react to load

•

react to failure — Resilient

— Scalable
New Tools for a New Era
We to need to build systems that:
•

react to events — Event-Driven

•

react to load

•

react to failure — Resilient

•

react to users — Responsive

— Scalable
New Tools for a New Era
We to need to build systems that:
•

react to events — Event-Driven

•

react to load

•

react to failure — Resilient

•

react to users — Responsive

— Scalable

Reactive Applications
Reactive
“Readily responsive to a stimulus”	

- Merriam Webster
The four traits of Reactive
Responsive

Scalable

Resilient

Event-Driven
Event-Driven
“The flow of the program is determined by events” 	

- Wikipedia
Shared mutable state
Shared mutable state
Together with threads...
Shared mutable state
Together with threads...

...leads to
Shared mutable state
Together with threads...
...code that is totally non-deterministic
...leads to
Shared mutable state
Together with threads...
...code that is totally non-deterministic
...leads to

...and the root of all EVIL
Shared mutable state
Together with threads...
...code that is totally non-deterministic
...leads to

...and the root of all EVIL

Please, avoid it at all cost
Shared mutable state
Together with threads...
...code that is totally non-deterministic
...leads to

...and the root of all EVIL

Please, avoid it at all cost
1. Never block
1. Never block
• ...unless you really have to
• Blocking kills scalability (& performance)
• Never sit on resources you don’t use
• Use non-blocking IO
• Use lock-free concurrency
2. Go Async
Design for reactive event-driven systems
•

Use asynchronous event/message passing

•

Think in workflow, how the events flow in the system

•

Gives you
1. lower latency
2. better throughput
3. a more loosely coupled architecture, easier to
extend, evolve & maintain
Amdahl’s Law
Amdahl’s Law

e
ob
t
ds
ee
N
om
fr
ve
ti
ac
e
R
OM
TT
BO
to
OP
T
You deserve better tools
• Actors
• Agents
• Futures/Dataflow
• Reactive Extensions (Rx)
Actors
• Share NOTHING
• Isolated lightweight event-based processes
• Each actor has a mailbox (message queue)
• Communicates through asynchronous &
non-blocking message passing
• Location transparent (distributable)
• Supervision-based failure management
• Examples: Akka & Erlang
Actors in Akka
public class Greeting implements Serializable {
public final String who;
public Greeting(String who) { this.who = who; }
}
!

public class GreetingActor extends UntypedActor {
!

public void onReceive(Object message) {
if (message instanceof Greeting)
println("Hello " + ((Greeting) message).who);
}
}
Actors in Akka
Define the message(s) the Actor
should be able to respond to

public class Greeting implements Serializable {
public final String who;
public Greeting(String who) { this.who = who; }
}
!

public class GreetingActor extends UntypedActor {
!

public void onReceive(Object message) {
if (message instanceof Greeting)
println("Hello " + ((Greeting) message).who);
}
}
Actors in Akka
Define the message(s) the Actor
should be able to respond to

public class Greeting implements Serializable {
public final String who;
public Greeting(String who) { this.who = who; }
Define the Actor class
}
!

public class GreetingActor extends UntypedActor {
!

public void onReceive(Object message) {
if (message instanceof Greeting)
println("Hello " + ((Greeting) message).who);
}
}
Actors in Akka
Define the message(s) the Actor
should be able to respond to

public class Greeting implements Serializable {
public final String who;
public Greeting(String who) { this.who = who; }
Define the Actor class
}
!

public class GreetingActor extends UntypedActor {
!

public void onReceive(Object message) {
if (message instanceof Greeting)
println("Hello " + ((Greeting) message).who);
}
Define the Actor’s behavior
}
Agents
• Reactive memory cells
• Send a update function to the Agent, which
1. adds it to an (ordered) queue, to be
2. applied to the Agent async & non-blocking

• Reads are “free”, just dereferences the Ref
• Composes nicely
• Examples: Clojure & Akka
Agents in Akka

val agent = Agent(5)
agent send (x => x + 1)
agent send (x => x * 2)
Futures/Dataflow
• Allows you to spawn concurrent computations
and work with the not yet computed results
• Write-once, Read-many
• Freely sharable
• Allows non-blocking composition
• Monadic (composes in for-comprehensions)
• Build in model for managing failure
Futures in Scala
val result1 = future { ... }
val result2 = future { ... }
val result3 = future { ... }
!

val sum
  r1 <  r2 <  r3 <} yield

= for {
result1
result2
result3
{ r1 + r2 + r3 }
Reactive Extensions (Rx)
• Extend Futures with the concept of a Stream
• Composable in a type-safe way
• Event-based & asynchronous
• Observable ⇛ Push Collections
• onNext(T), onError(E), onCompleted()
• Compared to Iterable ⇛ Pull Collections

• Examples: Rx.NET, RxJava, RxJS etc.
RxJava

getDataFromNetwork()
  .skip(10)
  .take(5)
  .map({ s -> return s + " transformed" })
  .subscribe({ println "onNext => " + it })
Scalable
“Capable of being easily expanded or upgraded on demand” 	

- Merriam Webster
Distributed systems is the

new normal
Distributed systems is the

new normal
You already have a distributed system,
whether you want it or not
Distributed systems is the

new normal
You already have a distributed system,
whether you want it or not

Mobile
NOSQL DBs

SQL Replication
Cloud Services
What is the essence of
distributed computing?
What is the essence of
distributed computing?
It’s to try to overcome that
1. Information travels at the speed of light
2. Independent things fail independently
Why do we need it?
Why do we need it?
Scalability
When you outgrow
the resources of
a single node
Why do we need it?
Scalability
When you outgrow
the resources of
a single node

Availability
Providing resilience if
one node fails
Why do we need it?
Scalability
When you outgrow
the resources of
a single node

Availability
Providing resilience if
one node fails

Rich stateful clients
The problem?
The problem?
It is still

Very Hard
No difference
Between a

Slow node
and a

!

Dead node
The network is
Inherently Unreliable
The network is
Inherently Unreliable
http://aphyr.com/posts/288-the-network-is-reliable
Fallacies
Peter
Deutsch’s
8 Fallacies
of
Distributed
Computing
Fallacies
Peter
Deutsch’s
8 Fallacies
of
Distributed
Computing

1. The network is reliable
2. Latency is zero
3. Bandwidth is infinite
4. The network is secure
5. Topology doesn't change
6. There is one administrator
7. Transport cost is zero
8. The network is homogeneous
Graveyard of distributed systems
• Distributed Shared Mutable State
N
•

EVIL

(where N is number of nodes)
Graveyard of distributed systems
• Distributed Shared Mutable State
N
•

EVIL

(where N is number of nodes)

• Serializable Distributed Transactions
Graveyard of distributed systems
• Distributed Shared Mutable State
N
•

EVIL

(where N is number of nodes)

• Serializable Distributed Transactions
• Synchronous RPC
Graveyard of distributed systems
• Distributed Shared Mutable State
N
•

EVIL

(where N is number of nodes)

• Serializable Distributed Transactions
• Synchronous RPC
• Guaranteed Delivery
Graveyard of distributed systems
• Distributed Shared Mutable State
N
•

EVIL

(where N is number of nodes)

• Serializable Distributed Transactions
• Synchronous RPC
• Guaranteed Delivery
• Distributed Objects
Graveyard of distributed systems
• Distributed Shared Mutable State
N
•

EVIL

(where N is number of nodes)

• Serializable Distributed Transactions
• Synchronous RPC
• Guaranteed Delivery
• Distributed Objects
• “Sucks like an inverted hurricane” - Martin Fowler
Instead
Instead

Embrace the Network
Use
Asynchronous
Message
Passing

it
h

n
a

b
d

e
on
d
e

it
w
We need

Location Transparency
What is
Location Transparency?
// send message to local actor
ActorRef localGreeter = system.actorOf(
new Props(GreetingActor.class), “greeter");
!

localGreeter.tell(“Jonas”);
What is
Location Transparency?
// send message to local actor
ActorRef localGreeter = system.actorOf(
new Props(GreetingActor.class), “greeter");
!

localGreeter.tell(“Jonas”);

// send message to remote actor
ActorRef remoteGreeter = system.actorOf(
new Props(GreetingActor.class), “greeter");
!

remoteGreeter.tell(“Jonas”);
What is
Location Transparency?

e
c
n
e
r
e
f
if
d
o

// send message to local actor
ActorRef localGreeter = system.actorOf(
new Props(GreetingActor.class), “greeter");
!

localGreeter.tell(“Jonas”);

N

// send message to remote actor
ActorRef remoteGreeter = system.actorOf(
new Props(GreetingActor.class), “greeter");
!

remoteGreeter.tell(“Jonas”);
Divide & Conquer

Partition

for scale

Replicate
for resilience
Share
Nothing
Share
Nothing
Asynchronous
Communication
Share
Nothing
Asynchronous
Communication

Loose
Coupling
Share
Nothing
Asynchronous
Communication

Loose
Coupling
Location
Transparency
Share
Nothing
Asynchronous
Communication

Loose
Coupling
Location
Transparency

No limit to scalability
Share
Nothing
Asynchronous
Communication

Loose
Coupling
Location
Transparency

Close to at least

No limit to scalability
Resilience
“The ability of a substance or object to spring back into shape.” 	

“The capacity to recover quickly from difficulties.”	

- Merriam Webster
Failure Recovery in Java/C/C# etc.
Failure Recovery in Java/C/C# etc.
• You are given a SINGLE thread of control
• If this thread blows up you are screwed
• So you need to do all explicit error handling
WITHIN this single thread
• To make things worse - errors do not
propagate between threads so there is NO
WAY OF EVEN FINDING OUT that something
have failed
• This leads to DEFENSIVE programming with:
• Error handling TANGLED with business logic
• SCATTERED all over the code base
Failure Recovery in Java/C/C# etc.

o
d
n
a
c
e
W
!!
!
R
E
T
T
E
B

• You are given a SINGLE thread of control
• If this thread blows up you are screwed

• So you need to do all explicit error handling
WITHIN this single thread
• To make things worse - errors do not
propagate between threads so there is NO
WAY OF EVEN FINDING OUT that something
have failed
• This leads to DEFENSIVE programming with:
• Error handling TANGLED with business logic
• SCATTERED all over the code base
The Right Way
The Right Way
• Isolate the failure
• Compartmentalize
• Manage failure locally
• Avoid cascading failures
The Right Way
• Isolate the failure
• Compartmentalize
• Manage failure locally
• Avoid cascading failures

Use Bulkheads
...together with supervision
...together with supervision
1. Use Isolated lightweight processes (compartments)
2. Supervise these processes
1. Each process has a supervising parent process
2. Errors are reified and sent as (async) events to the supervisor
3. Supervisor manages the failure - can kill, restart, suspend/resume

• Same semantics local as remote
• Full decoupling between business logic & error handling
• Build into the Actor model
Supervision in Akka
Every single actor has a
default supervisor strategy.
Which is usually sufficient.
But it can be overridden.
Supervision in Akka
Every single actor has a
default supervisor strategy.
Which is usually sufficient.
But it can be overridden.
class Supervisor extends UntypedActor {
private SupervisorStrategy strategy = new OneForOneStrategy(
10,
Duration.parse("1 minute"),
new Function<Throwable, Directive>() {
@Override public Directive apply(Throwable t) {
if (t instanceof ArithmeticException)
return resume();
else if (t instanceof NullPointerException) return restart();
else
return escalate();
}
});

!

@Override public SupervisorStrategy supervisorStrategy() {
Supervision in Akka
class Supervisor extends UntypedActor {
private SupervisorStrategy strategy = new OneForOneStrategy(
10,
Duration.parse("1 minute"),
new Function<Throwable, Directive>() {
@Override public Directive apply(Throwable t) {
if (t instanceof ArithmeticException)
return resume();
else if (t instanceof NullPointerException) return restart();
else
return escalate();
}
});

!

@Override public SupervisorStrategy supervisorStrategy() {
return strategy;
}
ActorRef worker = context.actorOf(new Props(Worker.class));

}

public void onReceive(Object message) throws Exception {
if (message instanceof Integer) worker.forward(message);
}
Responsive
“Quick to respond or react appropriately”	

- Merriam Webster
Keep

latency consistent
1. Blue sky scenarios
2. Traffic bursts
3. Failures
Keep

latency consistent
1. Blue sky scenarios
2. Traffic bursts
3. Failures

The system should

always be responsive
Use Back Pressure
Bounded queues with backoff strategies
Use Back Pressure
Bounded queues with backoff strategies

Respect Little’s Law:

L = λW
Queue Length = Arrival Rate * Response Time
Use Back Pressure
Bounded queues with backoff strategies

Respect Little’s Law:

L = λW
Queue Length = Arrival Rate * Response Time
Response Time = Queue Length / Arrival Rate
Use Back Pressure
Bounded queues with backoff strategies

Respect Little’s Law:

L = λW
Queue Length = Arrival Rate * Response Time
Response Time = Queue Length / Arrival Rate
Use Back Pressure
Bounded queues with backoff strategies
Apply backpressure here

Respect Little’s Law:

L = λW
Queue Length = Arrival Rate * Response Time
Response Time = Queue Length / Arrival Rate
Smart Batching

Smart Batching
http://bit.ly/smartbatching
By Martin Thompson
Smart Batching

Smart Batching
http://bit.ly/smartbatching
By Martin Thompson
Reactive Web & Mobile Apps
Reactive Web & Mobile Apps
1. Reactive Request
Async & Non-blocking Request & Response
Reactive Web & Mobile Apps
1. Reactive Request
Async & Non-blocking Request & Response

2. Reactive Composition

Reactive Request + Reactive Request + ...
Reactive Web & Mobile Apps
1. Reactive Request
Async & Non-blocking Request & Response

2. Reactive Composition

Reactive Request + Reactive Request + ...

3. Reactive Push
Stream Producer
Reactive Web & Mobile Apps
1. Reactive Request
Async & Non-blocking Request & Response

2. Reactive Composition

Reactive Request + Reactive Request + ...

3. Reactive Push
Stream Producer

4. 2-way Reactive (Bi-Directional Reactive Push)
Reactive Web & Mobile Apps
1. Reactive Request
Async & Non-blocking Request & Response

2. Reactive Composition

Reactive Request + Reactive Request + ...

3. Reactive Push
Stream Producer

4. 2-way Reactive (Bi-Directional Reactive Push)
Reactive Web & Mobile Apps
1. Reactive Request
Async & Non-blocking Request & Response

2. Reactive Composition

Reactive Request + Reactive Request + ...

3. Reactive Push
Stream Producer

4. 2-way Reactive (Bi-Directional Reactive Push)
Enables Reactive UIs
1. Interactive
2. Data Synchronization
3. “Real-time” Collaboration
Reactive Composition in Play
public class Application extends Controller {
  public static Result index() {
    return ok(index.render("Your new application is ready."));
  }
}
Reactive Composition in Play
public class Application extends Controller {
  public static Result index() {
    return ok(index.render("Your new application is ready."));
  }
}

standard non-reactive request
Reactive Composition in Play
public class Application extends Controller {
  public static Result index() {
    return ok(index.render("Your new application is ready."));
  }
}

standard non-reactive request
def get(symbol: String): Action[AnyContent] = Action.async {
for {
tweets
<- getTweets(symbol)
sentiments <- Future.sequence(loadSentiments(tweets.json))
} yield Ok(toJson(sentiments))
}
Reactive Composition in Play
public class Application extends Controller {
  public static Result index() {
    return ok(index.render("Your new application is ready."));
  }
}

standard non-reactive request
def get(symbol: String): Action[AnyContent] = Action.async {
for {
tweets
<- getTweets(symbol)
sentiments <- Future.sequence(loadSentiments(tweets.json))
} yield Ok(toJson(sentiments))
}

fully reactive non-blocking request composition
http://typesafe.com/platform/getstarted
Demo time

http://typesafe.com/platform/getstarted
Responsive

Scalable

Resilient

Event-Driven
http://reactivemanifesto.org

Jonas Bonér
CTO Typesafe
Twitter: @jboner
Go Reactive
Email: jonas@typesafe.com
Web:
typesafe.com
Twtr: @jboner

Más contenido relacionado

La actualidad más candente

Multi-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and QuasarMulti-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and QuasarGal Marder
 
Developing distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterDeveloping distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterKonstantin Tsykulenko
 
Bootstrapping Microservices with Kafka, Akka and Spark
Bootstrapping Microservices with Kafka, Akka and SparkBootstrapping Microservices with Kafka, Akka and Spark
Bootstrapping Microservices with Kafka, Akka and SparkAlex Silva
 
Reactive Design Patterns — J on the Beach
Reactive Design Patterns — J on the BeachReactive Design Patterns — J on the Beach
Reactive Design Patterns — J on the BeachRoland Kuhn
 
Reactive Design Patterns: a talk by Typesafe's Dr. Roland Kuhn
Reactive Design Patterns: a talk by Typesafe's Dr. Roland KuhnReactive Design Patterns: a talk by Typesafe's Dr. Roland Kuhn
Reactive Design Patterns: a talk by Typesafe's Dr. Roland KuhnZalando Technology
 
Reactive Streams 1.0.0 and Why You Should Care (webinar)
Reactive Streams 1.0.0 and Why You Should Care (webinar)Reactive Streams 1.0.0 and Why You Should Care (webinar)
Reactive Streams 1.0.0 and Why You Should Care (webinar)Legacy Typesafe (now Lightbend)
 
Make 2016 your year of SMACK talk
Make 2016 your year of SMACK talkMake 2016 your year of SMACK talk
Make 2016 your year of SMACK talkDataStax Academy
 
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...Lightbend
 
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeperIntroduction to Apache ZooKeeper
Introduction to Apache ZooKeeperknowbigdata
 
Akka Actor presentation
Akka Actor presentationAkka Actor presentation
Akka Actor presentationGene Chang
 
Lightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just RightLightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just Rightmircodotta
 
What’s expected in Java 9
What’s expected in Java 9What’s expected in Java 9
What’s expected in Java 9Gal Marder
 
101 ways to configure kafka - badly (Kafka Summit)
101 ways to configure kafka - badly (Kafka Summit)101 ways to configure kafka - badly (Kafka Summit)
101 ways to configure kafka - badly (Kafka Summit)Henning Spjelkavik
 
Lagom - Mircoservices "Just Right"
Lagom - Mircoservices "Just Right"Lagom - Mircoservices "Just Right"
Lagom - Mircoservices "Just Right"Markus Jura
 
PlayStation and Cassandra Streams (Alexander Filipchik & Dustin Pham, Sony) |...
PlayStation and Cassandra Streams (Alexander Filipchik & Dustin Pham, Sony) |...PlayStation and Cassandra Streams (Alexander Filipchik & Dustin Pham, Sony) |...
PlayStation and Cassandra Streams (Alexander Filipchik & Dustin Pham, Sony) |...DataStax
 
Kafka and Storm - event processing in realtime
Kafka and Storm - event processing in realtimeKafka and Storm - event processing in realtime
Kafka and Storm - event processing in realtimeGuido Schmutz
 
Asynchronous stream processing with Akka Streams
Asynchronous stream processing with Akka StreamsAsynchronous stream processing with Akka Streams
Asynchronous stream processing with Akka StreamsJohan Andrén
 
Dive into spark2
Dive into spark2Dive into spark2
Dive into spark2Gal Marder
 

La actualidad más candente (20)

Multi-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and QuasarMulti-threading in the modern era: Vertx Akka and Quasar
Multi-threading in the modern era: Vertx Akka and Quasar
 
Introducing Akka
Introducing AkkaIntroducing Akka
Introducing Akka
 
Developing distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterDeveloping distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka Cluster
 
Reactive Design Patterns
Reactive Design PatternsReactive Design Patterns
Reactive Design Patterns
 
Bootstrapping Microservices with Kafka, Akka and Spark
Bootstrapping Microservices with Kafka, Akka and SparkBootstrapping Microservices with Kafka, Akka and Spark
Bootstrapping Microservices with Kafka, Akka and Spark
 
Reactive Design Patterns — J on the Beach
Reactive Design Patterns — J on the BeachReactive Design Patterns — J on the Beach
Reactive Design Patterns — J on the Beach
 
Reactive Design Patterns: a talk by Typesafe's Dr. Roland Kuhn
Reactive Design Patterns: a talk by Typesafe's Dr. Roland KuhnReactive Design Patterns: a talk by Typesafe's Dr. Roland Kuhn
Reactive Design Patterns: a talk by Typesafe's Dr. Roland Kuhn
 
Reactive Streams 1.0.0 and Why You Should Care (webinar)
Reactive Streams 1.0.0 and Why You Should Care (webinar)Reactive Streams 1.0.0 and Why You Should Care (webinar)
Reactive Streams 1.0.0 and Why You Should Care (webinar)
 
Make 2016 your year of SMACK talk
Make 2016 your year of SMACK talkMake 2016 your year of SMACK talk
Make 2016 your year of SMACK talk
 
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
 
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeperIntroduction to Apache ZooKeeper
Introduction to Apache ZooKeeper
 
Akka Actor presentation
Akka Actor presentationAkka Actor presentation
Akka Actor presentation
 
Lightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just RightLightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just Right
 
What’s expected in Java 9
What’s expected in Java 9What’s expected in Java 9
What’s expected in Java 9
 
101 ways to configure kafka - badly (Kafka Summit)
101 ways to configure kafka - badly (Kafka Summit)101 ways to configure kafka - badly (Kafka Summit)
101 ways to configure kafka - badly (Kafka Summit)
 
Lagom - Mircoservices "Just Right"
Lagom - Mircoservices "Just Right"Lagom - Mircoservices "Just Right"
Lagom - Mircoservices "Just Right"
 
PlayStation and Cassandra Streams (Alexander Filipchik & Dustin Pham, Sony) |...
PlayStation and Cassandra Streams (Alexander Filipchik & Dustin Pham, Sony) |...PlayStation and Cassandra Streams (Alexander Filipchik & Dustin Pham, Sony) |...
PlayStation and Cassandra Streams (Alexander Filipchik & Dustin Pham, Sony) |...
 
Kafka and Storm - event processing in realtime
Kafka and Storm - event processing in realtimeKafka and Storm - event processing in realtime
Kafka and Storm - event processing in realtime
 
Asynchronous stream processing with Akka Streams
Asynchronous stream processing with Akka StreamsAsynchronous stream processing with Akka Streams
Asynchronous stream processing with Akka Streams
 
Dive into spark2
Dive into spark2Dive into spark2
Dive into spark2
 

Similar a Build Reactive, Scalable and Resilient Systems

Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examplesPeter Lawrey
 
Akka london scala_user_group
Akka london scala_user_groupAkka london scala_user_group
Akka london scala_user_groupSkills Matter
 
Akka and Kubernetes, the beginning of a beautiful relationship - Container Da...
Akka and Kubernetes, the beginning of a beautiful relationship - Container Da...Akka and Kubernetes, the beginning of a beautiful relationship - Container Da...
Akka and Kubernetes, the beginning of a beautiful relationship - Container Da...Hugh McKee
 
Reactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDaysReactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDaysManuel Bernhardt
 
Concurrency (Fisher Syer S2GX 2010)
Concurrency (Fisher Syer S2GX 2010)Concurrency (Fisher Syer S2GX 2010)
Concurrency (Fisher Syer S2GX 2010)Dave Syer
 
Reactive applications and Akka intro used in the Madrid Scala Meetup
Reactive applications and Akka intro used in the Madrid Scala MeetupReactive applications and Akka intro used in the Madrid Scala Meetup
Reactive applications and Akka intro used in the Madrid Scala MeetupMiguel Pastor
 
Proxy Deep Dive Voxxed Belgrad 2015
Proxy Deep Dive Voxxed Belgrad 2015Proxy Deep Dive Voxxed Belgrad 2015
Proxy Deep Dive Voxxed Belgrad 2015Sven Ruppert
 
Build Cloud Applications with Akka and Heroku
Build Cloud Applications with Akka and HerokuBuild Cloud Applications with Akka and Heroku
Build Cloud Applications with Akka and HerokuSalesforce Developers
 
Walk In a Distributed Systems Park with Microsoft Orleans
Walk In a Distributed Systems Park with Microsoft OrleansWalk In a Distributed Systems Park with Microsoft Orleans
Walk In a Distributed Systems Park with Microsoft OrleansYevhen Bobrov
 
Erlang as a cloud citizen, a fractal approach to throughput
Erlang as a cloud citizen, a fractal approach to throughputErlang as a cloud citizen, a fractal approach to throughput
Erlang as a cloud citizen, a fractal approach to throughputPaolo Negri
 
Erlang and the Cloud: A Fractal Approach to Throughput
Erlang and the Cloud: A Fractal Approach to ThroughputErlang and the Cloud: A Fractal Approach to Throughput
Erlang and the Cloud: A Fractal Approach to ThroughputWooga
 
Erlang as a Cloud Citizen
Erlang as a Cloud CitizenErlang as a Cloud Citizen
Erlang as a Cloud CitizenWooga
 
Javaforum 20110915
Javaforum 20110915Javaforum 20110915
Javaforum 20110915Squeed
 
Nelson: Rigorous Deployment for a Functional World
Nelson: Rigorous Deployment for a Functional WorldNelson: Rigorous Deployment for a Functional World
Nelson: Rigorous Deployment for a Functional WorldTimothy Perrett
 
The quest for global design principles - PHP Benelux 2016
The quest for global design principles - PHP Benelux 2016The quest for global design principles - PHP Benelux 2016
The quest for global design principles - PHP Benelux 2016Matthias Noback
 
Adventures in a Microservice world at REA Group
Adventures in a Microservice world at REA GroupAdventures in a Microservice world at REA Group
Adventures in a Microservice world at REA Groupevanbottcher
 
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaDataGPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaDataCodemotion Tel Aviv
 
"Walk in a distributed systems park with Orleans" Евгений Бобров
"Walk in a distributed systems park with Orleans" Евгений Бобров"Walk in a distributed systems park with Orleans" Евгений Бобров
"Walk in a distributed systems park with Orleans" Евгений БобровFwdays
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structureselliando dias
 

Similar a Build Reactive, Scalable and Resilient Systems (20)

Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examples
 
Akka london scala_user_group
Akka london scala_user_groupAkka london scala_user_group
Akka london scala_user_group
 
Akka and Kubernetes, the beginning of a beautiful relationship - Container Da...
Akka and Kubernetes, the beginning of a beautiful relationship - Container Da...Akka and Kubernetes, the beginning of a beautiful relationship - Container Da...
Akka and Kubernetes, the beginning of a beautiful relationship - Container Da...
 
Reactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDaysReactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDays
 
Java
JavaJava
Java
 
Concurrency (Fisher Syer S2GX 2010)
Concurrency (Fisher Syer S2GX 2010)Concurrency (Fisher Syer S2GX 2010)
Concurrency (Fisher Syer S2GX 2010)
 
Reactive applications and Akka intro used in the Madrid Scala Meetup
Reactive applications and Akka intro used in the Madrid Scala MeetupReactive applications and Akka intro used in the Madrid Scala Meetup
Reactive applications and Akka intro used in the Madrid Scala Meetup
 
Proxy Deep Dive Voxxed Belgrad 2015
Proxy Deep Dive Voxxed Belgrad 2015Proxy Deep Dive Voxxed Belgrad 2015
Proxy Deep Dive Voxxed Belgrad 2015
 
Build Cloud Applications with Akka and Heroku
Build Cloud Applications with Akka and HerokuBuild Cloud Applications with Akka and Heroku
Build Cloud Applications with Akka and Heroku
 
Walk In a Distributed Systems Park with Microsoft Orleans
Walk In a Distributed Systems Park with Microsoft OrleansWalk In a Distributed Systems Park with Microsoft Orleans
Walk In a Distributed Systems Park with Microsoft Orleans
 
Erlang as a cloud citizen, a fractal approach to throughput
Erlang as a cloud citizen, a fractal approach to throughputErlang as a cloud citizen, a fractal approach to throughput
Erlang as a cloud citizen, a fractal approach to throughput
 
Erlang and the Cloud: A Fractal Approach to Throughput
Erlang and the Cloud: A Fractal Approach to ThroughputErlang and the Cloud: A Fractal Approach to Throughput
Erlang and the Cloud: A Fractal Approach to Throughput
 
Erlang as a Cloud Citizen
Erlang as a Cloud CitizenErlang as a Cloud Citizen
Erlang as a Cloud Citizen
 
Javaforum 20110915
Javaforum 20110915Javaforum 20110915
Javaforum 20110915
 
Nelson: Rigorous Deployment for a Functional World
Nelson: Rigorous Deployment for a Functional WorldNelson: Rigorous Deployment for a Functional World
Nelson: Rigorous Deployment for a Functional World
 
The quest for global design principles - PHP Benelux 2016
The quest for global design principles - PHP Benelux 2016The quest for global design principles - PHP Benelux 2016
The quest for global design principles - PHP Benelux 2016
 
Adventures in a Microservice world at REA Group
Adventures in a Microservice world at REA GroupAdventures in a Microservice world at REA Group
Adventures in a Microservice world at REA Group
 
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaDataGPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
 
"Walk in a distributed systems park with Orleans" Евгений Бобров
"Walk in a distributed systems park with Orleans" Евгений Бобров"Walk in a distributed systems park with Orleans" Евгений Бобров
"Walk in a distributed systems park with Orleans" Евгений Бобров
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structures
 

Más de Jonas Bonér

We are drowning in complexity—can we do better?
We are drowning in complexity—can we do better?We are drowning in complexity—can we do better?
We are drowning in complexity—can we do better?Jonas Bonér
 
Kalix: Tackling the The Cloud to Edge Continuum
Kalix: Tackling the The Cloud to Edge ContinuumKalix: Tackling the The Cloud to Edge Continuum
Kalix: Tackling the The Cloud to Edge ContinuumJonas Bonér
 
The Reactive Principles: Design Principles For Cloud Native Applications
The Reactive Principles: Design Principles For Cloud Native ApplicationsThe Reactive Principles: Design Principles For Cloud Native Applications
The Reactive Principles: Design Principles For Cloud Native ApplicationsJonas Bonér
 
Cloudstate—Towards Stateful Serverless
Cloudstate—Towards Stateful ServerlessCloudstate—Towards Stateful Serverless
Cloudstate—Towards Stateful ServerlessJonas Bonér
 
Designing Events-first Microservices
Designing Events-first MicroservicesDesigning Events-first Microservices
Designing Events-first MicroservicesJonas Bonér
 
How Events Are Reshaping Modern Systems
How Events Are Reshaping Modern SystemsHow Events Are Reshaping Modern Systems
How Events Are Reshaping Modern SystemsJonas Bonér
 
Reactive Microsystems: The Evolution of Microservices at Scale
Reactive Microsystems: The Evolution of Microservices at ScaleReactive Microsystems: The Evolution of Microservices at Scale
Reactive Microsystems: The Evolution of Microservices at ScaleJonas Bonér
 
From Microliths To Microsystems
From Microliths To MicrosystemsFrom Microliths To Microsystems
From Microliths To MicrosystemsJonas Bonér
 
Without Resilience, Nothing Else Matters
Without Resilience, Nothing Else MattersWithout Resilience, Nothing Else Matters
Without Resilience, Nothing Else MattersJonas Bonér
 
Life Beyond the Illusion of Present
Life Beyond the Illusion of PresentLife Beyond the Illusion of Present
Life Beyond the Illusion of PresentJonas Bonér
 
Reactive Supply To Changing Demand
Reactive Supply To Changing DemandReactive Supply To Changing Demand
Reactive Supply To Changing DemandJonas Bonér
 
Building Reactive Systems with Akka (in Java 8 or Scala)
Building Reactive Systems with Akka (in Java 8 or Scala)Building Reactive Systems with Akka (in Java 8 or Scala)
Building Reactive Systems with Akka (in Java 8 or Scala)Jonas Bonér
 
Building Scalable, Highly Concurrent & Fault Tolerant Systems - Lessons Learned
Building Scalable, Highly Concurrent & Fault Tolerant Systems -  Lessons LearnedBuilding Scalable, Highly Concurrent & Fault Tolerant Systems -  Lessons Learned
Building Scalable, Highly Concurrent & Fault Tolerant Systems - Lessons LearnedJonas Bonér
 
Event Driven-Architecture from a Scalability perspective
Event Driven-Architecture from a Scalability perspectiveEvent Driven-Architecture from a Scalability perspective
Event Driven-Architecture from a Scalability perspectiveJonas Bonér
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsJonas Bonér
 
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
 
State: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVM
State: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVMState: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVM
State: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVMJonas Bonér
 
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Jonas Bonér
 

Más de Jonas Bonér (18)

We are drowning in complexity—can we do better?
We are drowning in complexity—can we do better?We are drowning in complexity—can we do better?
We are drowning in complexity—can we do better?
 
Kalix: Tackling the The Cloud to Edge Continuum
Kalix: Tackling the The Cloud to Edge ContinuumKalix: Tackling the The Cloud to Edge Continuum
Kalix: Tackling the The Cloud to Edge Continuum
 
The Reactive Principles: Design Principles For Cloud Native Applications
The Reactive Principles: Design Principles For Cloud Native ApplicationsThe Reactive Principles: Design Principles For Cloud Native Applications
The Reactive Principles: Design Principles For Cloud Native Applications
 
Cloudstate—Towards Stateful Serverless
Cloudstate—Towards Stateful ServerlessCloudstate—Towards Stateful Serverless
Cloudstate—Towards Stateful Serverless
 
Designing Events-first Microservices
Designing Events-first MicroservicesDesigning Events-first Microservices
Designing Events-first Microservices
 
How Events Are Reshaping Modern Systems
How Events Are Reshaping Modern SystemsHow Events Are Reshaping Modern Systems
How Events Are Reshaping Modern Systems
 
Reactive Microsystems: The Evolution of Microservices at Scale
Reactive Microsystems: The Evolution of Microservices at ScaleReactive Microsystems: The Evolution of Microservices at Scale
Reactive Microsystems: The Evolution of Microservices at Scale
 
From Microliths To Microsystems
From Microliths To MicrosystemsFrom Microliths To Microsystems
From Microliths To Microsystems
 
Without Resilience, Nothing Else Matters
Without Resilience, Nothing Else MattersWithout Resilience, Nothing Else Matters
Without Resilience, Nothing Else Matters
 
Life Beyond the Illusion of Present
Life Beyond the Illusion of PresentLife Beyond the Illusion of Present
Life Beyond the Illusion of Present
 
Reactive Supply To Changing Demand
Reactive Supply To Changing DemandReactive Supply To Changing Demand
Reactive Supply To Changing Demand
 
Building Reactive Systems with Akka (in Java 8 or Scala)
Building Reactive Systems with Akka (in Java 8 or Scala)Building Reactive Systems with Akka (in Java 8 or Scala)
Building Reactive Systems with Akka (in Java 8 or Scala)
 
Building Scalable, Highly Concurrent & Fault Tolerant Systems - Lessons Learned
Building Scalable, Highly Concurrent & Fault Tolerant Systems -  Lessons LearnedBuilding Scalable, Highly Concurrent & Fault Tolerant Systems -  Lessons Learned
Building Scalable, Highly Concurrent & Fault Tolerant Systems - Lessons Learned
 
Event Driven-Architecture from a Scalability perspective
Event Driven-Architecture from a Scalability perspectiveEvent Driven-Architecture from a Scalability perspective
Event Driven-Architecture from a Scalability perspective
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability Patterns
 
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...
 
State: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVM
State: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVMState: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVM
State: You're Doing It Wrong - Alternative Concurrency Paradigms For The JVM
 
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)
 

Último

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 

Build Reactive, Scalable and Resilient Systems

  • 2. New Tools for a New Era • The demands and expectations for applications have changed dramatically in recent years
  • 3. New Tools for a New Era • The demands and expectations for applications have changed dramatically in recent years • We need to write applications that manages 1. Mobile devices 2. Multicore architectures 3. Cloud computing environments
  • 4. New Tools for a New Era • The demands and expectations for applications have changed dramatically in recent years • We need to write applications that manages 1. Mobile devices 2. Multicore architectures 3. Cloud computing environments • Deliver applications that are 1. Interactive & Real-time 2. Responsive 3. Collaborative
  • 5. New Tools for a New Era
  • 6. New Tools for a New Era We to need to build systems that:
  • 7. New Tools for a New Era We to need to build systems that: • react to events — Event-Driven
  • 8. New Tools for a New Era We to need to build systems that: • react to events — Event-Driven • react to load — Scalable
  • 9. New Tools for a New Era We to need to build systems that: • react to events — Event-Driven • react to load • react to failure — Resilient — Scalable
  • 10. New Tools for a New Era We to need to build systems that: • react to events — Event-Driven • react to load • react to failure — Resilient • react to users — Responsive — Scalable
  • 11. New Tools for a New Era We to need to build systems that: • react to events — Event-Driven • react to load • react to failure — Resilient • react to users — Responsive — Scalable Reactive Applications
  • 12. Reactive “Readily responsive to a stimulus” - Merriam Webster
  • 13. The four traits of Reactive Responsive Scalable Resilient Event-Driven
  • 14. Event-Driven “The flow of the program is determined by events” - Wikipedia
  • 16. Shared mutable state Together with threads...
  • 17. Shared mutable state Together with threads... ...leads to
  • 18. Shared mutable state Together with threads... ...code that is totally non-deterministic ...leads to
  • 19. Shared mutable state Together with threads... ...code that is totally non-deterministic ...leads to ...and the root of all EVIL
  • 20. Shared mutable state Together with threads... ...code that is totally non-deterministic ...leads to ...and the root of all EVIL Please, avoid it at all cost
  • 21. Shared mutable state Together with threads... ...code that is totally non-deterministic ...leads to ...and the root of all EVIL Please, avoid it at all cost
  • 23. 1. Never block • ...unless you really have to • Blocking kills scalability (& performance) • Never sit on resources you don’t use • Use non-blocking IO • Use lock-free concurrency
  • 24. 2. Go Async Design for reactive event-driven systems • Use asynchronous event/message passing • Think in workflow, how the events flow in the system • Gives you 1. lower latency 2. better throughput 3. a more loosely coupled architecture, easier to extend, evolve & maintain
  • 27. You deserve better tools • Actors • Agents • Futures/Dataflow • Reactive Extensions (Rx)
  • 28. Actors • Share NOTHING • Isolated lightweight event-based processes • Each actor has a mailbox (message queue) • Communicates through asynchronous & non-blocking message passing • Location transparent (distributable) • Supervision-based failure management • Examples: Akka & Erlang
  • 29. Actors in Akka public class Greeting implements Serializable { public final String who; public Greeting(String who) { this.who = who; } } ! public class GreetingActor extends UntypedActor { ! public void onReceive(Object message) { if (message instanceof Greeting) println("Hello " + ((Greeting) message).who); } }
  • 30. Actors in Akka Define the message(s) the Actor should be able to respond to public class Greeting implements Serializable { public final String who; public Greeting(String who) { this.who = who; } } ! public class GreetingActor extends UntypedActor { ! public void onReceive(Object message) { if (message instanceof Greeting) println("Hello " + ((Greeting) message).who); } }
  • 31. Actors in Akka Define the message(s) the Actor should be able to respond to public class Greeting implements Serializable { public final String who; public Greeting(String who) { this.who = who; } Define the Actor class } ! public class GreetingActor extends UntypedActor { ! public void onReceive(Object message) { if (message instanceof Greeting) println("Hello " + ((Greeting) message).who); } }
  • 32. Actors in Akka Define the message(s) the Actor should be able to respond to public class Greeting implements Serializable { public final String who; public Greeting(String who) { this.who = who; } Define the Actor class } ! public class GreetingActor extends UntypedActor { ! public void onReceive(Object message) { if (message instanceof Greeting) println("Hello " + ((Greeting) message).who); } Define the Actor’s behavior }
  • 33. Agents • Reactive memory cells • Send a update function to the Agent, which 1. adds it to an (ordered) queue, to be 2. applied to the Agent async & non-blocking • Reads are “free”, just dereferences the Ref • Composes nicely • Examples: Clojure & Akka
  • 34. Agents in Akka val agent = Agent(5) agent send (x => x + 1) agent send (x => x * 2)
  • 35. Futures/Dataflow • Allows you to spawn concurrent computations and work with the not yet computed results • Write-once, Read-many • Freely sharable • Allows non-blocking composition • Monadic (composes in for-comprehensions) • Build in model for managing failure
  • 36. Futures in Scala val result1 = future { ... } val result2 = future { ... } val result3 = future { ... } ! val sum   r1 <  r2 <  r3 <} yield = for { result1 result2 result3 { r1 + r2 + r3 }
  • 37. Reactive Extensions (Rx) • Extend Futures with the concept of a Stream • Composable in a type-safe way • Event-based & asynchronous • Observable ⇛ Push Collections • onNext(T), onError(E), onCompleted() • Compared to Iterable ⇛ Pull Collections • Examples: Rx.NET, RxJava, RxJS etc.
  • 38. RxJava getDataFromNetwork()   .skip(10)   .take(5)   .map({ s -> return s + " transformed" })   .subscribe({ println "onNext => " + it })
  • 39. Scalable “Capable of being easily expanded or upgraded on demand” - Merriam Webster
  • 40. Distributed systems is the new normal
  • 41. Distributed systems is the new normal You already have a distributed system, whether you want it or not
  • 42. Distributed systems is the new normal You already have a distributed system, whether you want it or not Mobile NOSQL DBs SQL Replication Cloud Services
  • 43. What is the essence of distributed computing?
  • 44. What is the essence of distributed computing? It’s to try to overcome that 1. Information travels at the speed of light 2. Independent things fail independently
  • 45. Why do we need it?
  • 46. Why do we need it? Scalability When you outgrow the resources of a single node
  • 47. Why do we need it? Scalability When you outgrow the resources of a single node Availability Providing resilience if one node fails
  • 48. Why do we need it? Scalability When you outgrow the resources of a single node Availability Providing resilience if one node fails Rich stateful clients
  • 50. The problem? It is still Very Hard
  • 51. No difference Between a Slow node and a ! Dead node
  • 53. The network is Inherently Unreliable http://aphyr.com/posts/288-the-network-is-reliable
  • 55. Fallacies Peter Deutsch’s 8 Fallacies of Distributed Computing 1. The network is reliable 2. Latency is zero 3. Bandwidth is infinite 4. The network is secure 5. Topology doesn't change 6. There is one administrator 7. Transport cost is zero 8. The network is homogeneous
  • 56. Graveyard of distributed systems • Distributed Shared Mutable State N • EVIL (where N is number of nodes)
  • 57. Graveyard of distributed systems • Distributed Shared Mutable State N • EVIL (where N is number of nodes) • Serializable Distributed Transactions
  • 58. Graveyard of distributed systems • Distributed Shared Mutable State N • EVIL (where N is number of nodes) • Serializable Distributed Transactions • Synchronous RPC
  • 59. Graveyard of distributed systems • Distributed Shared Mutable State N • EVIL (where N is number of nodes) • Serializable Distributed Transactions • Synchronous RPC • Guaranteed Delivery
  • 60. Graveyard of distributed systems • Distributed Shared Mutable State N • EVIL (where N is number of nodes) • Serializable Distributed Transactions • Synchronous RPC • Guaranteed Delivery • Distributed Objects
  • 61. Graveyard of distributed systems • Distributed Shared Mutable State N • EVIL (where N is number of nodes) • Serializable Distributed Transactions • Synchronous RPC • Guaranteed Delivery • Distributed Objects • “Sucks like an inverted hurricane” - Martin Fowler
  • 65. What is Location Transparency? // send message to local actor ActorRef localGreeter = system.actorOf( new Props(GreetingActor.class), “greeter"); ! localGreeter.tell(“Jonas”);
  • 66. What is Location Transparency? // send message to local actor ActorRef localGreeter = system.actorOf( new Props(GreetingActor.class), “greeter"); ! localGreeter.tell(“Jonas”); // send message to remote actor ActorRef remoteGreeter = system.actorOf( new Props(GreetingActor.class), “greeter"); ! remoteGreeter.tell(“Jonas”);
  • 67. What is Location Transparency? e c n e r e f if d o // send message to local actor ActorRef localGreeter = system.actorOf( new Props(GreetingActor.class), “greeter"); ! localGreeter.tell(“Jonas”); N // send message to remote actor ActorRef remoteGreeter = system.actorOf( new Props(GreetingActor.class), “greeter"); ! remoteGreeter.tell(“Jonas”);
  • 68. Divide & Conquer Partition for scale Replicate for resilience
  • 69.
  • 76. Resilience “The ability of a substance or object to spring back into shape.” “The capacity to recover quickly from difficulties.” - Merriam Webster
  • 77. Failure Recovery in Java/C/C# etc.
  • 78. Failure Recovery in Java/C/C# etc. • You are given a SINGLE thread of control • If this thread blows up you are screwed • So you need to do all explicit error handling WITHIN this single thread • To make things worse - errors do not propagate between threads so there is NO WAY OF EVEN FINDING OUT that something have failed • This leads to DEFENSIVE programming with: • Error handling TANGLED with business logic • SCATTERED all over the code base
  • 79. Failure Recovery in Java/C/C# etc. o d n a c e W !! ! R E T T E B • You are given a SINGLE thread of control • If this thread blows up you are screwed • So you need to do all explicit error handling WITHIN this single thread • To make things worse - errors do not propagate between threads so there is NO WAY OF EVEN FINDING OUT that something have failed • This leads to DEFENSIVE programming with: • Error handling TANGLED with business logic • SCATTERED all over the code base
  • 80.
  • 82. The Right Way • Isolate the failure • Compartmentalize • Manage failure locally • Avoid cascading failures
  • 83. The Right Way • Isolate the failure • Compartmentalize • Manage failure locally • Avoid cascading failures Use Bulkheads
  • 85. ...together with supervision 1. Use Isolated lightweight processes (compartments) 2. Supervise these processes 1. Each process has a supervising parent process 2. Errors are reified and sent as (async) events to the supervisor 3. Supervisor manages the failure - can kill, restart, suspend/resume • Same semantics local as remote • Full decoupling between business logic & error handling • Build into the Actor model
  • 86. Supervision in Akka Every single actor has a default supervisor strategy. Which is usually sufficient. But it can be overridden.
  • 87. Supervision in Akka Every single actor has a default supervisor strategy. Which is usually sufficient. But it can be overridden. class Supervisor extends UntypedActor { private SupervisorStrategy strategy = new OneForOneStrategy( 10, Duration.parse("1 minute"), new Function<Throwable, Directive>() { @Override public Directive apply(Throwable t) { if (t instanceof ArithmeticException) return resume(); else if (t instanceof NullPointerException) return restart(); else return escalate(); } }); ! @Override public SupervisorStrategy supervisorStrategy() {
  • 88. Supervision in Akka class Supervisor extends UntypedActor { private SupervisorStrategy strategy = new OneForOneStrategy( 10, Duration.parse("1 minute"), new Function<Throwable, Directive>() { @Override public Directive apply(Throwable t) { if (t instanceof ArithmeticException) return resume(); else if (t instanceof NullPointerException) return restart(); else return escalate(); } }); ! @Override public SupervisorStrategy supervisorStrategy() { return strategy; } ActorRef worker = context.actorOf(new Props(Worker.class)); } public void onReceive(Object message) throws Exception { if (message instanceof Integer) worker.forward(message); }
  • 89. Responsive “Quick to respond or react appropriately” - Merriam Webster
  • 90. Keep latency consistent 1. Blue sky scenarios 2. Traffic bursts 3. Failures
  • 91. Keep latency consistent 1. Blue sky scenarios 2. Traffic bursts 3. Failures The system should always be responsive
  • 92. Use Back Pressure Bounded queues with backoff strategies
  • 93. Use Back Pressure Bounded queues with backoff strategies Respect Little’s Law: L = λW Queue Length = Arrival Rate * Response Time
  • 94. Use Back Pressure Bounded queues with backoff strategies Respect Little’s Law: L = λW Queue Length = Arrival Rate * Response Time Response Time = Queue Length / Arrival Rate
  • 95. Use Back Pressure Bounded queues with backoff strategies Respect Little’s Law: L = λW Queue Length = Arrival Rate * Response Time Response Time = Queue Length / Arrival Rate
  • 96. Use Back Pressure Bounded queues with backoff strategies Apply backpressure here Respect Little’s Law: L = λW Queue Length = Arrival Rate * Response Time Response Time = Queue Length / Arrival Rate
  • 99. Reactive Web & Mobile Apps
  • 100. Reactive Web & Mobile Apps 1. Reactive Request Async & Non-blocking Request & Response
  • 101. Reactive Web & Mobile Apps 1. Reactive Request Async & Non-blocking Request & Response 2. Reactive Composition Reactive Request + Reactive Request + ...
  • 102. Reactive Web & Mobile Apps 1. Reactive Request Async & Non-blocking Request & Response 2. Reactive Composition Reactive Request + Reactive Request + ... 3. Reactive Push Stream Producer
  • 103. Reactive Web & Mobile Apps 1. Reactive Request Async & Non-blocking Request & Response 2. Reactive Composition Reactive Request + Reactive Request + ... 3. Reactive Push Stream Producer 4. 2-way Reactive (Bi-Directional Reactive Push)
  • 104. Reactive Web & Mobile Apps 1. Reactive Request Async & Non-blocking Request & Response 2. Reactive Composition Reactive Request + Reactive Request + ... 3. Reactive Push Stream Producer 4. 2-way Reactive (Bi-Directional Reactive Push)
  • 105. Reactive Web & Mobile Apps 1. Reactive Request Async & Non-blocking Request & Response 2. Reactive Composition Reactive Request + Reactive Request + ... 3. Reactive Push Stream Producer 4. 2-way Reactive (Bi-Directional Reactive Push) Enables Reactive UIs 1. Interactive 2. Data Synchronization 3. “Real-time” Collaboration
  • 106. Reactive Composition in Play public class Application extends Controller {   public static Result index() {     return ok(index.render("Your new application is ready."));   } }
  • 107. Reactive Composition in Play public class Application extends Controller {   public static Result index() {     return ok(index.render("Your new application is ready."));   } } standard non-reactive request
  • 108. Reactive Composition in Play public class Application extends Controller {   public static Result index() {     return ok(index.render("Your new application is ready."));   } } standard non-reactive request def get(symbol: String): Action[AnyContent] = Action.async { for { tweets <- getTweets(symbol) sentiments <- Future.sequence(loadSentiments(tweets.json)) } yield Ok(toJson(sentiments)) }
  • 109. Reactive Composition in Play public class Application extends Controller {   public static Result index() {     return ok(index.render("Your new application is ready."));   } } standard non-reactive request def get(symbol: String): Action[AnyContent] = Action.async { for { tweets <- getTweets(symbol) sentiments <- Future.sequence(loadSentiments(tweets.json)) } yield Ok(toJson(sentiments)) } fully reactive non-blocking request composition
  • 110.