SlideShare una empresa de Scribd logo
1 de 17
Descargar para leer sin conexión
Actor Pattern and NATS
Charlie Strawn and Steven Osborne
Basic Outline
● Introduction to Actor Model
● Similarities to decoupled pub-sub
● Simple NATS-Akka connector
● NATS Actor implementation
Actor Model
Actor Model
The actor model is comprised of a system of actors. An actor is a primitive that
embodies
1. Processing
2. Storage
3. Communication
In an actor system everything is an actor. Actor people love the “one ant is no ant”
analogy: One actor is no actor - they come in systems.
Actor Model
When an actor receives a message it can
1. Send messages to other actors
2. Create new actors
3. Designate the behavior to be used for the next message it receives
This is the real key. The actor is always doing work reacting to some message.
Actor Model - Key points
● Actors can live anywhere.
● There is no shared state among actors. Let it crash.
● Each actor has an address at which it receives messages.
● There is a many-to-many relationship between actors and addresses.
● Messages are delivered at most once.
● Actors process messages serially.
Actor Model - Key points
● The model is inherently concurrent (yey!) so keep computation lightweight
and consistent
● Throughput is king
● Each actor processes messages serially - so avoid blocking (except for
unavoidable ops like I/O)
● The unit of concurrency is actor - so all computation within the actor is serial.
If the actor has too much work and needs more processing power it creates
and messages other actors.
Good synopsis...
If we’ve piqued your interest in actors but find our summary lacking content -
check out this video from Carl Hewitt - the original designer of the Actor Model.
https://www.youtube.com/watch?v=7erJ1DV_Tlo
Or just do the sane thing and search youtube for “the actor model”. It’s the first
one.
Akka
● Akka is Java/Scala library that implements the actor model. Akka is
especially well suited to an EventBus style implementation of pub sub. http:
//doc.akka.io/docs/akka/current/scala/event-bus.html
● 1-to-1 Message to Event
● Effective Akka
Ok, great, isn’t this a NATS talk?
NATS is clearly not an actor model - it’s a communication protocol. That being
said, it upholds many of the basic tenants embraced by the actor model.
● Decoupled sender/receiver (i.e. publisher-subscriber)
● Publishers and subscribers can live anywhere
● Messages are delivered at most once
● Lightweight and high throughput
NATS-Akka
Let’s take the low hanging fruit here - we should be able to connect NATS to an
existing actor model implementation. Better yet, let’s take the lowest of the fruit -
NATS connector framework (in Java) to Akka (also Java).
Lets combine the speed and simplicity of NATS with the speed and simplicity of
Akka.
NATS-Akka-Connector
Demo!
Akka Clustering
● Akka has a built-in clustering module - but it’s based on complicated on
somewhat complicated tcp routing configuration.
● With NATS as the communication point between nodes - clustering akka is
simple.
Connecting to an actor system is cool, but...
What if the actor system was built on top of NATS?
Then multi-node would be a cinch. Setup would be quick. Message latency would
be low. Actor Systems could span languages (i.e. have java actors that interacts
with legacy apis, go actors to do some heavy lifting, and some rust actors to just
be awesome).
Let’s try it out
Demo!
https://github.com/sosborne/nats-actor/tree/actor
More work
● Actually implement akka clustering using NATS as the message transport
across cluster nodes
● Multi-node go nats-actor implementation
● More languages for nats-actor (maybe rust? Shameless plug…)
Thanks!
Some good resources
http://doc.akka.io/docs/akka/current/scala/event-bus.html
https://github.com/vrcod/akka-sample-twitter-streaming
http://akka.io/
http://www.brianstorti.com/the-actor-model/

Más contenido relacionado

La actualidad más candente

Project presentation
Project presentationProject presentation
Project presentationVarun Gupta
 
Managing state in modern React web applications
Managing state in modern React web applicationsManaging state in modern React web applications
Managing state in modern React web applicationsJon Preece
 
Akka - young fighter course
Akka - young fighter courseAkka - young fighter course
Akka - young fighter courseDmitriy Gutman
 
