SlideShare a Scribd company logo
Orion Context Broker Exercises
(PART I)
Contact twitter
@marivibriz
Contact email
mariavirtudes.brizruiz@telefonica.com
Outline
• CB-1. Create entities using standard ops
• CB-2. Query entities using standard ops
• CB-3. Update entity using standard ops
• CB-4. Create entities using conv ops
• CB-5. Query entities using conv ops
• CB-6. Update entity using conv ops
• CB-7. Browsing entity types
• CB-8. Basic subscription/notifications
2
CB-1. Create entities using standard ops
• Steps
– Create the following entities in your Orion
instance
• See table in next slide
• Hints
– Orion User Manual section 3.3.1.1
(UpdateContext & APPEND)
Easy
CB-1 . Create entities using standard ops Easy
Entity Entity Type
Bedroom1 Room
Bedroom2 Room
Kitchen Room
Frontdoor Door
Backdoor Door
Entity Type Attr. Name Attr. Type Example value
Room Temperature float 27.8
Presence boolean true
Status string OK
Door Locked boolean false
Closed boolean false
CB-2. Query entities using standard ops
• Prerequisites
– Exercise CB-1
• Steps
– Write a program (or web/mobile application) that does
the following queries and prints the result
• Obtain all attributes of Bedroom1 entity
• Obtain only the Temperature attribute of Kitchen entity
• Obtain all attributes of Kitchen and Bedroom2 entities in one
query
• Obtain all attributes of entities that match the pattern
Bedroom.*
• Find out whether the doors are closed using the pattern
.*door and the Closed attribute
– Run and test your program/application
• Hints
– Orion User Manual section 3.3.1.2
(queryContext)
Easy
CB-3. Update entity using standard ops
• Prerequisites
– Exercise CB-2
• Steps
– Write a program (or web/mobile application)
that
• Asks for user input (one value)
• Updates Looked attribute of Frontdoor entity using
that input
• Queries the entity and check the result
– Run and test your program/application
• Hints
– Orion User Manual section 3.3.1.2 and 3.3.1.3
(updateContext & UPDATE)
Easy
CB-4. Create entities using conv ops
• Prerequisites
– Exercise CB-3
• Steps
– Create the following entities in your Orion
instance
• See table in next slide
• Hints
– Similar to exercise CB-2 in the standard ops
set
– Orion User Manual section 3.3.2.1
(contextEntities/entityID)
Easy
CB-4. Create entities using conv ops Easy
Entity Entity Type
Garage Room
Bathroom Room
Light1 Light
Light2 Light
Light3 Light
Entity Type Attr. Name Attr. Type Example value
Room Temperature float 27.8
Presence boolean true
Status string OK
Light Intensity Percent 0.25
CB-5. Query entities using conv ops
• Prerequisites
– Exercise CB-4
• Steps
– Write a program (or web/mobile application) that does the
following queries using convenience operations and print the
result
• Obtain all attributes of the Garage entity
• Find out whether there is anyone in the Bathroom entity
• Obtain all entities created so far
• Obtain all entities of type Room
• Obtain the temperature attribute of all entities of type Room
– Run and test your program/application
• Hints
– Similar to exercise CB-2 in the standard ops set
– To get all entities of a given type, you can use the
“contextEntityType” resource
– Orion User Manual section 3.3.2.2
(contextEntities/entityID and contextEntities/type/XX/id/XX)
Easy
CB-6. Update entity using conv ops
• Prerequisites
– Exercise CB-5
• Steps
– Write a program (or web/mobile application) that
• Asks for user input (one value)
• Updates Intensity attribute of Light1 entity using that
input using a convenience operation
• Queries the entity and check the result
– Run and test your program/application
• Hints
– Similar to exercise CB-3 in the std ops set
– Orion User Manual section 3.3.2.2 and 3.3.2.3
(contextEntities/entityID and
contextEntities/type/XX/id/XX)
Easy
CB-7. Browsing entity types
• Prerequisites
– Exercise CB-6
• Steps
– Write a program (or web/mobile application)
that
• Lists all entity types
• Provides detailed information of type Door
– Run and test your program/application
• Hints
– Orion User Manual section 3.5.6
(contextTypes)
Easy
CB-8. Basic subscription/notifications
• Prerequisites
– Exercise CB-7
• Steps
– Write a program that
• Starts a REST server to receive notifications from Orion
• Prints the value of the Temperature attribute of Bedroom1
entity each time a notification is received
– Subscribe your program to changes in the
Temperature attribute of Bedroom1 entity
– Update the Temperature attribute of Bedroom1 entity
and check that your program prints the updated value
• Hints
– Orion User Manual section 3.3.1.4 (specially subsection
on ONCHANGE, i.e. 3.3.1.4.2)
– Your program has to run in a VM to which your Orion
instance may send notifications (e.g. the same VM in
which Orion is running)
Medium
Orion Context Broker Exercises
(PART II)
Contact twitter
@marivibriz
Contact email
mariavirtudes.brizruiz@telefonica.com
Outline
• CB-1. Pagination
• CB-2. Geolocation (factory)
• CB-3. Compound attributes
• CB-4. Query entities with compound attributes
• CB-5. Update entities with compound attributes
• CB-6. Custom metadata
14
CB-1. Pagination
• Prerequisites
– Access to Orion instance running in
workshop.tidnode.cl port 1026
• Steps
– Check how many entities of type Sensor are
stored in that Orion instance
– Write a program (or web/mobile application) that
• Asks for a limit and a page number
• Returns the name IDs the entities of type Sensor in the
corresponding page
– Run and test your program/application
• Hints
– Orion User Manual section 3.5.1
(queryContext?limit=100&details=on)
Medium
CB-2. Geolocation (factory)
• Prerequisites
– Access to Orion instance running in
workshop.tidnode.cl port 1026
• Steps
– Write a program (or web/mobile
application) that
• Gets all existing types
• Gets all entities of each type in areas Red,
Green and Blue (see next slide), printing entity
IDs and their attributes which their values
– Run and test your program/application
• Hints
– Orion User Manual section 3.5.20
Medium
17
-33.596620, -70.666825
-33.607682, -70.670730
-33.6100089, -70.643231
-33.599194, -70.640200
CB-2. Geolocation (factory) Medium
18
-33.596620, -70.666825
-33.607682, -70.670730
-33.6100089, -70.643231
-33.599194, -70.640200
-33.603458,
-70.652788
-33.606123,
-70.653790
-33.604231,
-70.646032
-33.607108,
-70.646781
-33.602391,
-70.661781
x
200m
CB-2. Geolocation (factory) Medium
CB-3. Compound attributes
• Prerequisites
– Exercise CB-1
• Steps
– Create the following entities in your Orion
instance
• See table in next slide
• Hints
– Orion User Manual section 3.5.19
Medium
CB-3. Compound attributes
Entity Type Attr. Name Attr. Type Example value
Character Name string Fooy
Hitpoints integer 110
Class string Barbarian
Abilities compound {
"STR": "2",
"DEX": "4",
"CON": "3",
"INT": "1",
"WIS": "1",
"CHA": "2"
}
Inventory compound {
"weapons": [ "sword", "dagger" ],
"potions": { "life": "1", "mana": "0" },
"other": ["shield"]
}
Entity name Entity Type
Gandalf Character
Aragorn Character
Frodo Character
Medium
CB-4. Query entities with compound attributes
• Prerequisites
– Exercise CB-1
• Steps
– Write a program (or web/mobile
application) that does the following queries
and print the result
• Obtain all attributes of Aragorn entity
• Obtain only the Abilities attribute of Frodo
entity
– Run and test your program/application
• Hints
– Orion User Manual section 3.5.19
Medium
CB-5. Update entities with compound attributes
• Prerequisites
– Exercise CB-1
• Steps
– Write a program (or web/mobile application)
that
• Asks for an object name (e.g. “staff”, “hat”, etc.)
• Updates Gandalf's Inventory attribute to reflect
that he now has a that object test your program
– Run and test your program/application
• Query the Gandalf's Inventory after that, in order
to check that the object has been successfully added
• Hints
– Orion User Manual section 3.5.19
Medium
CB-6. Custom metadata Medium
• Prerequisites
– Exercise CB-1
• Steps
– Update the Gandalf entity so that the
inventory attribute has two new metadatas:
• name="Weight", type="float", value="1.2"
• name="MaxWeight", type="float", value="20"
– Query Gandalf again to see the new metadata
atached to the corresponding attribute
• Hints
– Orion User Manual section 3.5.7
Thanks!Thanks!
(Number to manuals sections in this presentation are valid at time of writing this –March 9th 2015-, but they may
change along time)

