SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Powering a Live Escape Game
with ECF and e(fx)clipse
Building a bomb disarming simulation
Live Escape Game
• Played as a team
• You must be physically present
• You have 1 hour time
• to solve a chain of puzzles
Great place to use IoT technologies to
create cool interactive puzzle gadgets!
int a = LocalDate.now().getMonthValue();
Which cables need to be cut?
Every cable has a unique number:
5 = ORANGE
15 = WHITE
30 = BLACK
40 = BLUE
50 = YELLOW
Cut the correct cables to
disarm the bomb!
Java 8
Fingerprint Scanner
Touch Sensor (FSR)
Magnetic Sensor
(Reed)Magnet
“Fingerprint Scanner”
int c = Character.getNumericValue(System.getProperty("java.version").charAt(0));
Bomb Gadget Hardware
Sensors
• Touch and magnetic sensors (fake “fingerprint scanner”)
• Magnetic lid sensor (turn on lights, lock lid)
• 5 Cables (disarm or detonate bomb)
Actors
• Fingerprint LEDs (red and green) – 5V (via Output)
• Lid lock: electromagnet – 12V (via Relay)
• LED lights – 12V (via Relay)
int e = Integer.valueOf(System.getProperty("java.version").charAt(1)).intValue();
Simple Gadget Setup
Hardware
• Raspberry Pi 2 or 3
• PiFace Digital 2 (optional)
• Sensors (Input)
• Actors (Output)
Software
• Equinox gateway application
• Pi4J library (API for PiFace)
• ECF Remote Services
int e = Integer.valueOf(System.getProperty("java.version").charAt(1)).intValue();
System Architecture
Communication lines between all the components with
OSGi remote services
One Service for every Input (Sensor) and Output (Actor)
Bomb
Monitor
Operator
Tool
Gadget 4Gadget 3Gadget 2
Bomb
Gadget
int d = LocalDate.now().getEra().toString().length();
What is an OSGi Service?
To create an OSGi
service:
• Define the interface
• Create interface
implementation
• Use DS to register
the implementation
• or BundleContext.
registerService(…)
int a = LocalDate.now().getMonthValue();
Register a Remote Service
To turn a local service into a remote service
register the service through the API (or use DS)
with remote configuration properties
int d = LocalDate.now().getEra().toString().length();
Remote Services
Why I love OSGi remote services
• Type safe development
• Loosely coupled architecture
• No central server (dependencies by design)
• Dynamic (services may come and go)
• Protocol independent
• Easy testing through mocking
int b = Double.valueOf(System.getProperty("java.class.version")).intValue();
ECF
• Pluggable distribution providers
(generic, r-osgi, JMS, MQTT, REST, …)
• Pluggable discovery providers
(Zeroconf, Etcd, Zookeeper, SLP, …)
• Asynchronous remote services
int c = Character.getNumericValue(System.getProperty("java.version").charAt(0));
• Goal: Quickly create new gadgets (or easily move Sensors and
Actors between gadgets)
•  A framework to easily create the gateway software
int a = LocalDate.now().getMonthValue();
Gadget Service Architecture
Every service has a unique
name to identify it
This Ecore diagram is used for presentation purposes only. No EMF model code generation …
int cable1 = b - c - e; int d = LocalDate.now().getEra().toString().length();
Gadget Service Architecture
Remote
control
This Ecore diagram is used for presentation purposes only. No EMF model code generation …
int cable1 = b - c - e; int d = LocalDate.now().getEra().toString().length();
Information
Gadget Service Architecture
Whiteboard
Pattern
This Ecore diagram is used for presentation purposes only. No EMF model code generation …
int cable2 = e - a + d * d; int a = LocalDate.now().getMonthValue();
Sniffers
Whiteboard Pattern
• The sniffer is
registered as a remote
OSGi service
• by the party that is
interested in receiving
change notifications
• The gadget will pick
up the service
• and start sending
notifications
• if connect() returns
true
int c = Character.getNumericValue(System.getProperty("java.version").charAt(0));
Operator Tool
Application for the operator of the game
• Observe the state of the sensors and actors
• Disable rogue sensors
• Manually trigger actors
• Manage game and timer
• Display hints in case players are stuck
int c = Character.getNumericValue(System.getProperty("java.version").charAt(0));
Operator Tool
InputService
OutputService
IOSniffer
• Registers Input-
and OutputSniffers
(Whiteboard
Pattern)
• Consumes Input-
and OutputServices
int d = LocalDate.now().getEra().toString().length();
Bomb Monitor
Game Timer
Reaction to
Sensors
Animations & Sound effects
int d = LocalDate.now().getEra().toString().length();
UI Design in SceneBuilder
int cable1 = b - c - e;
OSGi + JavaFX =
OSGi + JavaFX
• Equinox runtime
• JavaFX UI
• Eclipse DI
• E(fx)clipse Core APIs
(i.e. type safe EventBus)
int b = Double.valueOf(System.getProperty("java.class.version")).intValue();
Consume OSGi Services
1. org.osgi.util.tracker.
ServiceTracker API
2. Declarative Service (DS)
Dependency
3. @Inject with Eclipse DI
(not dynamic)
4. @Inject @Service with
efxclipse (dynamic)
5. org.eclipse.fx.core.Util.
lookupService(…)
(ServiceUtil since 2.5)
int e = Integer.valueOf(System.getProperty("java.version").charAt(1)).intValue();
Project Wizard Options
e4 FX Application FX-OSGi Application
• with Eclipse DI
int b = Double.valueOf(System.getProperty("java.class.version")).intValue();
Game Service and Sniffer
OSGi Services
• Bomb Monitor
registers InputSniffers
to get informed of
sensors state changes
• Uses GameService
internally when sniffed
sensors change state
• Registers
GameService for
remote use from the
operator application
• Consumes
GameSniffers to
inform them of game
state changes
Whiteboard Pattern
int e = Integer.valueOf(System.getProperty("java.version").charAt(1)).intValue();
Hint Display
Application to show the game time and hints in case the
players are stuck
int cable1 = b - c - e;
Hint Display
Use GameService internally to create test controls
(no need to fire up the operator to test the animations)
int cable2 = e - a + d * d;
Operator Tool
Consumes for DisplayServices and creates UI dynamically
int cable2 = e - a + d * d;
Simulation Prototype
Cut the correct cables to
disarm the bomb!
Every cable has a unique number:
5 = ORANGE
15 = WHITE
30 = BLACK
40 = BLUE
50 = YELLOW
Java 8
DISARM IT!
Powering a live escape game with ecf and efxclipse