Concurrency in Smalltalk -- Beyond Threads
Concurrency in Smalltalk -- Beyond ThreadsConcurrency in Smalltalk -- Beyond Threads
Concurrency in Smalltalk -- Beyond ThreadsESUG
 
2 mins intro of akka
2 mins intro of akka2 mins intro of akka
2 mins intro of akkaHuangmao Quan
 
Dive into Akka Actors
Dive into Akka ActorsDive into Akka Actors
Dive into Akka ActorsKnoldus Inc.
 
Concurrent Applications with F# Agents
Concurrent Applications with F# AgentsConcurrent Applications with F# Agents
Concurrent Applications with F# AgentsRachel Reese
 
[CocoaHeads Tricity] Michał Zygar - Consuming API
[CocoaHeads Tricity] Michał Zygar - Consuming API[CocoaHeads Tricity] Michał Zygar - Consuming API
[CocoaHeads Tricity] Michał Zygar - Consuming APICocoaHeads Tricity
 
Exploring Akka Typed
Exploring Akka TypedExploring Akka Typed
Exploring Akka TypedIain Hull
 
Основы функционального JS
Основы функционального JSОсновы функционального JS
Основы функционального JSАнна Луць
 
Javascript for Intermediates
Javascript for IntermediatesJavascript for Intermediates
Javascript for IntermediatesAnkit Agrawal
 
DDD loves Actor Model and Actor Model loves Elixir
DDD loves Actor Model and Actor Model loves ElixirDDD loves Actor Model and Actor Model loves Elixir
DDD loves Actor Model and Actor Model loves ElixirGianluca Padovani
 
Alexander Litvinok (software engineer) "bdd wtf"
Alexander Litvinok (software engineer) "bdd wtf"Alexander Litvinok (software engineer) "bdd wtf"
Alexander Litvinok (software engineer) "bdd wtf"EPAM Systems
 

La actualidad más candente (17)

Project presentation
Project presentationProject presentation
Project presentation
 
Managing state in modern React web applications
Managing state in modern React web applicationsManaging state in modern React web applications
Managing state in modern React web applications
 
Akka - young fighter course
Akka - young fighter courseAkka - young fighter course
Akka - young fighter course
 
Concurrency in Smalltalk -- Beyond Threads
Concurrency in Smalltalk -- Beyond ThreadsConcurrency in Smalltalk -- Beyond Threads
Concurrency in Smalltalk -- Beyond Threads
 
2 mins intro of akka
2 mins intro of akka2 mins intro of akka
2 mins intro of akka
 
Dive into Akka Actors
Dive into Akka ActorsDive into Akka Actors
Dive into Akka Actors
 
Actor Model & Reactive Manifesto
Actor Model & Reactive ManifestoActor Model & Reactive Manifesto
Actor Model & Reactive Manifesto
 
Java Interface
Java InterfaceJava Interface
Java Interface
 
Concurrent Applications with F# Agents
Concurrent Applications with F# AgentsConcurrent Applications with F# Agents
Concurrent Applications with F# Agents
 
[CocoaHeads Tricity] Michał Zygar - Consuming API
[CocoaHeads Tricity] Michał Zygar - Consuming API[CocoaHeads Tricity] Michał Zygar - Consuming API
[CocoaHeads Tricity] Michał Zygar - Consuming API
 
Exploring Akka Typed
Exploring Akka TypedExploring Akka Typed
Exploring Akka Typed
 
Elixir for Rubyists
Elixir for RubyistsElixir for Rubyists
Elixir for Rubyists
 
Основы функционального JS
Основы функционального JSОсновы функционального JS
Основы функционального JS
 
Javascript for Intermediates
Javascript for IntermediatesJavascript for Intermediates
Javascript for Intermediates
 
DDD loves Actor Model and Actor Model loves Elixir
DDD loves Actor Model and Actor Model loves ElixirDDD loves Actor Model and Actor Model loves Elixir
DDD loves Actor Model and Actor Model loves Elixir
 
BDD: WTF?@#
BDD: WTF?@#BDD: WTF?@#
BDD: WTF?@#
 