More Related Content

Viewers also liked

شركه بورتو البحر الميت للتنمية السياحية Powe point
شركه بورتو البحر الميت للتنمية السياحية Powe pointشركه بورتو البحر الميت للتنمية السياحية Powe point
شركه بورتو البحر الميت للتنمية السياحية Powe pointhadeel ameen
 
Energy
EnergyEnergy
Energy
quintomat
 
Curriculum vita Ibrahim Ammar
Curriculum vita Ibrahim AmmarCurriculum vita Ibrahim Ammar
Curriculum vita Ibrahim AmmarIbrahim Ammar
 
цдг космонавт коледна работилница
цдг космонавт коледна работилницацдг космонавт коледна работилница
цдг космонавт коледна работилница
megikatq
 
OCWM Thank You
OCWM Thank YouOCWM Thank You
OCWM Thank You
Zac Norenberg
 
Verbos y cuantificadores, rodriguez avila
Verbos y cuantificadores, rodriguez avilaVerbos y cuantificadores, rodriguez avila
Verbos y cuantificadores, rodriguez avila
Jussely Rodríguez
 
Definitions of unit 2
Definitions of unit 2Definitions of unit 2
Definitions of unit 2
quintomat
 
Портфолио воспитателя
Портфолио воспитателяПортфолио воспитателя
Портфолио воспитателя
vasko253
 
