SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

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
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
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
 
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 CCTVshikhaohhpro
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
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
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxalwaysnagaraju26
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
+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
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
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
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456KiaraTiradoMicha
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 

Dernier (20)

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
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
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 🔝✔️✔️
 
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
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
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
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.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...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
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
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 

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

Notes de l'éditeur

  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