Alexander Litvinok (software engineer) "bdd wtf"
Alexander Litvinok (software engineer) "bdd wtf"Alexander Litvinok (software engineer) "bdd wtf"
Alexander Litvinok (software engineer) "bdd wtf"
 

Destacado

How Greta uses NATS to revolutionize data distribution on the Internet
How Greta uses NATS to revolutionize data distribution on the InternetHow Greta uses NATS to revolutionize data distribution on the Internet
How Greta uses NATS to revolutionize data distribution on the InternetApcera
 
Patterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATSPatterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATSApcera
 
Debugging Network Issues
Debugging Network IssuesDebugging Network Issues
Debugging Network IssuesApcera
 
Implementing Microservices with NATS
Implementing Microservices with NATSImplementing Microservices with NATS
Implementing Microservices with NATSApcera
 
Simple and Scalable Microservices: Using NATS with Docker Compose and Swarm
Simple and Scalable Microservices: Using NATS with Docker Compose and SwarmSimple and Scalable Microservices: Using NATS with Docker Compose and Swarm
Simple and Scalable Microservices: Using NATS with Docker Compose and SwarmApcera
 
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud World
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud WorldPolicy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud World
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud WorldApcera
 
Kubernetes, The Day After
Kubernetes, The Day AfterKubernetes, The Day After
Kubernetes, The Day AfterApcera
 
Nats in action a real time microservices architecture handled by nats
Nats in action   a real time microservices architecture handled by natsNats in action   a real time microservices architecture handled by nats
Nats in action a real time microservices architecture handled by natsRaul Perez
 
Build Golang projects properly with Makefiles
Build Golang projects properly with MakefilesBuild Golang projects properly with Makefiles
Build Golang projects properly with MakefilesRaül Pérez
 
οργάνωση, διοίκηση και λειτουργία ενός γραφείου εισερχομένου τουρισμού
οργάνωση, διοίκηση και λειτουργία ενός γραφείου εισερχομένου τουρισμούοργάνωση, διοίκηση και λειτουργία ενός γραφείου εισερχομένου τουρισμού
οργάνωση, διοίκηση και λειτουργία ενός γραφείου εισερχομένου τουρισμούStamatina Kanta
 
How to Migrate to Cloud with Complete Confidence and Trust
How to Migrate to Cloud with Complete Confidence and TrustHow to Migrate to Cloud with Complete Confidence and Trust
How to Migrate to Cloud with Complete Confidence and TrustApcera
 
Levent Nart Dinamikler 2016
Levent Nart Dinamikler 2016Levent Nart Dinamikler 2016
Levent Nart Dinamikler 2016Dinamikler
 
Merve Taşkan Dinamikler 2016
Merve Taşkan Dinamikler 2016Merve Taşkan Dinamikler 2016
Merve Taşkan Dinamikler 2016Dinamikler
 
Sherif Adel Medhar Dinamikler 2016
Sherif Adel Medhar Dinamikler 2016Sherif Adel Medhar Dinamikler 2016
Sherif Adel Medhar Dinamikler 2016Dinamikler
 
Blaze clan company presentation
Blaze clan   company presentationBlaze clan   company presentation
Blaze clan company presentationSupratik Ghatak
 
Metin Örnek Dinamikler 2016
Metin Örnek Dinamikler 2016Metin Örnek Dinamikler 2016
Metin Örnek Dinamikler 2016Dinamikler
 
Cloudlytics Reporting: Analyze Amazon CloudFront, S3 & ELB Logs - Part 2
Cloudlytics Reporting: Analyze Amazon CloudFront, S3 & ELB Logs - Part 2Cloudlytics Reporting: Analyze Amazon CloudFront, S3 & ELB Logs - Part 2
Cloudlytics Reporting: Analyze Amazon CloudFront, S3 & ELB Logs - Part 2Blazeclan Technologies Private Limited
 
Cloudbakers' Presentation at Jobg8's Job Board Summit 2013
Cloudbakers' Presentation at Jobg8's Job Board Summit 2013Cloudbakers' Presentation at Jobg8's Job Board Summit 2013
Cloudbakers' Presentation at Jobg8's Job Board Summit 2013cloudbakers
 