3° Fiware Overview-Chile- Track
3° Fiware Overview-Chile- Track3° Fiware Overview-Chile- Track
3° Fiware Overview-Chile- Track
TIDChile
 

Viewers also liked (10)

شركه بورتو البحر الميت للتنمية السياحية Powe point
شركه بورتو البحر الميت للتنمية السياحية Powe pointشركه بورتو البحر الميت للتنمية السياحية Powe point
شركه بورتو البحر الميت للتنمية السياحية Powe point
 
Materi 220115
Materi 220115Materi 220115
Materi 220115
 
Energy
EnergyEnergy
Energy
 
Curriculum vita Ibrahim Ammar
Curriculum vita Ibrahim AmmarCurriculum vita Ibrahim Ammar
Curriculum vita Ibrahim Ammar
 
цдг космонавт коледна работилница
цдг космонавт коледна работилницацдг космонавт коледна работилница
цдг космонавт коледна работилница
 
OCWM Thank You
OCWM Thank YouOCWM Thank You
OCWM Thank You
 
Verbos y cuantificadores, rodriguez avila
Verbos y cuantificadores, rodriguez avilaVerbos y cuantificadores, rodriguez avila
Verbos y cuantificadores, rodriguez avila
 
Definitions of unit 2
Definitions of unit 2Definitions of unit 2
Definitions of unit 2
 
Портфолио воспитателя
Портфолио воспитателяПортфолио воспитателя
Портфолио воспитателя
 
3° Fiware Overview-Chile- Track
3° Fiware Overview-Chile- Track3° Fiware Overview-Chile- Track
3° Fiware Overview-Chile- Track
 

Similar to Orion Context Broker Exercises (Part 1)

Orion Context Broker Exercises
Orion Context Broker ExercisesOrion Context Broker Exercises
Orion Context Broker Exercises
Fermin Galan
 
Java beans
Java beansJava beans
Java beans
Rajkiran Mummadi
 
React-Native Lecture 11: In App Storage
React-Native Lecture 11: In App StorageReact-Native Lecture 11: In App Storage
React-Native Lecture 11: In App Storage
Kobkrit Viriyayudhakorn
 
