SlideShare una empresa de Scribd logo
1 de 26
1
Tamir Dresher (@tamir_dresher)
Senior Software Architect
J
From Zero to the Actor Model
1
2
• Author of Rx.NET in Action (manning publications)
• Software architect, consultant and instructor
• Software Engineering Lecturer @ Ruppin Academic Center
@tamir_dresher
tamirdr@codevalue.net
http://www.TamirDresher.com.
About Me
Software Architecture is like Pasta
3By @benorama
Agenda
1. Actor Model
2. Semiconductors
3. Metrology Target Designer (MTD) by KLA-Tencor
4. Rearchitecting to Actor Model with Akka.NET
4
The Actor Model (Hewitt et al. 1973)
5
Alice
Mailbox
Bob
Sally
Mailbox
Mailbox
“the Actor model retained
more of what I thought
were the good features of
the object idea.”
Alan Kay
Object Orientation pioneer
and Smalltalk co-designer
Alice
Parent
Bob
Parent
Sally
Parent
The future platform (Juval Löwy)
6
Actors in Akka.NET
public class CoordinatorActor : ReceiveActor
{
public CoordinatorActor()
{
Receive<StartSimulation>(start =>
{
//Initiate a new simulation
});
}
}
public class StartSimulation
{
public Guid ProjectId { get; set; }
}
7
Demo
Echo Actor
8
Location Transparency (kind of…)
Actors live inside an ActorSystem
Each Actor has a unique address
Local: akka://ActorSystem-A/user/A2
Remote: akka.tcp://ActorSystem-C@Machine-B:5678/user/C1
Machine A Machine B
ActorSystem A
A1
A2
ActorSystem B
B1
B2
ActorSystem C
C1
9
Actor Model  Messaging  Decoupling
Message passing yields decoupling
Interesting messaging patterns are now available
Alice
Sally
Bob
Forwarding
Alice
Sally
Bob
Multiple Responses
10
MTD Case Study
Metrology Target Design
11
KLA-Tencor Corporation is a
leading supplier of process control
and yield management solutions
for the semiconductor and related
microelectronics industries
12
How chip is born
UV Radiation
13
Meaning of Overlay
14
Metrology Target Design (MTD)
15
MTD Original Architecture
Technology B Services
Technology A ServicesUI Clients
Stack
composer
Material
manager
Simulation
setup
DOE
generator
Geometry
Materials
Simulation
Results
HTTP requests
Notification hubSubscribe 
Notify
Notify
Distribution
Service
Cluster
Outgoing queue
per simulation
Incoming queue
per simulation
Simulation Coordinator
Technology A
Simulator
Technology B
Simulator
otify
16
MTD Challenges
Long simulations
PauseResumeStop lifecycle
Simulation failures
Extendibility
New Technologies
Configurable simulation tasks
Scalability
17
Actor Based Architecture - Hierarchy
/user
Simulation
Coordinator
Simulation
Queue
Simulation
Notifier
Technology A
Coordinator
Technology A
Simulation
Sub
Simulation 1
Sub
Simulation 2
Sub
Simulation 3
Technology B
Coordinator
Technology B
Simulation
Sub
Simulation 1
Sub
Simulation 2
Sub
Simulation 3
18
Actor Based Architecture – Messages Flow
WebApi
Controller
Simulation
Coordinator
1.Start Simulation
Queue
2.AddNew
Simulation
Notifier
4. SimulationStatusChanged
3.SimulationStatusChanged
5.SimulationStatusChanged
[Technology]
Coordinator
[Technology]
Simualtion
(id=xxxx)
11.MarkStarted
12. SimulationStatusChanged
SignalR
19
Statefulness and Behavior switching
Stateful is no longer a dirty word (kind of…)
The less calls you have for the persistence store the better the
performance will be
Durability is a must (state-awareness)
State goes hand-in-hand with supported behavior
Actors have the power to switch their behaviors at any point in time.
the actor becomes busy or the actor becomes connected.
Which messages to Receive, Deny, Postpone (Stashing)
State machine
20
<configuration>
<configSections>
<section name="akka" type="Akka.Configuration.Hocon.AkkaConfigurationSection, Akka"/>
</configSections>
<akka>
<hocon>
<![CDATA[
akka {
actor {
provider = "Akka.Remote.RemoteActorRefProvider, Akka.Remote"
}
remote {
helios.tcp {
port = 8098
hostname = localhost
}
}
[[>
</hocon>
</akka>
</configuration>
Remoting and Location Transparancy
ActorSelection selection =
sys.ActorSelection("akka.tcp://ActorSystem-C@Machine-B:5678/user/C1");
21
Routers
http://getakka.net/docs/working-with-actors/Routers
ConsistentHashing
akka.actor.deployment {
/workers {
router = round-robin-group
routees.paths = ["/user/workers/w1", "/user/workers/w2", "/user/workers/w3"]
}
}
Broadcast RoundRobin
var props = Props.Create<Worker>().WithRouter(FromConfig.Instance);
IActroRef actor = system.ActorOf(props, "workers");
22
Routing to Remote Actors
23
<hocon>
<![CDATA[
akka {
actor {
provider = "Akka.Remote.RemoteActorRefProvider, Akka.Remote"
deployment {
/Technologies {
router = broadcast-group
routees.paths = ["akka.tcp://TechnologyA@localhost:8091/user/coordinator"]
}
}
}
:
:
}
]]>
</hocon> IActroRef technologies =
_system.ActorOf(Props.Empty.WithRouter(FromConfig.Instance), "Technologies");
Final thoughts
Testing – easier sometimes, harder sometimes
Dependency injection – injecting ActorRefsActorSelections is not intuitive
Runtime contract vs. compile-time contract
Your messages are the contract
Messages versioning should be considered up-front
24
Summary
1. Actor Model
2. Semi conductor
3. Metrology Target Designer (MTD) by KLA-Tencor
4. Rearchitecting to Actor Model with Akka.NET
25
https://www.manning.com/books/
rx-dot-net-in-action
www.manning.com/books/
reactive-applications-with-akka-net
Discount code: ctwcodemash17
Thank You
Tamir Dresher (@tamir_dresher)
http://getakka.net/
https://github.com/akkadotnet/akka.net
26

Más contenido relacionado

La actualidad más candente

Introduction to Actor Model and Akka
Introduction to Actor Model and AkkaIntroduction to Actor Model and Akka
Introduction to Actor Model and Akka
Yung-Lin Ho
 

La actualidad más candente (20)

Developing distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterDeveloping distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka Cluster
 
Introduction to Akka.NET and Akka.Cluster
Introduction to Akka.NET and Akka.ClusterIntroduction to Akka.NET and Akka.Cluster
Introduction to Akka.NET and Akka.Cluster
 
The Actor Model - Towards Better Concurrency
The Actor Model - Towards Better ConcurrencyThe Actor Model - Towards Better Concurrency
The Actor Model - Towards Better Concurrency
 
Introduction to Actor Model and Akka
Introduction to Actor Model and AkkaIntroduction to Actor Model and Akka
Introduction to Actor Model and Akka
 
Introduction to Akka
Introduction to AkkaIntroduction to Akka
Introduction to Akka
 
Actor model : A Different Concurrency Approach
Actor model : A Different Concurrency ApproachActor model : A Different Concurrency Approach
Actor model : A Different Concurrency Approach
 
A gentle introduction into AKKA and the actor model
A gentle introduction into AKKA and the actor modelA gentle introduction into AKKA and the actor model
A gentle introduction into AKKA and the actor model
 
Actor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupActor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder Meetup
 
Game Programming 02 - Component-Based Entity Systems
Game Programming 02 - Component-Based Entity SystemsGame Programming 02 - Component-Based Entity Systems
Game Programming 02 - Component-Based Entity Systems
 
Understanding react hooks
Understanding react hooksUnderstanding react hooks
Understanding react hooks
 
Introduction to Actor Model and Akka
Introduction to Actor Model and AkkaIntroduction to Actor Model and Akka
Introduction to Actor Model and Akka
 
Akka Fundamentals
Akka FundamentalsAkka Fundamentals
Akka Fundamentals
 
Streams, Streams Everywhere! An Introduction to Rx
Streams, Streams Everywhere! An Introduction to RxStreams, Streams Everywhere! An Introduction to Rx
Streams, Streams Everywhere! An Introduction to Rx
 
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinksVUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
VUB Brussels Lecture 2019: Advanced Reflection: MetaLinks
 
Lecture: MetaLinks
Lecture: MetaLinksLecture: MetaLinks
Lecture: MetaLinks
 
Coordinating Micro-Services with Spring Cloud Contract
Coordinating Micro-Services with Spring Cloud ContractCoordinating Micro-Services with Spring Cloud Contract
Coordinating Micro-Services with Spring Cloud Contract
 
Anomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NETAnomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NET
 
Introduction to the Actor Model
Introduction to the Actor ModelIntroduction to the Actor Model
Introduction to the Actor Model
 
Introduction to akka actors with java 8
Introduction to akka actors with java 8Introduction to akka actors with java 8
Introduction to akka actors with java 8
 
Reactive Card Magic: Understanding Spring WebFlux and Project Reactor
Reactive Card Magic: Understanding Spring WebFlux and Project ReactorReactive Card Magic: Understanding Spring WebFlux and Project Reactor
Reactive Card Magic: Understanding Spring WebFlux and Project Reactor
 

Destacado

Science and software development
Science and software developmentScience and software development
Science and software development
Robert Pickering
 

Destacado (20)

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
 
CQRS Evolved - CQRS + Akka.NET
CQRS Evolved - CQRS + Akka.NETCQRS Evolved - CQRS + Akka.NET
CQRS Evolved - CQRS + Akka.NET
 
Reactive Development: Commands, Actors and Events. Oh My!!
Reactive Development: Commands, Actors and Events.  Oh My!!Reactive Development: Commands, Actors and Events.  Oh My!!
Reactive Development: Commands, Actors and Events. Oh My!!
 
Building responsive applications with Rx - CodeMash2017 - Tamir Dresher
Building responsive applications with Rx  - CodeMash2017 - Tamir DresherBuilding responsive applications with Rx  - CodeMash2017 - Tamir Dresher
Building responsive applications with Rx - CodeMash2017 - Tamir Dresher
 
Reactive applications with Akka.Net - DDD East Anglia 2015
Reactive applications with Akka.Net - DDD East Anglia 2015Reactive applications with Akka.Net - DDD East Anglia 2015
Reactive applications with Akka.Net - DDD East Anglia 2015
 
Akka.NET Fundamentals — #ProgNet15
Akka.NET Fundamentals — #ProgNet15Akka.NET Fundamentals — #ProgNet15
Akka.NET Fundamentals — #ProgNet15
 
Creating scalable message driven solutions akkadotnet
Creating scalable message driven solutions akkadotnetCreating scalable message driven solutions akkadotnet
Creating scalable message driven solutions akkadotnet
 
Building applications with akka.net
Building applications with akka.netBuilding applications with akka.net
Building applications with akka.net
 
Gaming in the Cloud at Websummit Dublin
Gaming in the Cloud at Websummit DublinGaming in the Cloud at Websummit Dublin
Gaming in the Cloud at Websummit Dublin
 
Greenfield Development with CQRS
Greenfield Development with CQRSGreenfield Development with CQRS
Greenfield Development with CQRS
 
Rx 101 - Tamir Dresher - Copenhagen .NET User Group
Rx 101  - Tamir Dresher - Copenhagen .NET User GroupRx 101  - Tamir Dresher - Copenhagen .NET User Group
Rx 101 - Tamir Dresher - Copenhagen .NET User Group
 
Reactive Programming in .Net - actorbased computing with Akka.Net
Reactive Programming in .Net - actorbased computing with Akka.NetReactive Programming in .Net - actorbased computing with Akka.Net
Reactive Programming in .Net - actorbased computing 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
 
Drm and the web
Drm and the webDrm and the web
Drm and the web
 
Project Orleans - Actor Model framework
Project Orleans - Actor Model frameworkProject Orleans - Actor Model framework
Project Orleans - Actor Model framework
 
Science and software development
Science and software developmentScience and software development
Science and software development
 
A Brief Intro to Microsoft Orleans
A Brief Intro to Microsoft OrleansA Brief Intro to Microsoft Orleans
A Brief Intro to Microsoft Orleans
 
Akka Futures and Akka Remoting
Akka Futures  and Akka RemotingAkka Futures  and Akka Remoting
Akka Futures and Akka Remoting
 
Azure Service Fabric
Azure Service FabricAzure Service Fabric
Azure Service Fabric
 

Similar a From Zero to the Actor Model (With Akka.Net) - CodeMash2017 - Tamir Dresher

Build Cloud Applications with Akka and Heroku
Build Cloud Applications with Akka and HerokuBuild Cloud Applications with Akka and Heroku
Build Cloud Applications with Akka and Heroku
Salesforce Developers
 
Akka london scala_user_group
Akka london scala_user_groupAkka london scala_user_group
Akka london scala_user_group
Skills Matter
 

Similar a From Zero to the Actor Model (With Akka.Net) - CodeMash2017 - Tamir Dresher (20)

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
 
Introduction to Akka - Atlanta Java Users Group
Introduction to Akka - Atlanta Java Users GroupIntroduction to Akka - Atlanta Java Users Group
Introduction to Akka - Atlanta Java Users Group
 
10-DesignPatterns.ppt
10-DesignPatterns.ppt10-DesignPatterns.ppt
10-DesignPatterns.ppt
 
Build Cloud Applications with Akka and Heroku
Build Cloud Applications with Akka and HerokuBuild Cloud Applications with Akka and Heroku
Build Cloud Applications with Akka and Heroku
 
From zero to hero with the actor model - Tamir Dresher - Odessa 2019
From zero to hero with the actor model  - Tamir Dresher - Odessa 2019From zero to hero with the actor model  - Tamir Dresher - Odessa 2019
From zero to hero with the actor model - Tamir Dresher - Odessa 2019
 
Reactiveness All The Way - SW Architecture 2015 Conference
Reactiveness All The Way - SW Architecture 2015 ConferenceReactiveness All The Way - SW Architecture 2015 Conference
Reactiveness All The Way - SW Architecture 2015 Conference
 
Evolution of Patterns
Evolution of PatternsEvolution of Patterns
Evolution of Patterns
 
Enterprise Software Architecture styles
Enterprise Software Architecture stylesEnterprise Software Architecture styles
Enterprise Software Architecture styles
 
Oop2011 actor presentation_stal
Oop2011 actor presentation_stalOop2011 actor presentation_stal
Oop2011 actor presentation_stal
 
DotNext 2020 - When and How to Use the Actor Model and Akka.NET
DotNext 2020 - When and How to Use the Actor Model and Akka.NETDotNext 2020 - When and How to Use the Actor Model and Akka.NET
DotNext 2020 - When and How to Use the Actor Model and Akka.NET
 
Azure Service Fabric and the Actor Model: when did we forget Object Orientation?
Azure Service Fabric and the Actor Model: when did we forget Object Orientation?Azure Service Fabric and the Actor Model: when did we forget Object Orientation?
Azure Service Fabric and the Actor Model: when did we forget Object Orientation?
 
Microservices Part 4: Functional Reactive Programming
Microservices Part 4: Functional Reactive ProgrammingMicroservices Part 4: Functional Reactive Programming
Microservices Part 4: Functional Reactive Programming
 
Akka london scala_user_group
Akka london scala_user_groupAkka london scala_user_group
Akka london scala_user_group
 
Building Reactive applications with Akka
Building Reactive applications with AkkaBuilding Reactive applications with Akka
Building Reactive applications with Akka
 
Akka Microservices Architecture And Design
Akka Microservices Architecture And DesignAkka Microservices Architecture And Design
Akka Microservices Architecture And Design
 
Reactive Programming or Reactive Systems? (spoiler: both)
Reactive Programming or Reactive Systems? (spoiler: both)Reactive Programming or Reactive Systems? (spoiler: both)
Reactive Programming or Reactive Systems? (spoiler: both)
 
Scale up your thinking
Scale up your thinkingScale up your thinking
Scale up your thinking
 
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
 
Reactive programming with akka
Reactive programming with akkaReactive programming with akka
Reactive programming with akka
 

Más de Tamir Dresher

Más de Tamir Dresher (20)

NET Aspire - NET Conf IL 2024 - Tamir Dresher.pdf
NET Aspire - NET Conf IL 2024 - Tamir Dresher.pdfNET Aspire - NET Conf IL 2024 - Tamir Dresher.pdf
NET Aspire - NET Conf IL 2024 - Tamir Dresher.pdf
 
Tamir Dresher - DotNet 7 What's new.pptx
Tamir Dresher - DotNet 7 What's new.pptxTamir Dresher - DotNet 7 What's new.pptx
Tamir Dresher - DotNet 7 What's new.pptx
 
Tamir Dresher - What’s new in ASP.NET Core 6
Tamir Dresher - What’s new in ASP.NET Core 6Tamir Dresher - What’s new in ASP.NET Core 6
Tamir Dresher - What’s new in ASP.NET Core 6
 
Tamir Dresher - Async Streams in C#
Tamir Dresher - Async Streams in C#Tamir Dresher - Async Streams in C#
Tamir Dresher - Async Streams in C#
 
Anatomy of a data driven architecture - Tamir Dresher
Anatomy of a data driven architecture - Tamir Dresher   Anatomy of a data driven architecture - Tamir Dresher
Anatomy of a data driven architecture - Tamir Dresher
 
Tamir Dresher Clarizen adventures with the wild GC during the holiday season
Tamir Dresher   Clarizen adventures with the wild GC during the holiday seasonTamir Dresher   Clarizen adventures with the wild GC during the holiday season
Tamir Dresher Clarizen adventures with the wild GC during the holiday season
 
Debugging tricks you wish you knew Tamir Dresher - Odessa 2019
Debugging tricks you wish you knew   Tamir Dresher - Odessa 2019Debugging tricks you wish you knew   Tamir Dresher - Odessa 2019
Debugging tricks you wish you knew Tamir Dresher - Odessa 2019
 
Tamir Dresher - Demystifying the Core of .NET Core
Tamir Dresher  - Demystifying the Core of .NET CoreTamir Dresher  - Demystifying the Core of .NET Core
Tamir Dresher - Demystifying the Core of .NET Core
 
Breaking the monolith to microservice with Docker and Kubernetes (k8s)
Breaking the monolith to microservice with Docker and Kubernetes (k8s)Breaking the monolith to microservice with Docker and Kubernetes (k8s)
Breaking the monolith to microservice with Docker and Kubernetes (k8s)
 
.Net december 2017 updates - Tamir Dresher
.Net december 2017 updates - Tamir Dresher.Net december 2017 updates - Tamir Dresher
.Net december 2017 updates - Tamir Dresher
 
Testing time and concurrency Rx
Testing time and concurrency RxTesting time and concurrency Rx
Testing time and concurrency Rx
 
Building responsive application with Rx - confoo - tamir dresher
Building responsive application with Rx - confoo - tamir dresherBuilding responsive application with Rx - confoo - tamir dresher
Building responsive application with Rx - confoo - tamir dresher
 
.NET Debugging tricks you wish you knew tamir dresher
.NET Debugging tricks you wish you knew   tamir dresher.NET Debugging tricks you wish you knew   tamir dresher
.NET Debugging tricks you wish you knew tamir dresher
 
Debugging tricks you wish you knew - Tamir Dresher
Debugging tricks you wish you knew  - Tamir DresherDebugging tricks you wish you knew  - Tamir Dresher
Debugging tricks you wish you knew - Tamir Dresher
 
Cloud patterns - NDC Oslo 2016 - Tamir Dresher
Cloud patterns - NDC Oslo 2016 - Tamir DresherCloud patterns - NDC Oslo 2016 - Tamir Dresher
Cloud patterns - NDC Oslo 2016 - Tamir Dresher
 
Rx 101 Codemotion Milan 2015 - Tamir Dresher
Rx 101   Codemotion Milan 2015 - Tamir DresherRx 101   Codemotion Milan 2015 - Tamir Dresher
Rx 101 Codemotion Milan 2015 - Tamir Dresher
 
Leveraging Dependency Injection(DI) in Universal Applications - Tamir Dresher
Leveraging Dependency Injection(DI) in Universal Applications -  Tamir DresherLeveraging Dependency Injection(DI) in Universal Applications -  Tamir Dresher
Leveraging Dependency Injection(DI) in Universal Applications - Tamir Dresher
 
Where Is My Data - ILTAM Session
Where Is My Data - ILTAM SessionWhere Is My Data - ILTAM Session
Where Is My Data - ILTAM Session
 
Azure Cloud Patterns
Azure Cloud PatternsAzure Cloud Patterns
Azure Cloud Patterns
 
Building services running on Microsoft Azure
Building services running on Microsoft AzureBuilding services running on Microsoft Azure
Building services running on Microsoft Azure
 

Último

CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Último (20)

Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 

From Zero to the Actor Model (With Akka.Net) - CodeMash2017 - Tamir Dresher

  • 1. 1 Tamir Dresher (@tamir_dresher) Senior Software Architect J From Zero to the Actor Model 1
  • 2. 2 • Author of Rx.NET in Action (manning publications) • Software architect, consultant and instructor • Software Engineering Lecturer @ Ruppin Academic Center @tamir_dresher tamirdr@codevalue.net http://www.TamirDresher.com. About Me
  • 3. Software Architecture is like Pasta 3By @benorama
  • 4. Agenda 1. Actor Model 2. Semiconductors 3. Metrology Target Designer (MTD) by KLA-Tencor 4. Rearchitecting to Actor Model with Akka.NET 4
  • 5. The Actor Model (Hewitt et al. 1973) 5 Alice Mailbox Bob Sally Mailbox Mailbox “the Actor model retained more of what I thought were the good features of the object idea.” Alan Kay Object Orientation pioneer and Smalltalk co-designer Alice Parent Bob Parent Sally Parent
  • 6. The future platform (Juval Löwy) 6
  • 7. Actors in Akka.NET public class CoordinatorActor : ReceiveActor { public CoordinatorActor() { Receive<StartSimulation>(start => { //Initiate a new simulation }); } } public class StartSimulation { public Guid ProjectId { get; set; } } 7
  • 9. Location Transparency (kind of…) Actors live inside an ActorSystem Each Actor has a unique address Local: akka://ActorSystem-A/user/A2 Remote: akka.tcp://ActorSystem-C@Machine-B:5678/user/C1 Machine A Machine B ActorSystem A A1 A2 ActorSystem B B1 B2 ActorSystem C C1 9
  • 10. Actor Model  Messaging  Decoupling Message passing yields decoupling Interesting messaging patterns are now available Alice Sally Bob Forwarding Alice Sally Bob Multiple Responses 10
  • 11. MTD Case Study Metrology Target Design 11
  • 12. KLA-Tencor Corporation is a leading supplier of process control and yield management solutions for the semiconductor and related microelectronics industries 12
  • 13. How chip is born UV Radiation 13
  • 16. MTD Original Architecture Technology B Services Technology A ServicesUI Clients Stack composer Material manager Simulation setup DOE generator Geometry Materials Simulation Results HTTP requests Notification hubSubscribe  Notify Notify Distribution Service Cluster Outgoing queue per simulation Incoming queue per simulation Simulation Coordinator Technology A Simulator Technology B Simulator otify 16
  • 17. MTD Challenges Long simulations PauseResumeStop lifecycle Simulation failures Extendibility New Technologies Configurable simulation tasks Scalability 17
  • 18. Actor Based Architecture - Hierarchy /user Simulation Coordinator Simulation Queue Simulation Notifier Technology A Coordinator Technology A Simulation Sub Simulation 1 Sub Simulation 2 Sub Simulation 3 Technology B Coordinator Technology B Simulation Sub Simulation 1 Sub Simulation 2 Sub Simulation 3 18
  • 19. Actor Based Architecture – Messages Flow WebApi Controller Simulation Coordinator 1.Start Simulation Queue 2.AddNew Simulation Notifier 4. SimulationStatusChanged 3.SimulationStatusChanged 5.SimulationStatusChanged [Technology] Coordinator [Technology] Simualtion (id=xxxx) 11.MarkStarted 12. SimulationStatusChanged SignalR 19
  • 20. Statefulness and Behavior switching Stateful is no longer a dirty word (kind of…) The less calls you have for the persistence store the better the performance will be Durability is a must (state-awareness) State goes hand-in-hand with supported behavior Actors have the power to switch their behaviors at any point in time. the actor becomes busy or the actor becomes connected. Which messages to Receive, Deny, Postpone (Stashing) State machine 20
  • 21. <configuration> <configSections> <section name="akka" type="Akka.Configuration.Hocon.AkkaConfigurationSection, Akka"/> </configSections> <akka> <hocon> <![CDATA[ akka { actor { provider = "Akka.Remote.RemoteActorRefProvider, Akka.Remote" } remote { helios.tcp { port = 8098 hostname = localhost } } [[> </hocon> </akka> </configuration> Remoting and Location Transparancy ActorSelection selection = sys.ActorSelection("akka.tcp://ActorSystem-C@Machine-B:5678/user/C1"); 21
  • 22. Routers http://getakka.net/docs/working-with-actors/Routers ConsistentHashing akka.actor.deployment { /workers { router = round-robin-group routees.paths = ["/user/workers/w1", "/user/workers/w2", "/user/workers/w3"] } } Broadcast RoundRobin var props = Props.Create<Worker>().WithRouter(FromConfig.Instance); IActroRef actor = system.ActorOf(props, "workers"); 22
  • 23. Routing to Remote Actors 23 <hocon> <![CDATA[ akka { actor { provider = "Akka.Remote.RemoteActorRefProvider, Akka.Remote" deployment { /Technologies { router = broadcast-group routees.paths = ["akka.tcp://TechnologyA@localhost:8091/user/coordinator"] } } } : : } ]]> </hocon> IActroRef technologies = _system.ActorOf(Props.Empty.WithRouter(FromConfig.Instance), "Technologies");
  • 24. Final thoughts Testing – easier sometimes, harder sometimes Dependency injection – injecting ActorRefsActorSelections is not intuitive Runtime contract vs. compile-time contract Your messages are the contract Messages versioning should be considered up-front 24
  • 25. Summary 1. Actor Model 2. Semi conductor 3. Metrology Target Designer (MTD) by KLA-Tencor 4. Rearchitecting to Actor Model with Akka.NET 25
  • 26. https://www.manning.com/books/ rx-dot-net-in-action www.manning.com/books/ reactive-applications-with-akka-net Discount code: ctwcodemash17 Thank You Tamir Dresher (@tamir_dresher) http://getakka.net/ https://github.com/akkadotnet/akka.net 26

Notas del editor

  1. My name is tamir dresher Im an architect from codevalue israel and a software engineering lecturer at the ruppin academic center CodeValue is a consulting company and we are also the proud development center of OzCode the amazing debugging extension for visual studio. We have a booth here at conference, so please go and check it out, youll be amazed how you lived without it. My book Rx in action is now available at Manning early access program should be published in the next few months. And that the end of my self promotion(it never hurts right?). So what are we really here for?
  2. ארכיטקטורת תוכנה היא נורא דומה לפסטה ואפשר לראות את ההתפתחות שלנו כתעשיה בוסג הפסטה שאנחנו משתמשים בהתחלה כולנו כתבנו ספגטי קוד עם GOTO ואז למדנו שאי אפשר אפילו להבין ולתחזק את מה שאנחנו כתבנו אז עברנו למודל הלזניה והתחלנו לכתוב הכל בשכבות ואז ראינו שלהכין את הלזניה כחתיכה אחת זה לא מספיק טוב, בטח כשיש לנו המון סועדים ועדיף לנו לחלק אותה לחתיכות קטנות יותר מה שיצר את מודל הרביולי – אותם microservices שהם הBUZZWORD שכולם נהנים להגיד איך שלא יהיה, בסופו של דבר יש לנו משתמש שנמצא בקצה אחד שרוצה לקבל שירות, בין אם המשתמש אנושי או מערכת אחרת. והמטרה הסופית שלנו כשעשינו את המערכת זה שהיא תדע להגיב כמו כן אני מרצה במרכז האקדמי רופין אחד הbuzzwords שאנחנו שומעים יותר ויותר בשנים האחרונות הוא נושא ה Reactiveness של מערכות ושל אפליקציות ובשפות תכנות באופן כללי. גם אותי זה נורא הלהיב, ובפרט הטכנולוגיה שנקראת זה הלהיב אותי כל כך שכתבתי ספר בנושא Reactive Extensions in Action בהוצאת manning קצת Self Promotion לא הזיק אבל בוא נקח רגע צעד אחורה ונסתכל על האבולוציה של הארכיטקטורות שלנו
  3. מודל נוסף שמקיים את הדרישות של ארכיטקטורה שהיא reactive הוא הActor model הוצג ע"י Carl Hewitt ב1973
  4. Actors are just classes like you normally write. The only difference here is that it derives from the RecieveActor base class This give our CoordinatorActor in this case the ability to receive and react to messages. Messages are also simple classes, they are POCO that will be serialized when between the actors
  5. The amount of concurrent simulations vs available clusters is virtually non-controlable
  6. Pools Router "Pools" are routers that create their own worker actors, that is; you provide the number of instances as a parameter to the router and the router will handle routee creation by itself. Groups Sometimes, rather than having the router actor create its routees, it is desirable to create routees yourself and provide them to the router for its use. You can do this by passing the paths of the routees to the router's configuration. Messages will be sent with ActorSelection to these paths.