Melda Polat Dinamikler 2016
Melda Polat Dinamikler 2016Melda Polat Dinamikler 2016
Melda Polat Dinamikler 2016Dinamikler
 
Office 365 Hizmetlere Genel Bakış ve Exchange Online
Office 365 Hizmetlere Genel Bakış ve Exchange OnlineOffice 365 Hizmetlere Genel Bakış ve Exchange Online
Office 365 Hizmetlere Genel Bakış ve Exchange OnlineMustafa
 

Destacado (20)

How Greta uses NATS to revolutionize data distribution on the Internet
How Greta uses NATS to revolutionize data distribution on the InternetHow Greta uses NATS to revolutionize data distribution on the Internet
How Greta uses NATS to revolutionize data distribution on the Internet
 
Patterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATSPatterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATS
 
Debugging Network Issues
Debugging Network IssuesDebugging Network Issues
Debugging Network Issues
 
Implementing Microservices with NATS
Implementing Microservices with NATSImplementing Microservices with NATS
Implementing Microservices with NATS
 
Simple and Scalable Microservices: Using NATS with Docker Compose and Swarm
Simple and Scalable Microservices: Using NATS with Docker Compose and SwarmSimple and Scalable Microservices: Using NATS with Docker Compose and Swarm
Simple and Scalable Microservices: Using NATS with Docker Compose and Swarm
 
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud World
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud WorldPolicy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud World
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud World
 
Kubernetes, The Day After
Kubernetes, The Day AfterKubernetes, The Day After
Kubernetes, The Day After
 
Nats in action a real time microservices architecture handled by nats
Nats in action   a real time microservices architecture handled by natsNats in action   a real time microservices architecture handled by nats
Nats in action a real time microservices architecture handled by nats
 
Build Golang projects properly with Makefiles
Build Golang projects properly with MakefilesBuild Golang projects properly with Makefiles
Build Golang projects properly with Makefiles
 
οργάνωση, διοίκηση και λειτουργία ενός γραφείου εισερχομένου τουρισμού
οργάνωση, διοίκηση και λειτουργία ενός γραφείου εισερχομένου τουρισμούοργάνωση, διοίκηση και λειτουργία ενός γραφείου εισερχομένου τουρισμού
οργάνωση, διοίκηση και λειτουργία ενός γραφείου εισερχομένου τουρισμού
 
How to Migrate to Cloud with Complete Confidence and Trust
How to Migrate to Cloud with Complete Confidence and TrustHow to Migrate to Cloud with Complete Confidence and Trust
How to Migrate to Cloud with Complete Confidence and Trust
 
Levent Nart Dinamikler 2016
Levent Nart Dinamikler 2016Levent Nart Dinamikler 2016
Levent Nart Dinamikler 2016
 
Merve Taşkan Dinamikler 2016
Merve Taşkan Dinamikler 2016Merve Taşkan Dinamikler 2016
Merve Taşkan Dinamikler 2016
 
Sherif Adel Medhar Dinamikler 2016
Sherif Adel Medhar Dinamikler 2016Sherif Adel Medhar Dinamikler 2016
Sherif Adel Medhar Dinamikler 2016
 
Blaze clan company presentation
Blaze clan   company presentationBlaze clan   company presentation
Blaze clan company presentation
 
Metin Örnek Dinamikler 2016
Metin Örnek Dinamikler 2016Metin Örnek Dinamikler 2016
Metin Örnek Dinamikler 2016
 
Cloudlytics Reporting: Analyze Amazon CloudFront, S3 & ELB Logs - Part 2
Cloudlytics Reporting: Analyze Amazon CloudFront, S3 & ELB Logs - Part 2Cloudlytics Reporting: Analyze Amazon CloudFront, S3 & ELB Logs - Part 2
Cloudlytics Reporting: Analyze Amazon CloudFront, S3 & ELB Logs - Part 2
 
