SlideShare a Scribd company logo
Full-Stack, Message-Oriented
Programming With Akka.NET Actors
Andrew Skotzko
Co-founder, Petabridge
Contributor, Akka.NET
@askotzko
My Wish For You
Messaging
MESSAGE
ALL THE THINGS
Concurrency.
Why should we care?
1973–2005
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
What the hell are you
talking about?
Concurrency
...time to embrace it.
Why is this hard?
Writing Multithreaded Code
→ Make classes/functions
→ Find places we can do multiple things at once
→ Queue work onto new thread / threadpool
→ Use synchronization mechanisms (protect shared
mem)
→ Finish work on one thread; consume on another
Shared State Programming Sucks
→ Synchronizing shared state = pit of doom
→ Coordinating work btw. threads
→ Debugging multi-threaded code...yay!
→ Third-party libraries
→ ...Writing great thread-safe code is hard.
Random?
1. .NET 4.0: TPL (2010)
2. .NET 4.5: async/await (2012)
There. must. be. a. better. way.
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
What is the actor model?
1973
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Everything is an actor.
Okay.. so what is an
actor?
3 Core Abilities
1. Send messages
2. Create other actors
3. Change behavior
Messages
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Sending a Message
myActorRef.Tell("this is my message");
Messages
→ Must be immutable
→ Processed serially
Create Other Actors
Akka.NET Actor Hierarchy
Change Behavior
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Location Transparency
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Actors Live at Unique Addresses
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Which means...
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Without
Rewriting Your Code
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
ReactiveManifesto.org
What is
Akka.NET?
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
This Is An Akka.NET Actor
public class FooActor : UntypedActor
{
public FooActor()
{
// message handling code goes here...
}
}
These Are Messages
// just POCOs
public class Hello {}
public class NewOrder {
public NewOrder (string name)
{
Username = name;
UserId = Guid.NewGuid ();
}
public Guid UserId { get; private set;}
public string Username {get; private set;}
}
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Where can I use this?
→ Analytics systems
→ Marketing automation
→ Multi-player games
→ Device / IoT tracking
→ Alerting & monitoring systems
→ Recommendation engines
→ Dynamic pricing
→ Scalable microservices
→ Reactive UI
Wait... How Can This Be
Massively Concurrent?
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Message Buses & Actors
Akka.NET & NServiceBus
How Are They Different?
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Default Durability
How Do They
Go Together?
Akka.NET is a great
consumer/producer
for NServiceBus
Shared Core Beliefs
async by
default
p2p mesh
Queued
Messages
Extensible
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Messaging
Patterns
Pub-Sub
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
public class PubSubActor : ReceiveActor {
protected HashSet<IActorRef> Subscribers = new HashSet<IActorRef>();
public PubSubActor()
{
// add new subscriber
Receive<Subscribe>(subscribe => Subscribers.Add(subscribe.Subscriber));
// remove subscriber
Receive<Unsubscribe>(unsubscribe => Subscribers.Remove(unsubscribe.Subscriber));
// publish status to subscribers
Receive<JobStats>(stats =>
{
TotalStats = TotalStats.Merge(stats);
PublishStatus();
});
}
// push latest status into subscribers
private void PublishStatus()
{
foreach (var sub in Subscribers)
sub.Tell(RunningStatus);
}
}
What's Akka.NET Give
YOU?
Reactive Services
Speed!
Location Transparency
Intuitive code
Lower DB Contention
Efficient Use of Hardware
One Case Study
→ 85% reduction in code base
→ 60% reduction in hardware needed
→ "Code just lets us focus on the problem"
Benefits of Combination
Location transparency
+
Durability
+
Easy, thread-safe scale out
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
THANK YOU!
Email: andrew@petabridge.com
Twitterz:
@askotzko
@Petabridge

More Related Content

PDF
Reactive applications with Akka.Net - DDD East Anglia 2015
PPTX
We're all distributed systems devs now: a crash course in distributed program...
PPTX
Creating scalable message driven solutions akkadotnet
PDF
Building applications with akka.net
PDF
Reactive Programming in .Net - actorbased computing with Akka.Net
PPTX
Reactive Development: Commands, Actors and Events. Oh My!!
PDF
Actor model in .NET - Akka.NET
PPTX
Discovering the Service Fabric's actor model
Reactive applications with Akka.Net - DDD East Anglia 2015
We're all distributed systems devs now: a crash course in distributed program...
Creating scalable message driven solutions akkadotnet
Building applications with akka.net
Reactive Programming in .Net - actorbased computing with Akka.Net
Reactive Development: Commands, Actors and Events. Oh My!!
Actor model in .NET - Akka.NET
Discovering the Service Fabric's actor model