Build a bot hands on snowforce19
Build a bot hands on snowforce19Build a bot hands on snowforce19
Build a bot hands on snowforce19
rikkehovgaard
 
Easy mock
Easy mockEasy mock
Easy mock
Srikrishna k
 
Fiware Developers Week Iot exercises (Advanced)
Fiware Developers Week Iot exercises (Advanced)Fiware Developers Week Iot exercises (Advanced)
Fiware Developers Week Iot exercises (Advanced)
dmoranj
 
Divide and stress: the journey to component load test
Divide and stress: the journey to component load testDivide and stress: the journey to component load test
Divide and stress: the journey to component load test
Juan Pedro Escalona Rueda
 
How to Make OpenStack Heat Better based on Our One Year Production Journey
How to Make OpenStack Heat Better based on Our One Year Production JourneyHow to Make OpenStack Heat Better based on Our One Year Production Journey
How to Make OpenStack Heat Better based on Our One Year Production Journey
Kaz Shinohara
 
Remix: On-demand Live Randomization (Fine-grained live ASLR during runtime)
Remix: On-demand Live Randomization (Fine-grained live ASLR during runtime)Remix: On-demand Live Randomization (Fine-grained live ASLR during runtime)
Remix: On-demand Live Randomization (Fine-grained live ASLR during runtime)
Yue Chen
 
Introduction of Life Cycle.pptx
Introduction of Life Cycle.pptxIntroduction of Life Cycle.pptx
Introduction of Life Cycle.pptx
fake621211
 
[Advantech] WebOP designer Tutorial step by step
[Advantech] WebOP designer Tutorial step by step [Advantech] WebOP designer Tutorial step by step
[Advantech] WebOP designer Tutorial step by step
Ming-Hung Hseih
 
Context Information Management in IoT enabled smart systems - the basics
Context Information Management in IoT enabled smart systems - the basicsContext Information Management in IoT enabled smart systems - the basics
Context Information Management in IoT enabled smart systems - the basics
Fernando Lopez Aguilar
 
Migrating IBM Cloud Orchestrator environment from v2.4.0.2 to v2.5.0.1
Migrating IBM Cloud Orchestrator environment from v2.4.0.2 to v2.5.0.1Migrating IBM Cloud Orchestrator environment from v2.4.0.2 to v2.5.0.1
Migrating IBM Cloud Orchestrator environment from v2.4.0.2 to v2.5.0.1
Paulraj Pappaiah
 

Similar to Orion Context Broker Exercises (Part 1) (13)

Orion Context Broker Exercises
Orion Context Broker ExercisesOrion Context Broker Exercises
Orion Context Broker Exercises
 
Java beans
Java beansJava beans
Java beans
 
React-Native Lecture 11: In App Storage
React-Native Lecture 11: In App StorageReact-Native Lecture 11: In App Storage
React-Native Lecture 11: In App Storage
 
Build a bot hands on snowforce19
Build a bot hands on snowforce19Build a bot hands on snowforce19
Build a bot hands on snowforce19
 
Easy mock
Easy mockEasy mock
Easy mock
 
Fiware Developers Week Iot exercises (Advanced)
Fiware Developers Week Iot exercises (Advanced)Fiware Developers Week Iot exercises (Advanced)
Fiware Developers Week Iot exercises (Advanced)
 
Divide and stress: the journey to component load test
Divide and stress: the journey to component load testDivide and stress: the journey to component load test
Divide and stress: the journey to component load test
 
How to Make OpenStack Heat Better based on Our One Year Production Journey
How to Make OpenStack Heat Better based on Our One Year Production JourneyHow to Make OpenStack Heat Better based on Our One Year Production Journey
How to Make OpenStack Heat Better based on Our One Year Production Journey
 
Remix: On-demand Live Randomization (Fine-grained live ASLR during runtime)
Remix: On-demand Live Randomization (Fine-grained live ASLR during runtime)Remix: On-demand Live Randomization (Fine-grained live ASLR during runtime)
Remix: On-demand Live Randomization (Fine-grained live ASLR during runtime)
 
Introduction of Life Cycle.pptx
Introduction of Life Cycle.pptxIntroduction of Life Cycle.pptx
Introduction of Life Cycle.pptx
 