Cloudbakers' Presentation at Jobg8's Job Board Summit 2013
Cloudbakers' Presentation at Jobg8's Job Board Summit 2013Cloudbakers' Presentation at Jobg8's Job Board Summit 2013
Cloudbakers' Presentation at Jobg8's Job Board Summit 2013
 
Melda Polat Dinamikler 2016
Melda Polat Dinamikler 2016Melda Polat Dinamikler 2016
Melda Polat Dinamikler 2016
 
Office 365 Hizmetlere Genel Bakış ve Exchange Online
Office 365 Hizmetlere Genel Bakış ve Exchange OnlineOffice 365 Hizmetlere Genel Bakış ve Exchange Online
Office 365 Hizmetlere Genel Bakış ve Exchange Online
 

Similar a Actor Patterns and NATS - Boulder Meetup

Model with actors and implement with Akka
Model with actors and implement with AkkaModel with actors and implement with Akka
Model with actors and implement with AkkaNgoc Dao
 
Concurrent processing and distributed computing
Concurrent processing and distributed computingConcurrent processing and distributed computing
Concurrent processing and distributed computingRahul Ramteke
 
Fundamentals of Akka - Webinar
Fundamentals of Akka - WebinarFundamentals of Akka - Webinar
Fundamentals of Akka - WebinarKnoldus Inc.
 
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...Codemotion
 
Beyond Fault Tolerance with Actor Programming
Beyond Fault Tolerance with Actor ProgrammingBeyond Fault Tolerance with Actor Programming
Beyond Fault Tolerance with Actor ProgrammingFabio Tiriticco
 
Spring Boot Microservices vs Akka Actor Cluster
Spring Boot Microservices vs Akka Actor Cluster Spring Boot Microservices vs Akka Actor Cluster
Spring Boot Microservices vs Akka Actor Cluster OpenCredo
 
Daniela Sfregola - Intro to Akka
Daniela Sfregola - Intro to AkkaDaniela Sfregola - Intro to Akka
Daniela Sfregola - Intro to AkkaScala Italy
 
Reactive programming with akka
Reactive programming with akkaReactive programming with akka
Reactive programming with akkaWebdesign Factory
 
Actor-based concurrency in a modern Java Enterprise
Actor-based concurrency in a modern Java EnterpriseActor-based concurrency in a modern Java Enterprise
Actor-based concurrency in a modern Java EnterpriseAlexander Lukyanchikov
 
Introduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actorsIntroduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actorsdatamantra
 
Introduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actorsIntroduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actorsShashank L
 
Why Actor-Based Systems Are The Best For Microservices
Why Actor-Based Systems Are The Best For MicroservicesWhy Actor-Based Systems Are The Best For Microservices
Why Actor-Based Systems Are The Best For MicroservicesYaroslav Tkachenko
 
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016Codemotion
 
Орхан Гасимов: "Reactive Applications in Java with Akka"
Орхан Гасимов: "Reactive Applications in Java with Akka"Орхан Гасимов: "Reactive Applications in Java with Akka"
Орхан Гасимов: "Reactive Applications in Java with Akka"Anna Shymchenko
 
Principled io in_scala_2019_distribution
Principled io in_scala_2019_distributionPrincipled io in_scala_2019_distribution
Principled io in_scala_2019_distributionRaymond Tay
 

Similar a Actor Patterns and NATS - Boulder Meetup (20)

Model with actors and implement with Akka
Model with actors and implement with AkkaModel with actors and implement with Akka
Model with actors and implement with Akka
 
Concurrent processing and distributed computing
Concurrent processing and distributed computingConcurrent processing and distributed computing
Concurrent processing and distributed computing
 
Fundamentals of Akka - Webinar
Fundamentals of Akka - WebinarFundamentals of Akka - Webinar
Fundamentals of Akka - Webinar
 
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
 
Beyond Fault Tolerance with Actor Programming
Beyond Fault Tolerance with Actor ProgrammingBeyond Fault Tolerance with Actor Programming
Beyond Fault Tolerance with Actor Programming
 
Introducing Akka
Introducing AkkaIntroducing Akka
Introducing Akka
 