What's hot (20)

PPTX
Discovering the Service Fabric's actor model
PDF
Actor model : A Different Concurrency Approach
KEY
Introduction to Actor Model and Akka
PDF
Introduction to the Actor Model
PDF
Introducing Akka
PDF
Actor Patterns and NATS - Boulder Meetup
PPTX
Akka framework
PPTX
Building Micro-Services with Scala
PDF
Threading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
PDF
Workflow as code with Azure Durable Functions
PDF
Building and running Spring Cloud-based microservices on AWS ECS
PPTX
Booting your Microservices Architecture with Spring & Netflix
PDF
Continuous Delivery in Java
PPTX
Akka Fundamentals
PDF
IoT in salsa Serverless
PDF
Microservices: 5 things I wish I'd known - Vincent Kok - Codemotion Amsterdam...
PDF
Empower every Azure Function to achieve more!!
PPTX
Akka.Net Overview
PPT
Ado.Net Data Services (Astoria)
PDF
IoT in salsa serverless
Discovering the Service Fabric's actor model
Actor model : A Different Concurrency Approach
Introduction to Actor Model and Akka
Introduction to the Actor Model
Introducing Akka
Actor Patterns and NATS - Boulder Meetup
Akka framework
Building Micro-Services with Scala
Threading Made Easy! A Busy Developer’s Guide to Kotlin Coroutines
Workflow as code with Azure Durable Functions
Building and running Spring Cloud-based microservices on AWS ECS
Booting your Microservices Architecture with Spring & Netflix
Continuous Delivery in Java
Akka Fundamentals
IoT in salsa Serverless
Microservices: 5 things I wish I'd known - Vincent Kok - Codemotion Amsterdam...
Empower every Azure Function to achieve more!!
Akka.Net Overview
Ado.Net Data Services (Astoria)
IoT in salsa serverless
Ad

Viewers also liked (20)

PPSX
Lecture 1 an introduction to data structure
PPTX
iOS App Development with F# and Xamarin
PPTX
Consuming Data with F# Type Providers
PPTX
Concurrent Applications with F# Agents
PPTX
Getting Started with F#
PDF
C applications
PPTX
Seattle kafka meetup nov 2015 published siphon
PPTX
History of F#, and the ML family of languages.
PPTX
3. Stack - Data Structures using C++ by Varsha Patil
PPTX
Stack Data structure
PPTX
CQRS Evolved - CQRS + Akka.NET
PPTX
Patterns and practices for real-world event-driven microservices
PDF
Queue as data_structure
PPT
Introduction of data structure
PPT
Queue Data Structure
PDF
Akka persistence == event sourcing in 30 minutes
PPT
Queue data structure
PPT
Lecture 1 data structures and algorithms
PPT
DATA STRUCTURES
PPT
Notes DATA STRUCTURE - queue
Lecture 1 an introduction to data structure
iOS App Development with F# and Xamarin
Consuming Data with F# Type Providers
Concurrent Applications with F# Agents
Getting Started with F#
C applications
Seattle kafka meetup nov 2015 published siphon
History of F#, and the ML family of languages.
3. Stack - Data Structures using C++ by Varsha Patil
Stack Data structure
CQRS Evolved - CQRS + Akka.NET
Patterns and practices for real-world event-driven microservices
Queue as data_structure
Introduction of data structure
Queue Data Structure
Akka persistence == event sourcing in 30 minutes
Queue data structure
Lecture 1 data structures and algorithms
DATA STRUCTURES
Notes DATA STRUCTURE - queue
Ad

Similar to Full-Stack, Message-oriented Programming w/ Akka.NET Actors (20)

