SlideShare a Scribd company logo
1 of 47
Real-time Distributed
Applications with Akka.NET,
Kubernetes, and .NET Core
By Aaron Stannard,
CEO, Petabridge
Real-time Apps Becoming
Common
Consumer
• Video games
• Social apps
• Chat and remote work
• Personal data monitoring
(credit, payables, health)
• Collaboration & sharing
Enterprise
• Industrial IOT
• Fleet and vehicle tracking
• Workflow processing
• Fraud & risk analysis
• Dynamic pricing
• Healthcare
What Makes an App “Real-
time?”
Fastest Response Time?
Real-time Application
Challenges
• You’re responsible for the consistency of
your state.
• State has to be moved between nodes
during deployments, scaling, and recovery
from failures.
• Deployment tools need to allow for
movement of state at deploy-time.
Roadmap
Stateful Application
Programming
Using Akka.NET Actors to
Manage & Distribute State
What is an Actor?
What is an Actor?
IActorRef – Actor References
Actors Process One Message at
a Time
Processes Usually Contain
Many Actors
Child-per-Entity Pattern
Actors Simplify State
Management
• Actors are serial message processors –
state can’t be modified concurrently.
• State is always shared via passing
immutable messages, thus no side effects.
• Actors can be easily partitioned into
hierarchies of entities.
• IActorRef, the actor reference, is location
transparent. Messages can be shared
across network boundaries automatically.
State Distribution, Scaling,
and Fault Tolerance
Akka.Cluster, Akka.Persistence,
and Akka.Cluster.Sharding
Highly Available State with
Akka.Cluster
Each node is its
own ActorSystem
What Akka.Cluster Does
What is a "Cluster?"
State Distribution Techniques
• Consistent hash routing
– All events with same entity ID (hash range)
end up in same server
• Akka.Cluster.Sharding
– Uses consistent hashing, but smarter
handling of partition hand-offs
• Writable Replication
(Akka.DistributedData)
– Have state written to multiple places in
network at same time
Consistency Strategy:
guarantee maximum of 1
instance of entity actor across
entire cluster
Consistent Hash Partitioning
State has to be Moved
Akka.Persistence: State
Durability
Akka.Persistence: State
Recovery
Moving State via
Akka.Persistence
Doing it in Production with K8s
Why Kubernetes?
• Ubiquitous – runs on-
premise, on the cloud,
etc…
• Robust deployment
models – including
handling for stateful
apps.
• Rich ecosystem.
Why Azure Kubernetes
Service?
• Takes only a few
minutes to setup.
• Integrates well with
Azure DevOps.
• Great environment for
learning K8s.
Kubernetes Core Concepts
• K8s is an “orchestration” platform – networks
multiple container hosts together into unified
abstraction.
• Applications are deployed to the K8s cluster –
K8s then orchestrates the instantiation of
containers across hosts.
• Applications define via configuration:
– Which parts can be exposed publicly and how.
– How different parts of application can be deployed and
managed.
Kubernetes Core Concepts
K8s Infrastructure on Azure AKS
K8s Key Terms (for
Akka.Cluster)
• “Pod” – represents a single application unit
of execution. Consists of 1 or more Docker
container.
• “Stateful set” – a deployment group of
identical pods working together as a
stateful service.
• “Service” – defines how a stateful set
exposes itself to other services within K8s
and Akka.NET cluster.
Akka.Cluster K8s Methodology
• All applications are deployed as stateful
sets
– State is fundamental to how Akka.Cluster
works
• All internal Akka.Cluster functionality is
exposed as “ClusterIp” services
• External / public functionality can exposed
as a “LoadBalancer” service or otherwise
• Petabridge.Cmd used for node exits
• Deployments / rollbacks performed by
Akka.Cluster Continuous
Deployment Process
Learn it Step by Step
https://petabridge.com/cluster

More Related Content

More from petabridge

We're all distributed systems devs now: a crash course in distributed program...
We're all distributed systems devs now: a crash course in distributed program...We're all distributed systems devs now: a crash course in distributed program...
We're all distributed systems devs now: a crash course in distributed program...petabridge
 
The New .NET Enterprise Stack
The New .NET Enterprise StackThe New .NET Enterprise Stack
The New .NET Enterprise Stackpetabridge
 
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET ActorsFull-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actorspetabridge
 
OSS From the Outside In - A Personal Journey With Akka.NET
OSS From the Outside In - A Personal Journey With Akka.NETOSS From the Outside In - A Personal Journey With Akka.NET
OSS From the Outside In - A Personal Journey With Akka.NETpetabridge
 
Concurrency, Without the Pain: An Intro to Akka.NET @ Bay.NET
Concurrency, Without the Pain: An Intro to Akka.NET @ Bay.NETConcurrency, Without the Pain: An Intro to Akka.NET @ Bay.NET
Concurrency, Without the Pain: An Intro to Akka.NET @ Bay.NETpetabridge
 
