SlideShare a Scribd company logo
Advanced Akka For Architects
Akka Multi-Data Center
Clustering
Cluster Singletons
Cluster Sharding
Persistence
Akka Single Node
Akka Cluster
Single Data Center
Akka Cluster
Single Data Center
Split Brain
Unresponsive
Member
Speed of light 300 km/ms, 186 mi/ms
Small circle radius 3,000 km, 1,860 mi ~ 10 ms SOL distance
Single Akka Cluster
Multi Data Center
Multiple Akka Clusters
Multi Data Center
Multiple Akka Clusters
Multi Data Center
akka.cluster {
# Change this to real hostname for production
seed-nodes = ["akka.tcp://ClusterSystem@host1:2552",
"akka.tcp://ClusterSystem@host2:2552"]
# Change this to the Akka data center this node belongs to
multi-data-center.self-data-center = DC-A
}
akka.persistence {
snapshot-store.plugin = "cassandra-snapshot-store"
multi-data-center {
all-data-centers = ["DC-A", “DC-B", “DC-C”]
}
}
Multiple Akka Clusters
Clusters within
Clusters
Multiple Akka Clusters
Clusters within
Clusters
Network Partition
Multiple Akka Clusters
Clusters within
Clusters
Node Failure
Cluster Events
Within Data Center
MemberJoined
MemberUp
MemberExited
MemberRemoved
UnreachableMember
ReachableMember
Cross Data Center
UnreachableMember
ReachableMember
Multiple Akka Clusters
Physical or Logical
“Data Centers”
Clusters within Clusters
Microservice
Microservice
Microservice
Cluster Singleton
One per
Data Center
Cluster Sharding
One per
Data Center
Cluster Sharding
Shard Region
Proxy
Cluster Sharding
ShardRegion
Proxy
val counterProxyDcB: ActorRef =
ClusterSharding(system).startProxy(
typeName = "Counter",
role = None,
dataCenter = Some(“C"),
extractEntityId = extractEntityId,
extractShardId = extractShardId)
Akka Persistence
One per
Data Center
Multi Data Center
Persistence
Commercial Add-on
Multi-DC Persistence
Replicated Entities
Multi-DC Persistence
Concurrent Writes
import akka.persistence.multidc.scaladsl.ReplicatedEntity
final class Post1
extends ReplicatedEntity[BlogCommand, BlogEvent, BlogState] {
override def initialState: BlogState = BlogState.empty
override def commandHandler: CommandHandler =
CommandHandler { (ctx, state, cmd) => ??? }
override def eventHandler(state: BlogState, event: BlogEvent):
BlogState = ???
}
import akka.persistence.multidc.javadsl.CommandHandler;
import akka.persistence.multidc.javadsl.EventHandler;
import akka.persistence.multidc.javadsl.ReplicatedEntity;
final class Post1 extends ReplicatedEntity<BlogCommand, BlogEvent, BlogState> {
@Override
public BlogState initialState() {
return BlogState.EMPTY;
}
@Override
public CommandHandler<BlogCommand, BlogEvent, BlogState> commandHandler() {
throw new RuntimeException("Not implemented yet");
}
@Override
public EventHandler<BlogEvent, BlogState> eventHandler() {
throw new RuntimeException("Not implemented yet");
}
}
import akka.persistence.multidc.javadsl.CommandHandler;
import akka.persistence.multidc.javadsl.EventHandler;
import akka.persistence.multidc.javadsl.ReplicatedEntity;
final class Post1 extends ReplicatedEntity<BlogCommand, BlogEvent, BlogState> {
@Override
public BlogState initialState() {
return BlogState.EMPTY;
}
@Override
public CommandHandler<BlogCommand, BlogEvent, BlogState> commandHandler() {
throw new RuntimeException("Not implemented yet");
}
@Override
public EventHandler<BlogEvent, BlogState> eventHandler() {
throw new RuntimeException("Not implemented yet");
}
}
public CommandHandler<BlogCommand, BlogEvent, BlogState> commandHandler() {
return commandHandlerBuilder(BlogCommand.class)
.matchCommand(AddPost.class, (ctx, state, cmd) -> {
final PostAdded evt = new PostAdded(cmd.postId, cmd.content,
state.contentTimestamp.increase(currentTimeMillis(), getSelfDc()));
return Effect().persist(evt).andThen((state2) ->
// After persist is done additional side effects can be performed
ctx.getSender().tell(new AddPostDone(cmd.postId), getSelf())
);
})
public EventHandler<BlogEvent, BlogState> eventHandler() {
return eventHandlerBuilder(BlogEvent.class)
.matchEvent(PostAdded.class, (state, postAdded) -> {
if (postAdded.timestamp.isAfter(state.contentTimestamp)) {
return state.withContent(postAdded.content, postAdded.timestamp);
} else {
return state;
}
})
Multi-DC Persistence
Replication and
handling of events
Multi-DC Persistence - Last writer wins
// eventHandler is used both when persisting new events, replaying
// events, and consuming replicated events.
override def eventHandler(state: BlogState, event: BlogEvent): BlogState = {
event match {
case PostAdded(postId, content, timestamp) =>
if (timestamp.isAfter(state.contentTimestamp))
state.withContent(content, timestamp)
else state
case BodyChanged(_, newContent, timestamp) =>
if (timestamp.isAfter(state.contentTimestamp))
state.withContent(newContent, timestamp)
else state
case Published(_) =>
state.copy(published = true)
}
}
// the returned event handler is used both when persisting new events, replaying
// events, and consuming replicated events.
@Override
public EventHandler<BlogEvent, BlogState> eventHandler() {
return eventHandlerBuilder(BlogEvent.class)
.matchEvent(PostAdded.class, (state, postAdded) -> {
if (postAdded.timestamp.isAfter(state.contentTimestamp)) {
return state.withContent(postAdded.content, postAdded.timestamp);
} else {
return state;
}
})
.matchEvent(BodyChanged.class, (state, bodyChanged) -> {
if (bodyChanged.timestamp.isAfter(state.contentTimestamp)) {
return state.withContent(bodyChanged.content, bodyChanged.timestamp);
} else {
return state;
}
})
.matchEvent(Published.class, (state, publish) -> state.publish())
.matchAny((state, otherEvent) -> state);
}
override def eventTrigger(
ctx: EventTriggerContext,
state: State, event: Event): Effect[Event, State] = {
event match {
case StepStarted(nr) =>
authority ! RequestApproval(nr)
ctx.actorContext.timers.startPeriodicTimer(ResendTick, ResendTick, resendInterval)
Effect.none
case StepApproved(_, _) =>
if (!state.denied && selfDc == "DC-A"
&& state.isCurrentStepApproved && state.currentStep < maxSteps) {
// approved by all, continue with next step
log.info("Step {} approved by all, continue", state.currentStep)
Effect.persist(StepStarted(state.currentStep + 1))
} else
Effect.none
case _ =>
Effect.none
}
}
@Override
public Effect<Event, State> eventTrigger(EventTriggerContext ctx, State state, Event event) {
if (event instanceof StepStarted) {
StepStarted stepStarted = (StepStarted) event;
authority.tell(new RequestApproval(stepStarted.stepNr), ctx.actorContext().getSelf());
ctx.actorContext().getTimers().startPeriodicTimer(ResendTick.INSTANCE, ResendTick.INSTANCE,
resendInterval);
return Effect().none();
} else if (event instanceof StepApproved) {
StepApproved stepApproved = (StepApproved) event;
if (!state.denied && getSelfDc().equals("DC-A") && state.isCurrentStepApproved() &&
state.currentStep < maxSteps) {
// approved by all, continue with next step
log().info("Step {} approved by all, continue", state.currentStep);
return Effect().persist(new StepStarted(state.currentStep + 1));
} else
return Effect().none();
} else {
return Effect().none();
}
}
Akka Multi-Data Center
Clustering
In summary
Want to learn more about Akka Multi Data Center?
Cluster across multiple data centers
- http://bit.ly/2iY8qLO
Multi-DC Persistence (Akka Commercial Addons)
- http://bit.ly/2zSN9GC
Get your team hooked on
Akka with this comprehensive
introduction by Hugh McKee:
“Akka Revealed”
GO TO VIDEO & SLIDES
Next Steps - Introduce Your Team To Akka
Learn why Akka is so ideal for
distributed systems with a free copy
of Hugh McKee’s O’Reilly eBook:
Designing Reactive Systems: The Role
of Actors in Distributed Architecture
GET A COPY
Next Steps - Learn The “Why” Of Akka Actors
Are you a serious enterprise
looking to run Akka and other
Lightbend technologies in
production? Let us know
when it’s time for a chat!
CONTACT US
Next Steps - Enterprise Add-Ons & Support
Advanced Akka For Architects

More Related Content

PPTX
Rxjs marble-testing
PDF
Architecture Components
PDF
React lecture
PDF
Intro to React | DreamLab Academy
PDF
Intro to Redux | DreamLab Academy #3
PDF
Quick start with React | DreamLab Academy #2
PDF
Manage the Flux of your Web Application: Let's Redux
PDF
Redux "Bad" Practices - A List of 13 Bad Practices and How to Avoid Them
Rxjs marble-testing
Architecture Components
React lecture
Intro to React | DreamLab Academy
Intro to Redux | DreamLab Academy #3
Quick start with React | DreamLab Academy #2
Manage the Flux of your Web Application: Let's Redux
Redux "Bad" Practices - A List of 13 Bad Practices and How to Avoid Them

What's hot (19)

PDF
JS Fest 2019. Glenn Reyes. With great power comes great React hooks!
PDF
React + Redux. Best practices
PPTX
Rxjs swetugg
PDF
Modern Android app library stack
PPTX
Rxjs ngvikings
PDF
Clustering your Application with Hazelcast
PPTX
Introduction to React for jQuery Developers
PDF
React Internals
PPTX
Correcting Common Async/Await Mistakes in .NET
PPTX
Redux training
DOCX
บทที่3
PDF
How to use redux with react hooks in react native application
PDF
Extending Redux in the Server Side
PDF
Architecture Components
PPTX
Firebase ng2 zurich
PPTX
React with Redux
PDF
Data in Motion: Streaming Static Data Efficiently
JS Fest 2019. Glenn Reyes. With great power comes great React hooks!
React + Redux. Best practices
Rxjs swetugg
Modern Android app library stack
Rxjs ngvikings
Clustering your Application with Hazelcast
Introduction to React for jQuery Developers
React Internals
Correcting Common Async/Await Mistakes in .NET
Redux training
บทที่3
How to use redux with react hooks in react native application
Extending Redux in the Server Side
Architecture Components
Firebase ng2 zurich
React with Redux
Data in Motion: Streaming Static Data Efficiently
Ad

Similar to Advanced Akka For Architects (20)

PDF
Using Akka Persistence to build a configuration datastore
PDF
Cassandra as an event sourced journal for big data analytics Cassandra Summit...
PDF
Cassandra as event sourced journal for big data analytics
PDF
Cake Solutions: Cassandra as event sourced journal for big data analytics
PDF
Data in Motion: Streaming Static Data Efficiently 2
PDF
Akka persistence == event sourcing in 30 minutes
PDF
Event Sourcing on AWS Using Akka in Java
PPTX
Actors, akka, streams
PDF
Resilient Applications with Akka Persistence - Scaladays 2014
PDF
DDDing Tools = Akka Persistence
PDF
Akka persistence webinar
PDF
Reactive reference architecture
PPT
Stefano Rocco, Roberto Bentivoglio - Scala in increasingly demanding environm...
PDF
Akka with Scala
PDF
Scala in increasingly demanding environments - DATABIZ
PDF
Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)
PDF
Akka Cluster in Production
PDF
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
PDF
Large volume data analysis on the Typesafe Reactive Platform - Big Data Scala...
PPTX
Setting up a big data platform at kelkoo
Using Akka Persistence to build a configuration datastore
Cassandra as an event sourced journal for big data analytics Cassandra Summit...
Cassandra as event sourced journal for big data analytics
Cake Solutions: Cassandra as event sourced journal for big data analytics
Data in Motion: Streaming Static Data Efficiently 2
Akka persistence == event sourcing in 30 minutes
Event Sourcing on AWS Using Akka in Java
Actors, akka, streams
Resilient Applications with Akka Persistence - Scaladays 2014
DDDing Tools = Akka Persistence
Akka persistence webinar
Reactive reference architecture
Stefano Rocco, Roberto Bentivoglio - Scala in increasingly demanding environm...
Akka with Scala
Scala in increasingly demanding environments - DATABIZ
Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)
Akka Cluster in Production
Lambda Architecture with Spark Streaming, Kafka, Cassandra, Akka, Scala
Large volume data analysis on the Typesafe Reactive Platform - Big Data Scala...
Setting up a big data platform at kelkoo
Ad

More from Lightbend (20)

PDF
IoT 'Megaservices' - High Throughput Microservices with Akka
PDF
How Akka Cluster Works: Actors Living in a Cluster
PDF
The Reactive Principles: Eight Tenets For Building Cloud Native Applications
PDF
Putting the 'I' in IoT - Building Digital Twins with Akka Microservices
PDF
Akka at Enterprise Scale: Performance Tuning Distributed Applications
PDF
Digital Transformation with Kubernetes, Containers, and Microservices
PDF
Detecting Real-Time Financial Fraud with Cloudflow on Kubernetes
PDF
Cloudstate - Towards Stateful Serverless
PDF
Digital Transformation from Monoliths to Microservices to Serverless and Beyond
PDF
Akka Anti-Patterns, Goodbye: Six Features of Akka 2.6
PPTX
Lessons From HPE: From Batch To Streaming For 20 Billion Sensors With Lightbe...
PDF
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
PDF
Microservices, Kubernetes, and Application Modernization Done Right
PDF
Full Stack Reactive In Practice
PDF
Akka and Kubernetes: A Symbiotic Love Story
PPTX
Scala 3 Is Coming: Martin Odersky Shares What To Know
PDF
Migrating From Java EE To Cloud-Native Reactive Systems
PDF
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
PDF
Designing Events-First Microservices For A Cloud Native World
PDF
Scala Security: Eliminate 200+ Code-Level Threats With Fortify SCA For Scala
IoT 'Megaservices' - High Throughput Microservices with Akka
How Akka Cluster Works: Actors Living in a Cluster
The Reactive Principles: Eight Tenets For Building Cloud Native Applications
Putting the 'I' in IoT - Building Digital Twins with Akka Microservices
Akka at Enterprise Scale: Performance Tuning Distributed Applications
Digital Transformation with Kubernetes, Containers, and Microservices
Detecting Real-Time Financial Fraud with Cloudflow on Kubernetes
Cloudstate - Towards Stateful Serverless
Digital Transformation from Monoliths to Microservices to Serverless and Beyond
Akka Anti-Patterns, Goodbye: Six Features of Akka 2.6
Lessons From HPE: From Batch To Streaming For 20 Billion Sensors With Lightbe...
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
Microservices, Kubernetes, and Application Modernization Done Right
Full Stack Reactive In Practice
Akka and Kubernetes: A Symbiotic Love Story
Scala 3 Is Coming: Martin Odersky Shares What To Know
Migrating From Java EE To Cloud-Native Reactive Systems
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
Designing Events-First Microservices For A Cloud Native World
Scala Security: Eliminate 200+ Code-Level Threats With Fortify SCA For Scala

Recently uploaded (20)

PDF
Digital Strategies for Manufacturing Companies
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Nekopoi APK 2025 free lastest update
PPTX
history of c programming in notes for students .pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Transform Your Business with a Software ERP System
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Digital Strategies for Manufacturing Companies
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Wondershare Filmora 15 Crack With Activation Key [2025
Reimagine Home Health with the Power of Agentic AI​
Nekopoi APK 2025 free lastest update
history of c programming in notes for students .pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Softaken Excel to vCard Converter Software.pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
How to Choose the Right IT Partner for Your Business in Malaysia
Transform Your Business with a Software ERP System
Understanding Forklifts - TECH EHS Solution
Upgrade and Innovation Strategies for SAP ERP Customers
Why Generative AI is the Future of Content, Code & Creativity?
Design an Analysis of Algorithms II-SECS-1021-03
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus

Advanced Akka For Architects

  • 2. Akka Multi-Data Center Clustering Cluster Singletons Cluster Sharding Persistence
  • 5. Akka Cluster Single Data Center Split Brain Unresponsive Member
  • 6. Speed of light 300 km/ms, 186 mi/ms Small circle radius 3,000 km, 1,860 mi ~ 10 ms SOL distance
  • 9. Multiple Akka Clusters Multi Data Center akka.cluster { # Change this to real hostname for production seed-nodes = ["akka.tcp://ClusterSystem@host1:2552", "akka.tcp://ClusterSystem@host2:2552"] # Change this to the Akka data center this node belongs to multi-data-center.self-data-center = DC-A } akka.persistence { snapshot-store.plugin = "cassandra-snapshot-store" multi-data-center { all-data-centers = ["DC-A", “DC-B", “DC-C”] } }
  • 11. Multiple Akka Clusters Clusters within Clusters Network Partition
  • 12. Multiple Akka Clusters Clusters within Clusters Node Failure
  • 13. Cluster Events Within Data Center MemberJoined MemberUp MemberExited MemberRemoved UnreachableMember ReachableMember Cross Data Center UnreachableMember ReachableMember
  • 14. Multiple Akka Clusters Physical or Logical “Data Centers” Clusters within Clusters Microservice Microservice Microservice
  • 18. Cluster Sharding ShardRegion Proxy val counterProxyDcB: ActorRef = ClusterSharding(system).startProxy( typeName = "Counter", role = None, dataCenter = Some(“C"), extractEntityId = extractEntityId, extractShardId = extractShardId)
  • 23. import akka.persistence.multidc.scaladsl.ReplicatedEntity final class Post1 extends ReplicatedEntity[BlogCommand, BlogEvent, BlogState] { override def initialState: BlogState = BlogState.empty override def commandHandler: CommandHandler = CommandHandler { (ctx, state, cmd) => ??? } override def eventHandler(state: BlogState, event: BlogEvent): BlogState = ??? }
  • 24. import akka.persistence.multidc.javadsl.CommandHandler; import akka.persistence.multidc.javadsl.EventHandler; import akka.persistence.multidc.javadsl.ReplicatedEntity; final class Post1 extends ReplicatedEntity<BlogCommand, BlogEvent, BlogState> { @Override public BlogState initialState() { return BlogState.EMPTY; } @Override public CommandHandler<BlogCommand, BlogEvent, BlogState> commandHandler() { throw new RuntimeException("Not implemented yet"); } @Override public EventHandler<BlogEvent, BlogState> eventHandler() { throw new RuntimeException("Not implemented yet"); } }
  • 25. import akka.persistence.multidc.javadsl.CommandHandler; import akka.persistence.multidc.javadsl.EventHandler; import akka.persistence.multidc.javadsl.ReplicatedEntity; final class Post1 extends ReplicatedEntity<BlogCommand, BlogEvent, BlogState> { @Override public BlogState initialState() { return BlogState.EMPTY; } @Override public CommandHandler<BlogCommand, BlogEvent, BlogState> commandHandler() { throw new RuntimeException("Not implemented yet"); } @Override public EventHandler<BlogEvent, BlogState> eventHandler() { throw new RuntimeException("Not implemented yet"); } }
  • 26. public CommandHandler<BlogCommand, BlogEvent, BlogState> commandHandler() { return commandHandlerBuilder(BlogCommand.class) .matchCommand(AddPost.class, (ctx, state, cmd) -> { final PostAdded evt = new PostAdded(cmd.postId, cmd.content, state.contentTimestamp.increase(currentTimeMillis(), getSelfDc())); return Effect().persist(evt).andThen((state2) -> // After persist is done additional side effects can be performed ctx.getSender().tell(new AddPostDone(cmd.postId), getSelf()) ); }) public EventHandler<BlogEvent, BlogState> eventHandler() { return eventHandlerBuilder(BlogEvent.class) .matchEvent(PostAdded.class, (state, postAdded) -> { if (postAdded.timestamp.isAfter(state.contentTimestamp)) { return state.withContent(postAdded.content, postAdded.timestamp); } else { return state; } })
  • 28. Multi-DC Persistence - Last writer wins
  • 29. // eventHandler is used both when persisting new events, replaying // events, and consuming replicated events. override def eventHandler(state: BlogState, event: BlogEvent): BlogState = { event match { case PostAdded(postId, content, timestamp) => if (timestamp.isAfter(state.contentTimestamp)) state.withContent(content, timestamp) else state case BodyChanged(_, newContent, timestamp) => if (timestamp.isAfter(state.contentTimestamp)) state.withContent(newContent, timestamp) else state case Published(_) => state.copy(published = true) } }
  • 30. // the returned event handler is used both when persisting new events, replaying // events, and consuming replicated events. @Override public EventHandler<BlogEvent, BlogState> eventHandler() { return eventHandlerBuilder(BlogEvent.class) .matchEvent(PostAdded.class, (state, postAdded) -> { if (postAdded.timestamp.isAfter(state.contentTimestamp)) { return state.withContent(postAdded.content, postAdded.timestamp); } else { return state; } }) .matchEvent(BodyChanged.class, (state, bodyChanged) -> { if (bodyChanged.timestamp.isAfter(state.contentTimestamp)) { return state.withContent(bodyChanged.content, bodyChanged.timestamp); } else { return state; } }) .matchEvent(Published.class, (state, publish) -> state.publish()) .matchAny((state, otherEvent) -> state); }
  • 31. override def eventTrigger( ctx: EventTriggerContext, state: State, event: Event): Effect[Event, State] = { event match { case StepStarted(nr) => authority ! RequestApproval(nr) ctx.actorContext.timers.startPeriodicTimer(ResendTick, ResendTick, resendInterval) Effect.none case StepApproved(_, _) => if (!state.denied && selfDc == "DC-A" && state.isCurrentStepApproved && state.currentStep < maxSteps) { // approved by all, continue with next step log.info("Step {} approved by all, continue", state.currentStep) Effect.persist(StepStarted(state.currentStep + 1)) } else Effect.none case _ => Effect.none } }
  • 32. @Override public Effect<Event, State> eventTrigger(EventTriggerContext ctx, State state, Event event) { if (event instanceof StepStarted) { StepStarted stepStarted = (StepStarted) event; authority.tell(new RequestApproval(stepStarted.stepNr), ctx.actorContext().getSelf()); ctx.actorContext().getTimers().startPeriodicTimer(ResendTick.INSTANCE, ResendTick.INSTANCE, resendInterval); return Effect().none(); } else if (event instanceof StepApproved) { StepApproved stepApproved = (StepApproved) event; if (!state.denied && getSelfDc().equals("DC-A") && state.isCurrentStepApproved() && state.currentStep < maxSteps) { // approved by all, continue with next step log().info("Step {} approved by all, continue", state.currentStep); return Effect().persist(new StepStarted(state.currentStep + 1)); } else return Effect().none(); } else { return Effect().none(); } }
  • 34. Want to learn more about Akka Multi Data Center? Cluster across multiple data centers - http://bit.ly/2iY8qLO Multi-DC Persistence (Akka Commercial Addons) - http://bit.ly/2zSN9GC
  • 35. Get your team hooked on Akka with this comprehensive introduction by Hugh McKee: “Akka Revealed” GO TO VIDEO & SLIDES Next Steps - Introduce Your Team To Akka
  • 36. Learn why Akka is so ideal for distributed systems with a free copy of Hugh McKee’s O’Reilly eBook: Designing Reactive Systems: The Role of Actors in Distributed Architecture GET A COPY Next Steps - Learn The “Why” Of Akka Actors
  • 37. Are you a serious enterprise looking to run Akka and other Lightbend technologies in production? Let us know when it’s time for a chat! CONTACT US Next Steps - Enterprise Add-Ons & Support