SlideShare a Scribd company logo
Technical Overview
[Client]
[Date]
Why Actor-Based Systems Are
The Best For Microservices
Yaroslav Tkachenko
Senior Software Engineer, Lead at Mobify
@sap1ens
Why Actor-Based Systems Are The Best For Microservices
Monolith Microservices
“Easy” way – HTTP / RPC API
POST /foo
service-x.example.com
§ Destination – where to send request?
§ Service discovery
§ Tight coupling
§ Time – expect reply right away?
§ Failure – always expect success?
§ Retries and failure handling
§ Back-pressure / circuit breakers
But wait…
How about Netflix, Twitter, etc.?
Yes, it’s possible to build reliable systems
with HTTP/RPC APIs! But:
§ Are you ready to invest a lot of resources
§ Do you really need it?
Reactive Revealed: Resiliency, Failures vs Errors, Isolation,
Delegation and Replication by Jonas Boner
Surviving Micro-services by Richard Rodger
So, let’s try to:
§ Use message queues for communication
§ Use actors as publishers and subscribers
- Send …
- Receive …
Another way - Messaging
- Send …
- Receive …
queue.events
Enterprise Service Bus?
Kafka Connect
So, why message queues now?
§ Not ESBs!
§ Lightweight pub/sub instead
§ Low coupling
§ Promotes eventual consistency
§ Highly scalable and available
§ Built-in discovery, retries, tracing, etc.
§ Serverless!
By the way, I don’t think that ALL your communication should
happen through the message queues. But it’s something that
you should strive for!
External request
(HTTP)
External request
(HTTP)Write
Always
asynchronous
using messages
Read
Alternatives to
blocking call:
- Caching
- Denormalization
- Different routing
Example: integrations
“Macroservices” External APIs
“Macroservices” External APIs
New user!
“Macroservices” External APIs
New user!
User created
EIP was published in 2003 and it contains 65 patterns
Enterprise Integration Patterns
Patterns from the example:
§ Publish – Subscribe Channel (“Broadcast”)
§ Durable Subscriber
§ Idempotent Receiver
So, have I convinced you that messaging patterns are great?
But why actors? I can just use a message queue and a bunch
of consumers/producers
It’s all about semantics
An actor is a computational entity that, in response to a
message it receives, can concurrently:
• send a finite number of messages to other actors
• create a finite number of new actors
• designate the behavior to be used for the next message it
receives.
Actors are known for concurrency, but let’s focus on message
passing instead
Actors in Scala/Akka and Erlang
Actor ActorMessage
Actor ActorMessage queue
ActiveMQ message listener in Java (just kidding)
ActiveMQ message listener in Java (zoom-in)
Actor-based (Akka) message listener in Scala + Camel
Receiver Handler
onMessage(Message)
???
Receiver ActorSender Actor
Mailbox
Message
VS
I thought of objects being like biological cells and/or individual
computers on a network, only able to communicate with
messages...
OOP to me means only messaging, local retention and
protection and hiding of state-process, and extreme late-
binding of all things.
Alan Kay, one of the fathers of the idea
of object-oriented programming
Actors over message handlers:
• Semantically natural message processing that ”feels right”
• No difference between local and remote communication
• Straightforward state management
• Mailbox, routing and back-pressure
• Built-in failure handling (supervisors)
Actors in general:
• Simple and high-level abstraction for distribution,
concurrency and parallelism
• Asynchronous, non-blocking and highly performant
message-driven programming model
• Very lightweight message-driven processes
Why Actor-Based Systems Are The Best For Microservices
Instead of a summary:
Everything is a trade-off!
Questions?
sap1ens.com
@sap1ens

More Related Content