[Advantech] WebOP designer Tutorial step by step
[Advantech] WebOP designer Tutorial step by step [Advantech] WebOP designer Tutorial step by step
[Advantech] WebOP designer Tutorial step by step
 
Context Information Management in IoT enabled smart systems - the basics
Context Information Management in IoT enabled smart systems - the basicsContext Information Management in IoT enabled smart systems - the basics
Context Information Management in IoT enabled smart systems - the basics
 
Migrating IBM Cloud Orchestrator environment from v2.4.0.2 to v2.5.0.1
Migrating IBM Cloud Orchestrator environment from v2.4.0.2 to v2.5.0.1Migrating IBM Cloud Orchestrator environment from v2.4.0.2 to v2.5.0.1
Migrating IBM Cloud Orchestrator environment from v2.4.0.2 to v2.5.0.1
 

More from TIDChile

Iot presentation JustPeople-ago2015
Iot presentation JustPeople-ago2015Iot presentation JustPeople-ago2015
Iot presentation JustPeople-ago2015
TIDChile
 
Ingeniería de Calidad de Software: Retos del siglo XXI
Ingeniería de Calidad de Software: Retos del siglo XXIIngeniería de Calidad de Software: Retos del siglo XXI
Ingeniería de Calidad de Software: Retos del siglo XXI
TIDChile
 
Fiware IoT Proposal & Community
Fiware IoT Proposal & Community Fiware IoT Proposal & Community
Fiware IoT Proposal & Community
TIDChile
 
Orion Context Broker
Orion Context Broker Orion Context Broker
Orion Context Broker
TIDChile
 
3° Fiware Overview-Chile
3° Fiware Overview-Chile3° Fiware Overview-Chile
3° Fiware Overview-Chile
TIDChile
 
Fiware IoT- Ejercicios
Fiware IoT- EjerciciosFiware IoT- Ejercicios
Fiware IoT- Ejercicios
TIDChile
 
Metamorfosis hacia una empresa ágil
Metamorfosis hacia una empresa ágilMetamorfosis hacia una empresa ágil
Metamorfosis hacia una empresa ágil
TIDChile
 
FI Workshop Sesión Inaugural TID Chile
FI Workshop Sesión Inaugural TID ChileFI Workshop Sesión Inaugural TID Chile
FI Workshop Sesión Inaugural TID Chile
TIDChile
 

More from TIDChile (8)

Iot presentation JustPeople-ago2015
Iot presentation JustPeople-ago2015Iot presentation JustPeople-ago2015
Iot presentation JustPeople-ago2015
 
Ingeniería de Calidad de Software: Retos del siglo XXI
Ingeniería de Calidad de Software: Retos del siglo XXIIngeniería de Calidad de Software: Retos del siglo XXI
Ingeniería de Calidad de Software: Retos del siglo XXI
 
Fiware IoT Proposal & Community
Fiware IoT Proposal & Community Fiware IoT Proposal & Community
Fiware IoT Proposal & Community
 
Orion Context Broker
Orion Context Broker Orion Context Broker
Orion Context Broker
 
3° Fiware Overview-Chile
3° Fiware Overview-Chile3° Fiware Overview-Chile
3° Fiware Overview-Chile
 
Fiware IoT- Ejercicios
Fiware IoT- EjerciciosFiware IoT- Ejercicios
Fiware IoT- Ejercicios
 
Metamorfosis hacia una empresa ágil
Metamorfosis hacia una empresa ágilMetamorfosis hacia una empresa ágil
Metamorfosis hacia una empresa ágil
 
FI Workshop Sesión Inaugural TID Chile
FI Workshop Sesión Inaugural TID ChileFI Workshop Sesión Inaugural TID Chile
FI Workshop Sesión Inaugural TID Chile
 

Recently uploaded

20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 

Recently uploaded (20)

20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 