PPTX
Akka.Net Ottawa .NET User Group Meetup
PPTX
DotNext 2020 - When and How to Use the Actor Model and Akka.NET
PDF
Introduction to concurrent programming with akka actors
PDF
Introduction to concurrent programming with Akka actors
PDF
Async Messaging in CQRS: Part 2 - Akka.NET
PDF
Akka.NET @ London.NET
PPTX
Akka Actors
PDF
Akka.NET Fundamentals — #ProgNet15
PPTX
Akka-demy (a.k.a. How to build stateful distributed systems) I/II
PPT
Akka.Net & .Net Core - .Net Inside 4° MeetUp
PDF
Akka.NET: Concurrency Without the Pain (Intro to the Actor Model)
PDF
Actor-based concurrency in a modern Java Enterprise
PDF
Build Cloud Applications with Akka and Heroku
PPSX
Moderne backends mit dem aktor programmiermodell
PPTX
Introduction to actor model with examples on Akka.NET
PPTX
Oop2011 actor presentation_stal
PDF
Building Stateful Microservices With Akka
PPTX
Akka for big data developers
PDF
Online game server on Akka.NET (NDC2016)
PDF
Akka - A Brief Intro
Akka.Net Ottawa .NET User Group Meetup
DotNext 2020 - When and How to Use the Actor Model and Akka.NET
Introduction to concurrent programming with akka actors
Introduction to concurrent programming with Akka actors
Async Messaging in CQRS: Part 2 - Akka.NET
Akka.NET @ London.NET
Akka Actors
Akka.NET Fundamentals — #ProgNet15
Akka-demy (a.k.a. How to build stateful distributed systems) I/II
Akka.Net & .Net Core - .Net Inside 4° MeetUp
Akka.NET: Concurrency Without the Pain (Intro to the Actor Model)
Actor-based concurrency in a modern Java Enterprise
Build Cloud Applications with Akka and Heroku
Moderne backends mit dem aktor programmiermodell
Introduction to actor model with examples on Akka.NET
Oop2011 actor presentation_stal
Building Stateful Microservices With Akka
Akka for big data developers
Online game server on Akka.NET (NDC2016)
Akka - A Brief Intro

More from petabridge (17)

PPTX
Diagnosing Production Akka.NET Problems with OpenTelemetry.pptx
PPTX
Leveraging AI for Software Developer Productivity.pptx
PPTX
NET Systems Programming Learned the Hard Way.pptx
PPTX
.NET Conf 2019 When and How to Use the Actor Model: an Introduction to Akka...
PPTX
Continuous Deployment with Akka.Cluster and Kubernetes (Akka.NET)
PPTX
Introduction to Distributed Tracing
PPTX
Akka.NET: Concurrency without the Pain
PPTX
Introduction to Akka.NET and Akka.Cluster
PPTX
Automed .NET Performance Testing with NBench
PPTX
The New .NET Enterprise Stack
PDF
OSS From the Outside In - A Personal Journey With Akka.NET
PDF
Concurrency, Without the Pain: An Intro to Akka.NET @ Bay.NET
PDF
Syncromatics Akka.NET Case Study
PDF
Slides - Intro to Akka.Cluster
PDF
Distributed Transactions in Akka.NET
PDF
Streaming ETL With Akka.NET
PPTX
2 12-2015 - Cassandra Day LA - Using DataStax Enterprise and Actor Systems fo...
Diagnosing Production Akka.NET Problems with OpenTelemetry.pptx
Leveraging AI for Software Developer Productivity.pptx
NET Systems Programming Learned the Hard Way.pptx
.NET Conf 2019 When and How to Use the Actor Model: an Introduction to Akka...
Continuous Deployment with Akka.Cluster and Kubernetes (Akka.NET)
Introduction to Distributed Tracing
Akka.NET: Concurrency without the Pain
Introduction to Akka.NET and Akka.Cluster
Automed .NET Performance Testing with NBench
The New .NET Enterprise Stack
OSS From the Outside In - A Personal Journey With Akka.NET
Concurrency, Without the Pain: An Intro to Akka.NET @ Bay.NET
Syncromatics Akka.NET Case Study
Slides - Intro to Akka.Cluster
Distributed Transactions in Akka.NET
Streaming ETL With Akka.NET
2 12-2015 - Cassandra Day LA - Using DataStax Enterprise and Actor Systems fo...

Recently uploaded (20)

PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Nekopoi APK 2025 free lastest update
PPTX
ai tools demonstartion for schools and inter college
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
System and Network Administration Chapter 2
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
medical staffing services at VALiNTRY
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Understanding Forklifts - TECH EHS Solution
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Which alternative to Crystal Reports is best for small or large businesses.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Nekopoi APK 2025 free lastest update
ai tools demonstartion for schools and inter college
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
System and Network Administration Chapter 2
Internet Downloader Manager (IDM) Crack 6.42 Build 41
medical staffing services at VALiNTRY
Reimagine Home Health with the Power of Agentic AI​
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
How to Migrate SBCGlobal Email to Yahoo Easily
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
How Creative Agencies Leverage Project Management Software.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Understanding Forklifts - TECH EHS Solution

Full-Stack, Message-oriented Programming w/ Akka.NET Actors