Soumettre la recherche
Mettre en ligne
Akka fsm presentation
•
2 j'aime
•
712 vues
PrasannaKumar Sathyanarayanan
Suivre
akka fsm talk given on Glassbeam
Lire moins
Lire la suite
Technologie
Formation
Signaler
Partager
Signaler
Partager
1 sur 14
Télécharger maintenant
Télécharger pour lire hors ligne
Recommandé
Cps (continuation passing style) in scala
Cps (continuation passing style) in scala
PrasannaKumar Sathyanarayanan
Jvm Language Summit Rose 20081016
Jvm Language Summit Rose 20081016
Eduardo Pelegri-Llopart
Finagle - an intro to rpc & a sync programming in jvm
Finagle - an intro to rpc & a sync programming in jvm
PrasannaKumar Sathyanarayanan
Akka introtalk HyScala DEC 2016
Akka introtalk HyScala DEC 2016
PrasannaKumar Sathyanarayanan
Introduction to akka chense
Introduction to akka chense
PrasannaKumar Sathyanarayanan
Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012
Leonardo Borges
Polyglot JVM
Polyglot JVM
Arturo Herrero
Async Microservices with Twitter's Finagle
Async Microservices with Twitter's Finagle
Vladimir Kostyukov
Recommandé
Cps (continuation passing style) in scala
Cps (continuation passing style) in scala
PrasannaKumar Sathyanarayanan
Jvm Language Summit Rose 20081016
Jvm Language Summit Rose 20081016
Eduardo Pelegri-Llopart
Finagle - an intro to rpc & a sync programming in jvm
Finagle - an intro to rpc & a sync programming in jvm
PrasannaKumar Sathyanarayanan
Akka introtalk HyScala DEC 2016
Akka introtalk HyScala DEC 2016
PrasannaKumar Sathyanarayanan
Introduction to akka chense
Introduction to akka chense
PrasannaKumar Sathyanarayanan
Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012
Leonardo Borges
Polyglot JVM
Polyglot JVM
Arturo Herrero
Async Microservices with Twitter's Finagle
Async Microservices with Twitter's Finagle
Vladimir Kostyukov
Websocket,JSON in JEE7
Websocket,JSON in JEE7
PrasannaKumar Sathyanarayanan
Scala Introduction with play - for my CSS nerds
Scala Introduction with play - for my CSS nerds
PrasannaKumar Sathyanarayanan
CDI in JEE6
CDI in JEE6
PrasannaKumar Sathyanarayanan
Ejb3.1
Ejb3.1
PrasannaKumar Sathyanarayanan
Producer consumerproblem
Producer consumerproblem
PrasannaKumar Sathyanarayanan
Scala presentationjune112011
Scala presentationjune112011
PrasannaKumar Sathyanarayanan
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
apidays
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Enterprise Knowledge
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
apidays
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Antenna Manufacturer Coco
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
hans926745
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Martijn de Jong
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
jfdjdjcjdnsjd
Contenu connexe
Plus de PrasannaKumar Sathyanarayanan
Websocket,JSON in JEE7
Websocket,JSON in JEE7
PrasannaKumar Sathyanarayanan
Scala Introduction with play - for my CSS nerds
Scala Introduction with play - for my CSS nerds
PrasannaKumar Sathyanarayanan
CDI in JEE6
CDI in JEE6
PrasannaKumar Sathyanarayanan
Ejb3.1
Ejb3.1
PrasannaKumar Sathyanarayanan
Producer consumerproblem
Producer consumerproblem
PrasannaKumar Sathyanarayanan
Scala presentationjune112011
Scala presentationjune112011
PrasannaKumar Sathyanarayanan
Plus de PrasannaKumar Sathyanarayanan
(6)
Websocket,JSON in JEE7
Websocket,JSON in JEE7
Scala Introduction with play - for my CSS nerds
Scala Introduction with play - for my CSS nerds
CDI in JEE6
CDI in JEE6
Ejb3.1
Ejb3.1
Producer consumerproblem
Producer consumerproblem
Scala presentationjune112011
Scala presentationjune112011
Dernier
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
apidays
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Enterprise Knowledge
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
apidays
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Antenna Manufacturer Coco
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
hans926745
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Martijn de Jong
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
jfdjdjcjdnsjd
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Product Anonymous
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
Khem
Dernier
(20)
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
Akka fsm presentation
1.
FINITESTATEMACHINES (FSM) WITHAKKAACTORS WRITINGANDUNITTESTING'EM "LIGHTNINGTALK"BYPRASANNAKUMAR
2.
WHATISFSM? whenaprogramisinastateSandan eventEoccursthendoanactionAand changetoanotherstateS1 Iftheabovesoundstootheoriticaltounderstand....
3.
IMAGINEATRAFFICSIGNAL hopeyoucouldunderstand!!!
4.
WHYDOWENEEDFSM? ATLEASTFORUS... ModelandExecuteRules(weareusingit!!!) Simulations Automatabasedprogramming
5.
WHYTHISPRESENTATION IwanttolearnFSM
6.
"FSM"FROMAKKAPERSPECTIVE State Data MessagestotheactorisanalogoustoEvents Actorabstractionitself sealedtraitFSMSignal caseclassSignalColorData classSignalChangeFSMActorextendsActor withFSM[FSMSignal,SignalColorData]{ ..... }
7.
LET'SMODELFSM //state- sealedtraitFSMSignal caseobjectRedSignalextendsFSMSignal caseobjectYellowSignalextendsFSMSignal caseobjectGreenSignalextendsFSMSignal //data caseclassSignalColorData //event caseobjectChangeSignal caseobjectRetainSignal
8.
ACTORCODE classSignalChangeFSMActorextendsActorwithFSM[FSMSignal,SignalColorData]{ //initialstateofFSM startWith(RedSignal,SignalColorData()) when(RedSignal){ caseEvent(ChangeSignal,_)=>goto(YellowSignal) caseEvent(RetainSignal,_)=>stay } when(YellowSignal){ caseEvent(ChangeSignal,_)=>goto(GreenSignal) caseEvent(RetainSignal,_)=> stay }
9.
CONTD... when(GreenSignal){ caseEvent(ChangeSignal,_)=>goto(RedSignal) caseEvent(RetainSignal,_)=> stay } onTransition{ caseRedSignal->YellowSignal=>println("Changingfromredtoyellowsignal-getr caseYellowSignal->GreenSignal=>println("Changingfromyellowtogreensignal-w caseGreenSignal->RedSignal=>println("Changingfromgreentoredsignal-stop!! } initialize }
10.
UNITTESTINGFSMACTORSWITH classFSMActorTest(as:ActorSystem)extendsTestKit(as) withImplicitSender withWordSpecLike withMatchers withBeforeAndAfterAll{ //allourtestcases }
11.
valfsmRef=TestFSMRef(newSignalChangeFSMActor) defthis()=this(ActorSystem("FSMActorSystem")) "OursignalemulatingFSMActor"must{ "beredatinitialstage"in{ assert(fsmRef.stateName==RedSignal) assert(fsmRef.stateData==SignalColorData()) } "changetoyellowafterAlternateColoureventoccured"in{ fsmRef!ChangeSignal//sendaneventtoFSM assert(fsmRef.stateName==YellowSignal) assert(fsmRef.stateData==SignalColorData()) } "changetogreenafterAlternateColoureventoccured"in{ fsmRef!ChangeSignal assert(fsmRef.stateName==GreenSignal) assert(fsmRef.stateData==SignalColorData()) } "retainshouldnotchangethefsmstate"in{ fsmRef!RetainSignal assert(fsmRef.stateName==GreenSignal) assert(fsmRef.stateData==SignalColorData()) } } overridedefafterAll={ println("trafficisclearnow-obeytrafficrules") }
12.
SESSIONTAKEAWAY Code:-https://github.com/prassee/FSMExperiment
13.
HOWIMADETHISPRESENTATION? HTML5 CSS3 Presentation:-reveal.js Imagescourtesy:-googleimagesearch:) ThispresentationisCCLlicensed-feelfreetomodify
14.
THANKS:)
Télécharger maintenant