Orion Context Broker Exercises (Part 1)

  • 1. Orion Context Broker Exercises (PART I) Contact twitter @marivibriz Contact email mariavirtudes.brizruiz@telefonica.com
  • 2. Outline • CB-1. Create entities using standard ops • CB-2. Query entities using standard ops • CB-3. Update entity using standard ops • CB-4. Create entities using conv ops • CB-5. Query entities using conv ops • CB-6. Update entity using conv ops • CB-7. Browsing entity types • CB-8. Basic subscription/notifications 2
  • 3. CB-1. Create entities using standard ops • Steps – Create the following entities in your Orion instance • See table in next slide • Hints – Orion User Manual section 3.3.1.1 (UpdateContext & APPEND) Easy
  • 4. CB-1 . Create entities using standard ops Easy Entity Entity Type Bedroom1 Room Bedroom2 Room Kitchen Room Frontdoor Door Backdoor Door Entity Type Attr. Name Attr. Type Example value Room Temperature float 27.8 Presence boolean true Status string OK Door Locked boolean false Closed boolean false
  • 5. CB-2. Query entities using standard ops • Prerequisites – Exercise CB-1 • Steps – Write a program (or web/mobile application) that does the following queries and prints the result • Obtain all attributes of Bedroom1 entity • Obtain only the Temperature attribute of Kitchen entity • Obtain all attributes of Kitchen and Bedroom2 entities in one query • Obtain all attributes of entities that match the pattern Bedroom.* • Find out whether the doors are closed using the pattern .*door and the Closed attribute – Run and test your program/application • Hints – Orion User Manual section 3.3.1.2 (queryContext) Easy
  • 6. CB-3. Update entity using standard ops • Prerequisites – Exercise CB-2 • Steps – Write a program (or web/mobile application) that • Asks for user input (one value) • Updates Looked attribute of Frontdoor entity using that input • Queries the entity and check the result – Run and test your program/application • Hints – Orion User Manual section 3.3.1.2 and 3.3.1.3 (updateContext & UPDATE) Easy
  • 7. CB-4. Create entities using conv ops • Prerequisites – Exercise CB-3 • Steps – Create the following entities in your Orion instance • See table in next slide • Hints – Similar to exercise CB-2 in the standard ops set – Orion User Manual section 3.3.2.1 (contextEntities/entityID) Easy
  • 8. CB-4. Create entities using conv ops Easy Entity Entity Type Garage Room Bathroom Room Light1 Light Light2 Light Light3 Light Entity Type Attr. Name Attr. Type Example value Room Temperature float 27.8 Presence boolean true Status string OK Light Intensity Percent 0.25
  • 9. CB-5. Query entities using conv ops • Prerequisites – Exercise CB-4 • Steps – Write a program (or web/mobile application) that does the following queries using convenience operations and print the result • Obtain all attributes of the Garage entity • Find out whether there is anyone in the Bathroom entity • Obtain all entities created so far • Obtain all entities of type Room • Obtain the temperature attribute of all entities of type Room – Run and test your program/application • Hints – Similar to exercise CB-2 in the standard ops set – To get all entities of a given type, you can use the “contextEntityType” resource – Orion User Manual section 3.3.2.2 (contextEntities/entityID and contextEntities/type/XX/id/XX) Easy
  • 10. CB-6. Update entity using conv ops • Prerequisites – Exercise CB-5 • Steps – Write a program (or web/mobile application) that • Asks for user input (one value) • Updates Intensity attribute of Light1 entity using that input using a convenience operation • Queries the entity and check the result – Run and test your program/application • Hints – Similar to exercise CB-3 in the std ops set – Orion User Manual section 3.3.2.2 and 3.3.2.3 (contextEntities/entityID and contextEntities/type/XX/id/XX) Easy
  • 11. CB-7. Browsing entity types • Prerequisites – Exercise CB-6 • Steps – Write a program (or web/mobile application) that • Lists all entity types • Provides detailed information of type Door – Run and test your program/application • Hints – Orion User Manual section 3.5.6 (contextTypes) Easy
  • 12. CB-8. Basic subscription/notifications • Prerequisites – Exercise CB-7 • Steps – Write a program that • Starts a REST server to receive notifications from Orion • Prints the value of the Temperature attribute of Bedroom1 entity each time a notification is received – Subscribe your program to changes in the Temperature attribute of Bedroom1 entity – Update the Temperature attribute of Bedroom1 entity and check that your program prints the updated value • Hints – Orion User Manual section 3.3.1.4 (specially subsection on ONCHANGE, i.e. 3.3.1.4.2) – Your program has to run in a VM to which your Orion instance may send notifications (e.g. the same VM in which Orion is running) Medium
  • 13. Orion Context Broker Exercises (PART II) Contact twitter @marivibriz Contact email mariavirtudes.brizruiz@telefonica.com
  • 14. Outline • CB-1. Pagination • CB-2. Geolocation (factory) • CB-3. Compound attributes • CB-4. Query entities with compound attributes • CB-5. Update entities with compound attributes • CB-6. Custom metadata 14
  • 15. CB-1. Pagination • Prerequisites – Access to Orion instance running in workshop.tidnode.cl port 1026 • Steps – Check how many entities of type Sensor are stored in that Orion instance – Write a program (or web/mobile application) that • Asks for a limit and a page number • Returns the name IDs the entities of type Sensor in the corresponding page – Run and test your program/application • Hints – Orion User Manual section 3.5.1 (queryContext?limit=100&details=on) Medium
  • 16. CB-2. Geolocation (factory) • Prerequisites – Access to Orion instance running in workshop.tidnode.cl port 1026 • Steps – Write a program (or web/mobile application) that • Gets all existing types • Gets all entities of each type in areas Red, Green and Blue (see next slide), printing entity IDs and their attributes which their values – Run and test your program/application • Hints – Orion User Manual section 3.5.20 Medium
  • 17. 17 -33.596620, -70.666825 -33.607682, -70.670730 -33.6100089, -70.643231 -33.599194, -70.640200 CB-2. Geolocation (factory) Medium
  • 18. 18 -33.596620, -70.666825 -33.607682, -70.670730 -33.6100089, -70.643231 -33.599194, -70.640200 -33.603458, -70.652788 -33.606123, -70.653790 -33.604231, -70.646032 -33.607108, -70.646781 -33.602391, -70.661781 x 200m CB-2. Geolocation (factory) Medium
  • 19. CB-3. Compound attributes • Prerequisites – Exercise CB-1 • Steps – Create the following entities in your Orion instance • See table in next slide • Hints – Orion User Manual section 3.5.19 Medium
  • 20. CB-3. Compound attributes Entity Type Attr. Name Attr. Type Example value Character Name string Fooy Hitpoints integer 110 Class string Barbarian Abilities compound { "STR": "2", "DEX": "4", "CON": "3", "INT": "1", "WIS": "1", "CHA": "2" } Inventory compound { "weapons": [ "sword", "dagger" ], "potions": { "life": "1", "mana": "0" }, "other": ["shield"] } Entity name Entity Type Gandalf Character Aragorn Character Frodo Character Medium
  • 21. CB-4. Query entities with compound attributes • Prerequisites – Exercise CB-1 • Steps – Write a program (or web/mobile application) that does the following queries and print the result • Obtain all attributes of Aragorn entity • Obtain only the Abilities attribute of Frodo entity – Run and test your program/application • Hints – Orion User Manual section 3.5.19 Medium
  • 22. CB-5. Update entities with compound attributes • Prerequisites – Exercise CB-1 • Steps – Write a program (or web/mobile application) that • Asks for an object name (e.g. “staff”, “hat”, etc.) • Updates Gandalf's Inventory attribute to reflect that he now has a that object test your program – Run and test your program/application • Query the Gandalf's Inventory after that, in order to check that the object has been successfully added • Hints – Orion User Manual section 3.5.19 Medium
  • 23. CB-6. Custom metadata Medium • Prerequisites – Exercise CB-1 • Steps – Update the Gandalf entity so that the inventory attribute has two new metadatas: • name="Weight", type="float", value="1.2" • name="MaxWeight", type="float", value="20" – Query Gandalf again to see the new metadata atached to the corresponding attribute • Hints – Orion User Manual section 3.5.7
  • 24. Thanks!Thanks! (Number to manuals sections in this presentation are valid at time of writing this –March 9th 2015-, but they may change along time)