PDF
Building Stateful Microservices With Akka
PPTX
Building Eventing Systems for Microservice Architecture
PPTX
Akka Microservices Architecture And Design
PPTX
Why actor-based systems are the best for microservices
PDF
Akka Revealed: A JVM Architect's Journey From Resilient Actors To Scalable Cl...
PDF
Introduction to akka actors with java 8
PDF
Understanding Akka Streams, Back Pressure, and Asynchronous Architectures
PDF
Akka Streams - From Zero to Kafka
Building Stateful Microservices With Akka
Building Eventing Systems for Microservice Architecture
Akka Microservices Architecture And Design
Why actor-based systems are the best for microservices
Akka Revealed: A JVM Architect's Journey From Resilient Actors To Scalable Cl...
Introduction to akka actors with java 8
Understanding Akka Streams, Back Pressure, and Asynchronous Architectures
Akka Streams - From Zero to Kafka

What's hot (20)

PDF
Build Real-Time Streaming ETL Pipelines With Akka Streams, Alpakka And Apache...
PDF
Exploring Reactive Integrations With Akka Streams, Alpakka And Apache Kafka
PDF
Reactive java - Reactive Programming + RxJava
PDF
Full Stack Reactive In Practice
PDF
Lightbend Fast Data Platform
PPTX
Multi-threading in the modern era: Vertx Akka and Quasar
PPTX
What’s expected in Spring 5
PDF
Akka at Enterprise Scale: Performance Tuning Distributed Applications
PDF
Spring cloud Service-Discovery
PPTX
Akka for big data developers
PDF
Akka A to Z: A Guide To The Industry’s Best Toolkit for Fast Data and Microse...
PDF
Making Scala Faster: 3 Expert Tips For Busy Development Teams
PDF
Do's and don'ts when deploying akka in production
PPTX
What’s expected in Java 9
PDF
Bulletproof Kafka with Fault Tree Analysis (Andrey Falko, Lyft) Kafka Summit ...
PDF
Streaming Microservices With Akka Streams And Kafka Streams
PPTX
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
PDF
Bootstrapping Microservices with Kafka, Akka and Spark
PDF
Akka and Kubernetes: Reactive From Code To Cloud
PDF
Kafka summit SF 2019 - the art of the event-streaming app
Build Real-Time Streaming ETL Pipelines With Akka Streams, Alpakka And Apache...
Exploring Reactive Integrations With Akka Streams, Alpakka And Apache Kafka
Reactive java - Reactive Programming + RxJava
Full Stack Reactive In Practice
Lightbend Fast Data Platform
Multi-threading in the modern era: Vertx Akka and Quasar
What’s expected in Spring 5
Akka at Enterprise Scale: Performance Tuning Distributed Applications
Spring cloud Service-Discovery
Akka for big data developers
Akka A to Z: A Guide To The Industry’s Best Toolkit for Fast Data and Microse...
Making Scala Faster: 3 Expert Tips For Busy Development Teams
Do's and don'ts when deploying akka in production
What’s expected in Java 9
Bulletproof Kafka with Fault Tree Analysis (Andrey Falko, Lyft) Kafka Summit ...
Streaming Microservices With Akka Streams And Kafka Streams
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Bootstrapping Microservices with Kafka, Akka and Spark
Akka and Kubernetes: Reactive From Code To Cloud
Kafka summit SF 2019 - the art of the event-streaming app
Ad

Similar to Why Actor-Based Systems Are The Best For Microservices (20)