Spring Boot Microservices vs Akka Actor Cluster
Spring Boot Microservices vs Akka Actor Cluster Spring Boot Microservices vs Akka Actor Cluster
Spring Boot Microservices vs Akka Actor Cluster
 
Daniela Sfregola - Intro to Akka
Daniela Sfregola - Intro to AkkaDaniela Sfregola - Intro to Akka
Daniela Sfregola - Intro to Akka
 
Reactive programming with akka
Reactive programming with akkaReactive programming with akka
Reactive programming with akka
 
Akka.Net Overview
Akka.Net OverviewAkka.Net Overview
Akka.Net Overview
 
Actor-based concurrency in a modern Java Enterprise
Actor-based concurrency in a modern Java EnterpriseActor-based concurrency in a modern Java Enterprise
Actor-based concurrency in a modern Java Enterprise
 
Introduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actorsIntroduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actors
 
Introduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actorsIntroduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actors
 
Why Actor-Based Systems Are The Best For Microservices
Why Actor-Based Systems Are The Best For MicroservicesWhy Actor-Based Systems Are The Best For Microservices
Why Actor-Based Systems Are The Best For Microservices
 
Actors model in gpars
Actors model in gparsActors model in gpars
Actors model in gpars
 
Akka dotnet presentation ndc 2017
Akka dotnet presentation ndc 2017Akka dotnet presentation ndc 2017
Akka dotnet presentation ndc 2017
 
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
Un actor (model) per amico - Alessandro Melchiori - Codemotion Milan 2016
 
Орхан Гасимов: "Reactive Applications in Java with Akka"
Орхан Гасимов: "Reactive Applications in Java with Akka"Орхан Гасимов: "Reactive Applications in Java with Akka"
Орхан Гасимов: "Reactive Applications in Java with Akka"
 
Principled io in_scala_2019_distribution
Principled io in_scala_2019_distributionPrincipled io in_scala_2019_distribution
Principled io in_scala_2019_distribution
 
Actors in the Small
Actors in the SmallActors in the Small
Actors in the Small
 

Más de Apcera

Gopher fest 2017: Adding Context To NATS
Gopher fest 2017: Adding Context To NATSGopher fest 2017: Adding Context To NATS
Gopher fest 2017: Adding Context To NATSApcera
 
How Clarifai uses NATS and Kubernetes for Machine Learning
How Clarifai uses NATS and Kubernetes for Machine LearningHow Clarifai uses NATS and Kubernetes for Machine Learning
How Clarifai uses NATS and Kubernetes for Machine LearningApcera
 
Modernizing IT in the Platform Era
Modernizing IT in the Platform EraModernizing IT in the Platform Era
Modernizing IT in the Platform EraApcera
 
IT Modernization Doesn’t Mean You Leave Your Legacy Apps Behind
IT Modernization Doesn’t Mean You Leave Your Legacy Apps BehindIT Modernization Doesn’t Mean You Leave Your Legacy Apps Behind
IT Modernization Doesn’t Mean You Leave Your Legacy Apps BehindApcera
 
The Zen of High Performance Messaging with NATS
The Zen of High Performance Messaging with NATSThe Zen of High Performance Messaging with NATS
The Zen of High Performance Messaging with NATSApcera
 
NATS for Modern Messaging and Microservices
NATS for Modern Messaging and MicroservicesNATS for Modern Messaging and Microservices
NATS for Modern Messaging and MicroservicesApcera
 
NATS Connector Framework - Boulder Meetup
NATS Connector Framework - Boulder MeetupNATS Connector Framework - Boulder Meetup
NATS Connector Framework - Boulder MeetupApcera
 
Simple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder MeetupSimple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder MeetupApcera
 
NATS vs HTTP
NATS vs HTTPNATS vs HTTP
NATS vs HTTPApcera
 
Micro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingMicro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingApcera
 
NATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQuearyNATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQuearyApcera
 
Securing the Cloud Native Stack
Securing the Cloud Native StackSecuring the Cloud Native Stack
Securing the Cloud Native StackApcera
 
