SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

Destacado

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
 

Destacado (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
 

Similar a 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
 

Similar a 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
 

Último

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 ...OnePlan Solutions
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
+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
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
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 Modelsaagamshah0812
 
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.comFatema Valibhai
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
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...ICS
 

Último (20)

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
 
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 ...
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
+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...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
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
 
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
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
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...
 

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

Notas del editor

  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