Syncromatics Akka.NET Case Study
Syncromatics Akka.NET Case StudySyncromatics Akka.NET Case Study
Syncromatics Akka.NET Case Studypetabridge
 
Akka.NET @ London.NET
Akka.NET @ London.NETAkka.NET @ London.NET
Akka.NET @ London.NETpetabridge
 
Akka.NET Fundamentals — #ProgNet15
Akka.NET Fundamentals — #ProgNet15Akka.NET Fundamentals — #ProgNet15
Akka.NET Fundamentals — #ProgNet15petabridge
 
Slides - Intro to Akka.Cluster
Slides - Intro to Akka.ClusterSlides - Intro to Akka.Cluster
Slides - Intro to Akka.Clusterpetabridge
 
Akka.NET: Concurrency Without the Pain (Intro to the Actor Model)
Akka.NET: Concurrency Without the Pain (Intro to the Actor Model)Akka.NET: Concurrency Without the Pain (Intro to the Actor Model)
Akka.NET: Concurrency Without the Pain (Intro to the Actor Model)petabridge
 
Distributed Transactions in Akka.NET
Distributed Transactions in Akka.NETDistributed Transactions in Akka.NET
Distributed Transactions in Akka.NETpetabridge
 
Streaming ETL With Akka.NET
Streaming ETL With Akka.NETStreaming ETL With Akka.NET
Streaming ETL With Akka.NETpetabridge
 
2 12-2015 - Cassandra Day LA - Using DataStax Enterprise and Actor Systems fo...
2 12-2015 - Cassandra Day LA - Using DataStax Enterprise and Actor Systems fo...2 12-2015 - Cassandra Day LA - Using DataStax Enterprise and Actor Systems fo...
2 12-2015 - Cassandra Day LA - Using DataStax Enterprise and Actor Systems fo...petabridge
 

More from petabridge (13)

We're all distributed systems devs now: a crash course in distributed program...
We're all distributed systems devs now: a crash course in distributed program...We're all distributed systems devs now: a crash course in distributed program...
We're all distributed systems devs now: a crash course in distributed program...
 
The New .NET Enterprise Stack
The New .NET Enterprise StackThe New .NET Enterprise Stack
The New .NET Enterprise Stack
 
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET ActorsFull-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
 
OSS From the Outside In - A Personal Journey With Akka.NET
OSS From the Outside In - A Personal Journey With Akka.NETOSS From the Outside In - A Personal Journey With Akka.NET
OSS From the Outside In - A Personal Journey With Akka.NET
 
Concurrency, Without the Pain: An Intro to Akka.NET @ Bay.NET
Concurrency, Without the Pain: An Intro to Akka.NET @ Bay.NETConcurrency, Without the Pain: An Intro to Akka.NET @ Bay.NET
Concurrency, Without the Pain: An Intro to Akka.NET @ Bay.NET
 
Syncromatics Akka.NET Case Study
Syncromatics Akka.NET Case StudySyncromatics Akka.NET Case Study
Syncromatics Akka.NET Case Study
 
Akka.NET @ London.NET
Akka.NET @ London.NETAkka.NET @ London.NET
Akka.NET @ London.NET
 
Akka.NET Fundamentals — #ProgNet15
Akka.NET Fundamentals — #ProgNet15Akka.NET Fundamentals — #ProgNet15
Akka.NET Fundamentals — #ProgNet15
 
Slides - Intro to Akka.Cluster
Slides - Intro to Akka.ClusterSlides - Intro to Akka.Cluster
Slides - Intro to Akka.Cluster
 
Akka.NET: Concurrency Without the Pain (Intro to the Actor Model)
Akka.NET: Concurrency Without the Pain (Intro to the Actor Model)Akka.NET: Concurrency Without the Pain (Intro to the Actor Model)
Akka.NET: Concurrency Without the Pain (Intro to the Actor Model)
 
Distributed Transactions in Akka.NET
Distributed Transactions in Akka.NETDistributed Transactions in Akka.NET
Distributed Transactions in Akka.NET
 
Streaming ETL With Akka.NET
Streaming ETL With Akka.NETStreaming ETL With Akka.NET
Streaming ETL With Akka.NET
 
2 12-2015 - Cassandra Day LA - Using DataStax Enterprise and Actor Systems fo...
2 12-2015 - Cassandra Day LA - Using DataStax Enterprise and Actor Systems fo...2 12-2015 - Cassandra Day LA - Using DataStax Enterprise and Actor Systems fo...
2 12-2015 - Cassandra Day LA - Using DataStax Enterprise and Actor Systems fo...
 

Recently uploaded

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
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
 

Recently uploaded (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
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.
 

Building Real-time Distributed Applications with Akka.NET, Kubernetes. and .NET Core