Simple Solutions for Complex Problems
Simple Solutions for Complex Problems Simple Solutions for Complex Problems
Simple Solutions for Complex Problems Apcera
 
KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016Apcera
 
Integration Patterns and Anti-Patterns for Microservices Architectures
Integration Patterns and Anti-Patterns for Microservices ArchitecturesIntegration Patterns and Anti-Patterns for Microservices Architectures
Integration Patterns and Anti-Patterns for Microservices ArchitecturesApcera
 
NATS: Control Flow for Distributed Systems
NATS: Control Flow for Distributed SystemsNATS: Control Flow for Distributed Systems
NATS: Control Flow for Distributed SystemsApcera
 
Integration Patterns for Microservices Architectures
Integration Patterns for Microservices ArchitecturesIntegration Patterns for Microservices Architectures
Integration Patterns for Microservices ArchitecturesApcera
 
Nats meetup sf 20150826
Nats meetup sf   20150826Nats meetup sf   20150826
Nats meetup sf 20150826Apcera
 
Microservices: Notes From The Field
Microservices: Notes From The FieldMicroservices: Notes From The Field
Microservices: Notes From The FieldApcera
 
Docker + App Container = ocp
Docker + App Container = ocpDocker + App Container = ocp
Docker + App Container = ocpApcera
 

Más de Apcera (20)

Gopher fest 2017: Adding Context To NATS
Gopher fest 2017: Adding Context To NATSGopher fest 2017: Adding Context To NATS
Gopher fest 2017: Adding Context To NATS
 
How Clarifai uses NATS and Kubernetes for Machine Learning
How Clarifai uses NATS and Kubernetes for Machine LearningHow Clarifai uses NATS and Kubernetes for Machine Learning
How Clarifai uses NATS and Kubernetes for Machine Learning
 
Modernizing IT in the Platform Era
Modernizing IT in the Platform EraModernizing IT in the Platform Era
Modernizing IT in the Platform Era
 
IT Modernization Doesn’t Mean You Leave Your Legacy Apps Behind
IT Modernization Doesn’t Mean You Leave Your Legacy Apps BehindIT Modernization Doesn’t Mean You Leave Your Legacy Apps Behind
IT Modernization Doesn’t Mean You Leave Your Legacy Apps Behind
 
The Zen of High Performance Messaging with NATS
The Zen of High Performance Messaging with NATSThe Zen of High Performance Messaging with NATS
The Zen of High Performance Messaging with NATS
 
NATS for Modern Messaging and Microservices
NATS for Modern Messaging and MicroservicesNATS for Modern Messaging and Microservices
NATS for Modern Messaging and Microservices
 
NATS Connector Framework - Boulder Meetup
NATS Connector Framework - Boulder MeetupNATS Connector Framework - Boulder Meetup
NATS Connector Framework - Boulder Meetup
 
Simple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder MeetupSimple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder Meetup
 
NATS vs HTTP
NATS vs HTTPNATS vs HTTP
NATS vs HTTP
 
Micro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingMicro on NATS - Microservices with Messaging
Micro on NATS - Microservices with Messaging
 
NATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQuearyNATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQueary
 
Securing the Cloud Native Stack
Securing the Cloud Native StackSecuring the Cloud Native Stack
Securing the Cloud Native Stack
 
Simple Solutions for Complex Problems
Simple Solutions for Complex Problems Simple Solutions for Complex Problems
Simple Solutions for Complex Problems
 
KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016
 
Integration Patterns and Anti-Patterns for Microservices Architectures
Integration Patterns and Anti-Patterns for Microservices ArchitecturesIntegration Patterns and Anti-Patterns for Microservices Architectures
Integration Patterns and Anti-Patterns for Microservices Architectures
 
NATS: Control Flow for Distributed Systems
NATS: Control Flow for Distributed SystemsNATS: Control Flow for Distributed Systems
NATS: Control Flow for Distributed Systems
 
Integration Patterns for Microservices Architectures
Integration Patterns for Microservices ArchitecturesIntegration Patterns for Microservices Architectures
Integration Patterns for Microservices Architectures
 