Weitere ähnliche Inhalte

Andere mochten auch

Improving fieldwork with GIS (EGU 2016_
Improving fieldwork with GIS (EGU 2016_Improving fieldwork with GIS (EGU 2016_
Improving fieldwork with GIS (EGU 2016_Wouter Marra
 
power point paolacañas
 power point paolacañas power point paolacañas
power point paolacañaspaolacanyas
 
Let's go outside - project overview (18 okt)
Let's go outside - project overview (18 okt)Let's go outside - project overview (18 okt)
Let's go outside - project overview (18 okt)Wouter Marra
 
Discurso demagógico eh introduccion a la redaccion
Discurso demagógico eh introduccion a la redaccionDiscurso demagógico eh introduccion a la redaccion
Discurso demagógico eh introduccion a la redaccionmiguel angel cueva tacuri
 
Castellers de vilafranca del penedès
Castellers de vilafranca del penedèsCastellers de vilafranca del penedès
Castellers de vilafranca del penedèspaolacanyas
 
Open Access - Sunalliance Energy
Open Access - Sunalliance EnergyOpen Access - Sunalliance Energy
Open Access - Sunalliance EnergyAmit Gor
 
Clothing manufacturer - from Bulgaria
Clothing manufacturer - from BulgariaClothing manufacturer - from Bulgaria
Clothing manufacturer - from Bulgariabagirella
 

Andere mochten auch (13)

Improving fieldwork with GIS (EGU 2016_
Improving fieldwork with GIS (EGU 2016_Improving fieldwork with GIS (EGU 2016_
Improving fieldwork with GIS (EGU 2016_
 
Internet
InternetInternet
Internet
 
power point paolacañas
 power point paolacañas power point paolacañas
power point paolacañas
 
Let's go outside - project overview (18 okt)
Let's go outside - project overview (18 okt)Let's go outside - project overview (18 okt)
Let's go outside - project overview (18 okt)
 
Discurso demagógico eh introduccion a la redaccion
Discurso demagógico eh introduccion a la redaccionDiscurso demagógico eh introduccion a la redaccion
Discurso demagógico eh introduccion a la redaccion
 
Castellers de vilafranca del penedès
Castellers de vilafranca del penedèsCastellers de vilafranca del penedès
Castellers de vilafranca del penedès
 
Internet
InternetInternet
Internet
 
Ortografía y Redacción
 Ortografía y Redacción Ortografía y Redacción
Ortografía y Redacción
 
Tópico-Redacción y Oratoria
Tópico-Redacción y OratoriaTópico-Redacción y Oratoria
Tópico-Redacción y Oratoria
 
Open Access - Sunalliance Energy
Open Access - Sunalliance EnergyOpen Access - Sunalliance Energy
Open Access - Sunalliance Energy
 
Clothing manufacturer - from Bulgaria
Clothing manufacturer - from BulgariaClothing manufacturer - from Bulgaria
Clothing manufacturer - from Bulgaria
 
Reredaccion
Reredaccion Reredaccion
Reredaccion
 
V9n2a02
V9n2a02V9n2a02
V9n2a02
 

Ähnlich wie Powering a live escape game with ecf and efxclipse

How to diffuse a bomb with ecf and efxclipse
How to diffuse a bomb with ecf and efxclipseHow to diffuse a bomb with ecf and efxclipse
How to diffuse a bomb with ecf and efxclipseChristoph Keimel
 
Internet of Things Magic Show
Internet of Things Magic ShowInternet of Things Magic Show
Internet of Things Magic ShowStephen Chin
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsSerge Stinckwich
 
2012 star west-t10
2012 star west-t102012 star west-t10
2012 star west-t10Eing Ong
 
The not so short introduction to Kinect
The not so short introduction to KinectThe not so short introduction to Kinect
The not so short introduction to KinectAXM
 
FPGA_prototyping proccesing with conclusion
FPGA_prototyping proccesing with conclusionFPGA_prototyping proccesing with conclusion
FPGA_prototyping proccesing with conclusionPersiPersi1
 
Introduction to the Unreal Development Kit
Introduction to the Unreal Development KitIntroduction to the Unreal Development Kit
Introduction to the Unreal Development KitNick Pruehs
 
The next generation of GPU APIs for Game Engines
The next generation of GPU APIs for Game EnginesThe next generation of GPU APIs for Game Engines
The next generation of GPU APIs for Game EnginesPooya Eimandar
 
IonMonkey Mozilla All-Hands 2011
IonMonkey Mozilla All-Hands 2011IonMonkey Mozilla All-Hands 2011
IonMonkey Mozilla All-Hands 2011iamdvander
 
Using the Kinect for Fun and Profit by Tam Hanna
Using the Kinect for Fun and Profit by Tam HannaUsing the Kinect for Fun and Profit by Tam Hanna
Using the Kinect for Fun and Profit by Tam HannaCodemotion
 
Tools and Techniques for Understanding Threading Behavior in Android
Tools and Techniques for Understanding Threading Behavior in AndroidTools and Techniques for Understanding Threading Behavior in Android
Tools and Techniques for Understanding Threading Behavior in AndroidIntel® Software
 
Socketプログラム Silverlight for Windows Phoneへの移植のポイント
Socketプログラム Silverlight for Windows Phoneへの移植のポイントSocketプログラム Silverlight for Windows Phoneへの移植のポイント
Socketプログラム Silverlight for Windows Phoneへの移植のポイントShin Ise
 
The not so short
The not so shortThe not so short
The not so shortAXM
 
Introduction to wave engine
Introduction to wave engineIntroduction to wave engine
Introduction to wave enginewaveengineteam
 
Little bits & node.js IOT for beginner
Little bits & node.js IOT for beginnerLittle bits & node.js IOT for beginner
Little bits & node.js IOT for beginnerMichele Capra
 
JavaFX - Next Generation Java UI
JavaFX - Next Generation Java UIJavaFX - Next Generation Java UI
JavaFX - Next Generation Java UIYoav Aharoni
 

Ähnlich wie Powering a live escape game with ecf and efxclipse (20)

How to diffuse a bomb with ecf and efxclipse
How to diffuse a bomb with ecf and efxclipseHow to diffuse a bomb with ecf and efxclipse
How to diffuse a bomb with ecf and efxclipse
 
Internet of Things Magic Show
Internet of Things Magic ShowInternet of Things Magic Show
Internet of Things Magic Show
 
Kinect de-theremin
Kinect de-thereminKinect de-theremin
Kinect de-theremin
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
 
XRobots
XRobotsXRobots
XRobots
 
2012 star west-t10
2012 star west-t102012 star west-t10
2012 star west-t10
 
Abc2011 yagi
Abc2011 yagiAbc2011 yagi
Abc2011 yagi
 
The not so short introduction to Kinect
The not so short introduction to KinectThe not so short introduction to Kinect
The not so short introduction to Kinect
 
FPGA_prototyping proccesing with conclusion
FPGA_prototyping proccesing with conclusionFPGA_prototyping proccesing with conclusion
FPGA_prototyping proccesing with conclusion
 
Introduction to the Unreal Development Kit
Introduction to the Unreal Development KitIntroduction to the Unreal Development Kit
Introduction to the Unreal Development Kit
 
The next generation of GPU APIs for Game Engines
The next generation of GPU APIs for Game EnginesThe next generation of GPU APIs for Game Engines
The next generation of GPU APIs for Game Engines
 
IonMonkey Mozilla All-Hands 2011
IonMonkey Mozilla All-Hands 2011IonMonkey Mozilla All-Hands 2011
IonMonkey Mozilla All-Hands 2011
 
Using the Kinect for Fun and Profit by Tam Hanna
Using the Kinect for Fun and Profit by Tam HannaUsing the Kinect for Fun and Profit by Tam Hanna
Using the Kinect for Fun and Profit by Tam Hanna
 
Tools and Techniques for Understanding Threading Behavior in Android
Tools and Techniques for Understanding Threading Behavior in AndroidTools and Techniques for Understanding Threading Behavior in Android
Tools and Techniques for Understanding Threading Behavior in Android
 
Socketプログラム Silverlight for Windows Phoneへの移植のポイント
Socketプログラム Silverlight for Windows Phoneへの移植のポイントSocketプログラム Silverlight for Windows Phoneへの移植のポイント
Socketプログラム Silverlight for Windows Phoneへの移植のポイント
 
The not so short
The not so shortThe not so short
The not so short
 
Introduction to wave engine
Introduction to wave engineIntroduction to wave engine
Introduction to wave engine
 
Introduction to wave engine
Introduction to wave engineIntroduction to wave engine
Introduction to wave engine
 
Little bits & node.js IOT for beginner
Little bits & node.js IOT for beginnerLittle bits & node.js IOT for beginner
Little bits & node.js IOT for beginner
 
JavaFX - Next Generation Java UI
JavaFX - Next Generation Java UIJavaFX - Next Generation Java UI
JavaFX - Next Generation Java UI
 

Kürzlich hochgeladen

OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 

Kürzlich hochgeladen (20)

OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 

Powering a live escape game with ecf and efxclipse

  • 1. Powering a Live Escape Game with ECF and e(fx)clipse Building a bomb disarming simulation
  • 2. Live Escape Game • Played as a team • You must be physically present • You have 1 hour time • to solve a chain of puzzles Great place to use IoT technologies to create cool interactive puzzle gadgets! int a = LocalDate.now().getMonthValue();
  • 3. Which cables need to be cut? Every cable has a unique number: 5 = ORANGE 15 = WHITE 30 = BLACK 40 = BLUE 50 = YELLOW Cut the correct cables to disarm the bomb! Java 8
  • 4. Fingerprint Scanner Touch Sensor (FSR) Magnetic Sensor (Reed)Magnet “Fingerprint Scanner” int c = Character.getNumericValue(System.getProperty("java.version").charAt(0));
  • 5. Bomb Gadget Hardware Sensors • Touch and magnetic sensors (fake “fingerprint scanner”) • Magnetic lid sensor (turn on lights, lock lid) • 5 Cables (disarm or detonate bomb) Actors • Fingerprint LEDs (red and green) – 5V (via Output) • Lid lock: electromagnet – 12V (via Relay) • LED lights – 12V (via Relay) int e = Integer.valueOf(System.getProperty("java.version").charAt(1)).intValue();
  • 6. Simple Gadget Setup Hardware • Raspberry Pi 2 or 3 • PiFace Digital 2 (optional) • Sensors (Input) • Actors (Output) Software • Equinox gateway application • Pi4J library (API for PiFace) • ECF Remote Services int e = Integer.valueOf(System.getProperty("java.version").charAt(1)).intValue();
  • 7. System Architecture Communication lines between all the components with OSGi remote services One Service for every Input (Sensor) and Output (Actor) Bomb Monitor Operator Tool Gadget 4Gadget 3Gadget 2 Bomb Gadget int d = LocalDate.now().getEra().toString().length();
  • 8. What is an OSGi Service? To create an OSGi service: • Define the interface • Create interface implementation • Use DS to register the implementation • or BundleContext. registerService(…) int a = LocalDate.now().getMonthValue();
  • 9. Register a Remote Service To turn a local service into a remote service register the service through the API (or use DS) with remote configuration properties int d = LocalDate.now().getEra().toString().length();
  • 10. Remote Services Why I love OSGi remote services • Type safe development • Loosely coupled architecture • No central server (dependencies by design) • Dynamic (services may come and go) • Protocol independent • Easy testing through mocking int b = Double.valueOf(System.getProperty("java.class.version")).intValue();
  • 11. ECF • Pluggable distribution providers (generic, r-osgi, JMS, MQTT, REST, …) • Pluggable discovery providers (Zeroconf, Etcd, Zookeeper, SLP, …) • Asynchronous remote services int c = Character.getNumericValue(System.getProperty("java.version").charAt(0));
  • 12. • Goal: Quickly create new gadgets (or easily move Sensors and Actors between gadgets) •  A framework to easily create the gateway software int a = LocalDate.now().getMonthValue();
  • 13. Gadget Service Architecture Every service has a unique name to identify it This Ecore diagram is used for presentation purposes only. No EMF model code generation … int cable1 = b - c - e; int d = LocalDate.now().getEra().toString().length();
  • 14. Gadget Service Architecture Remote control This Ecore diagram is used for presentation purposes only. No EMF model code generation … int cable1 = b - c - e; int d = LocalDate.now().getEra().toString().length(); Information
  • 15. Gadget Service Architecture Whiteboard Pattern This Ecore diagram is used for presentation purposes only. No EMF model code generation … int cable2 = e - a + d * d; int a = LocalDate.now().getMonthValue();
  • 16. Sniffers Whiteboard Pattern • The sniffer is registered as a remote OSGi service • by the party that is interested in receiving change notifications • The gadget will pick up the service • and start sending notifications • if connect() returns true int c = Character.getNumericValue(System.getProperty("java.version").charAt(0));
  • 17. Operator Tool Application for the operator of the game • Observe the state of the sensors and actors • Disable rogue sensors • Manually trigger actors • Manage game and timer • Display hints in case players are stuck int c = Character.getNumericValue(System.getProperty("java.version").charAt(0));
  • 18. Operator Tool InputService OutputService IOSniffer • Registers Input- and OutputSniffers (Whiteboard Pattern) • Consumes Input- and OutputServices int d = LocalDate.now().getEra().toString().length();
  • 19. Bomb Monitor Game Timer Reaction to Sensors Animations & Sound effects int d = LocalDate.now().getEra().toString().length();
  • 20. UI Design in SceneBuilder int cable1 = b - c - e;
  • 21. OSGi + JavaFX = OSGi + JavaFX • Equinox runtime • JavaFX UI • Eclipse DI • E(fx)clipse Core APIs (i.e. type safe EventBus) int b = Double.valueOf(System.getProperty("java.class.version")).intValue();
  • 22. Consume OSGi Services 1. org.osgi.util.tracker. ServiceTracker API 2. Declarative Service (DS) Dependency 3. @Inject with Eclipse DI (not dynamic) 4. @Inject @Service with efxclipse (dynamic) 5. org.eclipse.fx.core.Util. lookupService(…) (ServiceUtil since 2.5) int e = Integer.valueOf(System.getProperty("java.version").charAt(1)).intValue();
  • 23. Project Wizard Options e4 FX Application FX-OSGi Application • with Eclipse DI int b = Double.valueOf(System.getProperty("java.class.version")).intValue();
  • 24. Game Service and Sniffer OSGi Services • Bomb Monitor registers InputSniffers to get informed of sensors state changes • Uses GameService internally when sniffed sensors change state • Registers GameService for remote use from the operator application • Consumes GameSniffers to inform them of game state changes Whiteboard Pattern int e = Integer.valueOf(System.getProperty("java.version").charAt(1)).intValue();
  • 25. Hint Display Application to show the game time and hints in case the players are stuck int cable1 = b - c - e;
  • 26. Hint Display Use GameService internally to create test controls (no need to fire up the operator to test the animations) int cable2 = e - a + d * d;
  • 27. Operator Tool Consumes for DisplayServices and creates UI dynamically int cable2 = e - a + d * d;
  • 28. Simulation Prototype Cut the correct cables to disarm the bomb! Every cable has a unique number: 5 = ORANGE 15 = WHITE 30 = BLACK 40 = BLUE 50 = YELLOW Java 8

Hinweis der Redaktion

  1. Simple logic, like “turn on the red light, when the touch sensor is pressed but the magnetic sensor is off” can be implemented on the device directly. But often enough, this information needs to be accessible remotely. Let’s take a step back and look at the big picture.
  2. Simple logic, like “turn on the red light, when the touch sensor is pressed but the magnetic sensor is off” can be implemented on the device directly. But often enough, this information needs to be accessible remotely. Let’s take a step back and look at the big picture.
  3. 7 Inputs 7 Outputs 5V 2 Relays (up to 20V) No soldering!
  4. Gadget: Sensors and actors Application: Graphics and sounds It’s a game, so an agile development approach is necessary. We want to be able to change this quickly: Move services from one device to another Introduce new services and/or new devices Change the game logic
  5. The distribution provider is responsible for the actual marshalling/serialization and network communication that takes place when a consumer invokes a method on a remote service The discovery provider is responsible to publish, find and register remote services
  6. Used the Ecore diagram editor to visualize the interface relationships. No EMF model is generated from this.
  7. Used the Ecore diagram editor to visualize the interface relationships. No EMF model is generated from this.
  8. Used the Ecore diagram editor to visualize the interface relationships. No EMF model is generated from this.
  9. This Sniffer is used by the bomb monitor application
  10. FX-E4 Application
  11. This can potentially be a very media enabled application. JavaFX seems a no-brainer in this situation. JavaFX + OSGi = e(fx)clipse
  12. Bomb monitor application can be in different states, depending on the observed (sniffed) sensor states.
  13. Bomb monitor application can be in different states, depending on the observed (sniffed) sensor states.
  14. Used the Ecore diagram editor to visualize the interface relationships. No EMF model is generated from this.
  15. FX-E4 Application