PDF
Spring Boot Microservices vs Akka Actor Cluster
PDF
Beyond Fault Tolerance with Actor Programming
PDF
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
PDF
Building Asynchronous Applications
ODP
RestMS Introduction
PPTX
Asynchronous Service Server
PPTX
Орхан Гасимов: "Reactive Applications in Java with Akka"
PDF
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
PPTX
High powered messaging with RabbitMQ
ODP
The Art of Message Queues - TEKX
PPTX
Developing Actors in Azure with .net
PPTX
AKKA and Scala @ Inneractive
PPTX
Microservices in a Streaming World
PDF
The API-Application Semantic Gap
PPTX
Concurrent processing and distributed computing
PDF
NoSQL afternoon in Japan kumofs & MessagePack
PDF
NoSQL afternoon in Japan Kumofs & MessagePack
PDF
Indeed Flex: The Story of a Revolutionary Recruitment Platform
PPTX
Clustersoftware
PPTX
Liveperson DLD 2015
Spring Boot Microservices vs Akka Actor Cluster
Beyond Fault Tolerance with Actor Programming
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
Building Asynchronous Applications
RestMS Introduction
Asynchronous Service Server
Орхан Гасимов: "Reactive Applications in Java with Akka"
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
High powered messaging with RabbitMQ
The Art of Message Queues - TEKX
Developing Actors in Azure with .net
AKKA and Scala @ Inneractive
Microservices in a Streaming World
The API-Application Semantic Gap
Concurrent processing and distributed computing
NoSQL afternoon in Japan kumofs & MessagePack
NoSQL afternoon in Japan Kumofs & MessagePack
Indeed Flex: The Story of a Revolutionary Recruitment Platform
Clustersoftware
Liveperson DLD 2015
Ad

More from Yaroslav Tkachenko (14)

PDF
Dynamic Change Data Capture with Flink CDC and Consistent Hashing
PDF
Streaming SQL for Data Engineers: The Next Big Thing?
PDF
Apache Flink Adoption at Shopify
PDF
Storing State Forever: Why It Can Be Good For Your Analytics
PDF
It's Time To Stop Using Lambda Architecture
PDF
Bravo Six, Going Realtime. Transitioning Activision Data Pipeline to Streaming
PDF
Apache Kafka: New Features That You Might Not Know About
PDF
Building Scalable and Extendable Data Pipeline for Call of Duty Games: Lesson...
PDF
Designing Scalable and Extendable Data Pipeline for Call Of Duty Games
PPTX
10 tips for making Bash a sane programming language
PDF
Actors or Not: Async Event Architectures
PDF
Kafka Streams: the easiest way to start with stream processing
PDF
Querying Data Pipeline with AWS Athena
PPTX
Быстрая и безболезненная разработка клиентской части веб-приложений
Dynamic Change Data Capture with Flink CDC and Consistent Hashing
Streaming SQL for Data Engineers: The Next Big Thing?
Apache Flink Adoption at Shopify
Storing State Forever: Why It Can Be Good For Your Analytics
It's Time To Stop Using Lambda Architecture
Bravo Six, Going Realtime. Transitioning Activision Data Pipeline to Streaming
Apache Kafka: New Features That You Might Not Know About
Building Scalable and Extendable Data Pipeline for Call of Duty Games: Lesson...
Designing Scalable and Extendable Data Pipeline for Call Of Duty Games
10 tips for making Bash a sane programming language
Actors or Not: Async Event Architectures
Kafka Streams: the easiest way to start with stream processing
Querying Data Pipeline with AWS Athena
Быстрая и безболезненная разработка клиентской части веб-приложений

Recently uploaded (20)

PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Introduction to Artificial Intelligence
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Digital Strategies for Manufacturing Companies
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
System and Network Administration Chapter 2
PDF
Nekopoi APK 2025 free lastest update
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
history of c programming in notes for students .pptx
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Introduction to Artificial Intelligence
Navsoft: AI-Powered Business Solutions & Custom Software Development
Softaken Excel to vCard Converter Software.pdf
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Digital Strategies for Manufacturing Companies
2025 Textile ERP Trends: SAP, Odoo & Oracle
Internet Downloader Manager (IDM) Crack 6.42 Build 41
VVF-Customer-Presentation2025-Ver1.9.pptx
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Adobe Illustrator 28.6 Crack My Vision of Vector Design
System and Network Administration Chapter 2
Nekopoi APK 2025 free lastest update
Odoo POS Development Services by CandidRoot Solutions
Operating system designcfffgfgggggggvggggggggg
history of c programming in notes for students .pptx
Which alternative to Crystal Reports is best for small or large businesses.pdf

Why Actor-Based Systems Are The Best For Microservices