Nats meetup sf 20150826
Nats meetup sf   20150826Nats meetup sf   20150826
Nats meetup sf 20150826
 
Microservices: Notes From The Field
Microservices: Notes From The FieldMicroservices: Notes From The Field
Microservices: Notes From The Field
 
Docker + App Container = ocp
Docker + App Container = ocpDocker + App Container = ocp
Docker + App Container = ocp
 

Último

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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
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
 
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
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
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
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
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
 
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
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: 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
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
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
 

Último (20)

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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
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.
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
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
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
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
 
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?
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: 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
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.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
 
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
 

Actor Patterns and NATS - Boulder Meetup

  • 1. Actor Pattern and NATS Charlie Strawn and Steven Osborne
  • 2. Basic Outline ● Introduction to Actor Model ● Similarities to decoupled pub-sub ● Simple NATS-Akka connector ● NATS Actor implementation
  • 4. Actor Model The actor model is comprised of a system of actors. An actor is a primitive that embodies 1. Processing 2. Storage 3. Communication In an actor system everything is an actor. Actor people love the “one ant is no ant” analogy: One actor is no actor - they come in systems.
  • 5. Actor Model When an actor receives a message it can 1. Send messages to other actors 2. Create new actors 3. Designate the behavior to be used for the next message it receives This is the real key. The actor is always doing work reacting to some message.
  • 6. Actor Model - Key points ● Actors can live anywhere. ● There is no shared state among actors. Let it crash. ● Each actor has an address at which it receives messages. ● There is a many-to-many relationship between actors and addresses. ● Messages are delivered at most once. ● Actors process messages serially.
  • 7. Actor Model - Key points ● The model is inherently concurrent (yey!) so keep computation lightweight and consistent ● Throughput is king ● Each actor processes messages serially - so avoid blocking (except for unavoidable ops like I/O) ● The unit of concurrency is actor - so all computation within the actor is serial. If the actor has too much work and needs more processing power it creates and messages other actors.
  • 8. Good synopsis... If we’ve piqued your interest in actors but find our summary lacking content - check out this video from Carl Hewitt - the original designer of the Actor Model. https://www.youtube.com/watch?v=7erJ1DV_Tlo Or just do the sane thing and search youtube for “the actor model”. It’s the first one.
  • 9. Akka ● Akka is Java/Scala library that implements the actor model. Akka is especially well suited to an EventBus style implementation of pub sub. http: //doc.akka.io/docs/akka/current/scala/event-bus.html ● 1-to-1 Message to Event ● Effective Akka
  • 10. Ok, great, isn’t this a NATS talk? NATS is clearly not an actor model - it’s a communication protocol. That being said, it upholds many of the basic tenants embraced by the actor model. ● Decoupled sender/receiver (i.e. publisher-subscriber) ● Publishers and subscribers can live anywhere ● Messages are delivered at most once ● Lightweight and high throughput
  • 11. NATS-Akka Let’s take the low hanging fruit here - we should be able to connect NATS to an existing actor model implementation. Better yet, let’s take the lowest of the fruit - NATS connector framework (in Java) to Akka (also Java). Lets combine the speed and simplicity of NATS with the speed and simplicity of Akka.
  • 13. Akka Clustering ● Akka has a built-in clustering module - but it’s based on complicated on somewhat complicated tcp routing configuration. ● With NATS as the communication point between nodes - clustering akka is simple.
  • 14. Connecting to an actor system is cool, but... What if the actor system was built on top of NATS? Then multi-node would be a cinch. Setup would be quick. Message latency would be low. Actor Systems could span languages (i.e. have java actors that interacts with legacy apis, go actors to do some heavy lifting, and some rust actors to just be awesome).
  • 15. Let’s try it out Demo! https://github.com/sosborne/nats-actor/tree/actor
  • 16. More work ● Actually implement akka clustering using NATS as the message transport across cluster nodes ● Multi-node go nats-actor implementation ● More languages for nats-actor (maybe rust? Shameless plug…)