The FI-WARE Project – Core Platform of theFuture InternetOrion Context Broker WebminarFermín Galán (fermin@tid.es), Franci...
The FI-WARE Project – Core Platform of theFuture InternetIndexIndexIndexIndexIntroductionBasic conceptsNGSI APIOrion Broke...
The FI-WARE Project – Core Platform of theFuture Internet01Introduction
The FI-WARE Project – Core Platform of theFuture InternetIntroductionOrion Context Broker is an implementation of a contex...
The FI-WARE Project – Core Platform of theFuture Internet02Basic concepts
The FI-WARE Project – Core Platform of theFuture InternetContextOMA NGSI Context Management is about management of Context...
The FI-WARE Project – Core Platform of theFuture InternetContext Elements (1/2)Context Information in OMA NGSI is represen...
The FI-WARE Project – Core Platform of theFuture InternetContext Elements (2/2)There may be as many kinds of Context Eleme...
The FI-WARE Project – Core Platform of theFuture InternetConceptual model: advantagesNot linked to a particular data/conte...
The FI-WARE Project – Core Platform of theFuture Internet03NGSI API
The FI-WARE Project – Core Platform of theFuture InternetOMA NGSI and FI-WARE APIsNGSI Context Management specs have been ...
The FI-WARE Project – Core Platform of theFuture InternetBasic entities and operations (1)Context Producers publish data/c...
The FI-WARE Project – Core Platform of theFuture InternetBasic entities and operations (2)Some Context Consumers can be su...
The FI-WARE Project – Core Platform of theFuture InternetAbout queries, registrations and subscriptionsQueries, registrati...
The FI-WARE Project – Core Platform of theFuture InternetContext Broker Federation (1)A Context Broker may be subscribed a...
The FI-WARE Project – Core Platform of theFuture InternetContext Broker Federation (2)A Context Broker may be subscribed a...
The FI-WARE Project – Core Platform of theFuture InternetHandling multiple subscriptionsA single Context Broker GE may han...
The FI-WARE Project – Core Platform of theFuture InternetExtended operations (1)Context Brokers export the discoverContext...
The FI-WARE Project – Core Platform of theFuture InternetExtended operations (2)Some applications can be subscribed to reg...
The FI-WARE Project – Core Platform of theFuture InternetSome hints about OMA NGSI specsOperations are grouped into two ma...
The FI-WARE Project – Core Platform of theFuture Internet04Orion Broker in the FI-WAREArchitecture
The FI-WARE Project – Core Platform of theFuture InternetFI-WARE NGSI for IoTNGSI IoTAdapterNative NGSIIoT AgentNative NGS...
The FI-WARE Project – Core Platform of theFuture InternetFI-WARE Context/Data Management Platform22Context/Data Management...
The FI-WARE Project – Core Platform of theFuture InternetContext-based application (FI-WARE Live Demo App)23Pub/Sub Contex...
The FI-WARE Project – Core Platform of theFuture InternetContext Broker versionsTwo versions• R1:› The one currently avail...
The FI-WARE Project – Core Platform of theFuture Internet05Demo
The FI-WARE Project – Core Platform of theFuture InternetDemo environment26Port ListenerNGSIqueriesresponsesdata10.95.26.5...
The FI-WARE Project – Core Platform of theFuture InternetAdditional Orion Context Broker ResourcesDownload from (PPP membe...
The FI-WARE Project – Core Platform of theFuture InternetThank You !!
The FI-WARE Project – Core Platform of theFuture InternetBasic entities and operations (extra)Some Context Producers may a...
Upcoming SlideShare
Loading in...5
×

Orion context broker webminar 2013 06-19

2,080

Published on

Published in: Technology

Orion context broker webminar 2013 06-19

  1. 1. The FI-WARE Project – Core Platform of theFuture InternetOrion Context Broker WebminarFermín Galán (fermin@tid.es), Francisco Romero (frb@tid.es)June 2013http://www.fi-ware.eu
  2. 2. The FI-WARE Project – Core Platform of theFuture InternetIndexIndexIndexIndexIntroductionBasic conceptsNGSI APIOrion Broker in the FI-WARE ArchitectureDemo0102030405
  3. 3. The FI-WARE Project – Core Platform of theFuture Internet01Introduction
  4. 4. The FI-WARE Project – Core Platform of theFuture InternetIntroductionOrion Context Broker is an implementation of a context informationbroker with persistent storage that can play the role of two GenericEnablers (GE) within the FI-WARE platform• Pub/Sub Context Broker GE• Configuration Management GEIt implements OMA NGSI9/10 specification• NGSI9 is about context information availability (i.e. sources of contextinformation) management• NGSI10 is about context information itselfOrion Context Broker running as Pub/Sub Broker GE• It implements both NGSI9 and NGSI10Orion Context Broker running as Configuration Management GE• It implements only NGSI9• It implements registration forwarding3
  5. 5. The FI-WARE Project – Core Platform of theFuture Internet02Basic concepts
  6. 6. The FI-WARE Project – Core Platform of theFuture InternetContextOMA NGSI Context Management is about management of Context data (aka ContextInformation)Context Information is always relevant to “entities”, although entities can be anything(applications, users, things, …)Orion Context Broker intermediates between context producers and contextconsumers5ContextBrokerApplications
  7. 7. The FI-WARE Project – Core Platform of theFuture InternetContext Elements (1/2)Context Information in OMA NGSI is represented through data structurescalled context elements which have associated:• An EntityId and EntityType, uniquely identifying the entity to which context data refers.• A sequence of one or more data element attributes (<name, type, value> triplets)• Optional meta-data linked to attributes (also <name, type, value> triplets)As an example, we may consider the context element reporting info on:• attributes “speed”, “geolocation”, “current established route” of a “car”, or• attributes “last message geolocation”, “last message contents” of an “user”The EntityId is a string, and can be used to designate “anything”, notnecessarely “things” in the “real world” but also application entities6Meta-data• Name• Type• ValueContext Element attributes• Name• Type• ValueContext Element• EntityId• EntityType1 n 1 n“has” “has”
  8. 8. The FI-WARE Project – Core Platform of theFuture InternetContext Elements (2/2)There may be as many kinds of Context Elements as combinations ofattributes linked to an entity:• Typically a context element is generated whenever an query (update) on values ofa list of attributes linked to an entity is requested (occurs)• Only queried/updated attributes are communicated, so the amount of informationthat is transmitted is minimizedExample:• Cars may have attributes “brand”, “model”, “license plate”, “established route”, “geo-location”, “current speed”, “gas level”• The first time existence of the car is recorded, a context element bringing values ofattributes “brand”, “model”, “license plate” is generated• Any time a route is established using the cars’ navigator, a context element bringingupdated values of “established route”, “gas level” and “geo-location” is generatedwhenever a route is established• A context element bringing updated values of “geo-location”, “current speed” and“gas level” is generated every x minutesOccurrences of context elements are referred as “events” in FI-WARE7
  9. 9. The FI-WARE Project – Core Platform of theFuture InternetConceptual model: advantagesNot linked to a particular data/context representation formalism:• Neither for transferring• Nor storingCan work with a standard IoT formats (SensorML) but at the sametime allows to overcome the limitations derived from the adoption of asingle standard formatThe flexible nature of data structures linked to context elementsenable an optimized communication (only information about queried orupdated attributes is transferred)8
  10. 10. The FI-WARE Project – Core Platform of theFuture Internet03NGSI API
  11. 11. The FI-WARE Project – Core Platform of theFuture InternetOMA NGSI and FI-WARE APIsNGSI Context Management specs have been published by OMA butFI-WARE will not stick to what has been published:• Ready to change whatever makes the API more usable and useful• Ready to incorporate extensions to make the API more powerful yet simple(convenience operations)• Ready to fast-track incorporated changes in OMAThat’s why we distinguish between “OMA NGSI” and “FI-WARE NGSI”We may consider potential extensions dealing with stream-basedcommunication in the future, for example10
  12. 12. The FI-WARE Project – Core Platform of theFuture InternetBasic entities and operations (1)Context Producers publish data/context elements by invoking theupdateContext operation on a Context (Publish/Subscribe) Broker.Context data is kept persistent by Context Brokers and ready to be queried whilenot exceeding a given expiration time. This is a distinguishing feature of the OMAContext Management model as compared to some Event Brokering standards.You can think in the Context Broker as a kind of virtual Repository/DB whereproducers insert context information and consumers query for itContext Consumers can retrieve data/context elements by invoking thequeryContext operation on a Context Broker11Context ConsumerqueryContextContext Producer Context (Publish/Subscribe)BrokerupdateContext
  13. 13. The FI-WARE Project – Core Platform of theFuture InternetBasic entities and operations (2)Some Context Consumers can be subscribed to reception of data/contextelements which comply with certain conditions, using the subscribeContextoperation a ContextBroker exports. Such subscriptions may have a duration.Subscribed consumers spontaneously receive data/context elements compliantwith that subscription through the notifyContext operation they exportNote that the Application which subscribes a particular Context Consumer mayor may not be the/a Context Consumer itself12Applicationsubscription_id = subscribeContext (consumer, expr, duration)Context ConsumerContext (Publish/Subscribe) BrokernotifyContext (subscription_id, data/context)
  14. 14. The FI-WARE Project – Core Platform of theFuture InternetAbout queries, registrations and subscriptionsQueries, registrations and subscriptions requests are formulated on:• List of entity ids (these ids may include patters)• List of attributes or “attribute domains” (identifiers used to denote a group of relatedattributes)Besides, queries and subscriptions requests can be formulated so that certainrestrictions, established as conditions upon values of given attributes ormetadata, have to be met.13
  15. 15. The FI-WARE Project – Core Platform of theFuture InternetContext Broker Federation (1)A Context Broker may be subscribed as Context Consumer on anotherContext Broker14Applicationsub_id_1 = subscribeContext (consumer1, expr1, duration1)Context Consumer 1ContextBroker 2notifyContextContext ProducerContext Consumer 2querynotifyContextApplicationsub_id_2 = subscribeContext (Context Broker GE 2, expr2, duration2)ContextBroker 1updateContextqueryContextn2uupdateContextdirectly,In Release 3, CB will be able toconsume notifyContext directly,making n2u unneeded
  16. 16. The FI-WARE Project – Core Platform of theFuture InternetContext Broker Federation (2)A Context Broker may be subscribed as Context Producer on another ContextBroker15Applicationsub_id_1 = subscribeContext (consumer1, expr1, duration1)ContextBroker 2notifyContextContext ProducerqueryqueryContextApplicationregisterContext (Context Broker GE 2, what, duration2)ContextBroker 1updateContextqueryContextContext Consumer 2Context Consumer 1
  17. 17. The FI-WARE Project – Core Platform of theFuture InternetHandling multiple subscriptionsA single Context Broker GE may handle several subscriptionsA Context Consumer may be subscribed through more than one subscriptionA Context Consumer may consume events through subscriptions or makingexplicit queries16Context Broker GEContextProducersContextConsumersProducers portsubscription portssubscriptionsupdatequerynotifynotifyupdatequery
  18. 18. The FI-WARE Project – Core Platform of theFuture InternetExtended operations (1)Context Brokers export the discoverContext operation enabling applications todiscover entities or even attributes and attribute domains that have beenregistered in the system17Application 2discoverContextApplication 1 Context (Publish/Subscribe)BrokerregisterContext
  19. 19. The FI-WARE Project – Core Platform of theFuture InternetExtended operations (2)Some applications can be subscribed to registration of entities or availability ofattributes and attribute domains which comply with certain conditions, using thesubscribeContextAvailability operation a ContextBroker may export. Suchsubscriptions may have a duration.Subscribed applications spontaneously receive updates on new entities,attributes or attribute domains compliant with that subscription through thenotifyContextAvailability operation they exportNote that the subscriber and subscribed applications may not be the same18application1subscription_id = subscribeContextAvailability (application2, expr, duration)application2Context BrokernotifyContextAvailability (subscription_id, updates)
  20. 20. The FI-WARE Project – Core Platform of theFuture InternetSome hints about OMA NGSI specsOperations are grouped into two major interfaces (not clear why ☺• NGSI-10› updateContext› queryContext› subscribeContext / unsubscribeContext / updateContextSubscription› notifyContext• NGSI-9› registerContext› discoverContextAvailability› subscribeContextAvailability / unsubscribeContextAvailability /updateContextAvailabilitySubscription› notifyContextAvailability19
  21. 21. The FI-WARE Project – Core Platform of theFuture Internet04Orion Broker in the FI-WAREArchitecture
  22. 22. The FI-WARE Project – Core Platform of theFuture InternetFI-WARE NGSI for IoTNGSI IoTAdapterNative NGSIIoT AgentNative NGSIIoT AgentBackendApplicationsFI-WARE NGSI-9/10(entities: sensors)(entities: things, sensors, other)FI-WARE NGSI-9/10Pub/Sub Broker GEBackendDevice Management GEIoT Broker ConfMan
  23. 23. The FI-WARE Project – Core Platform of theFuture InternetFI-WARE Context/Data Management Platform22Context/Data Management PlatformApplicationsFI-WARE NGSI-9/10Processing/AnalysisAlgorithmsGathered datais injected forprocessing/analysisDistributedContext SourcesComplex Event Processing -CEP(IBM’s PROTON)BigData Analysis/Processing(COSMOS)Pub/Sub Context Broker(Gathering / Publication)Processed data isinjected forprocessing/analysisData generated eitherby CEP or BigData ispublishedGathered datainjected for CEP-likeprocessing
  24. 24. The FI-WARE Project – Core Platform of theFuture InternetContext-based application (FI-WARE Live Demo App)23Pub/Sub ContextBrokerWirecloud(App Front End)CEPLocationNGSI IoTAdapterDevice Management GENodes, AMMS, Regulators,Issues, Vans, Technitians… SmartSantanderApp Backend
  25. 25. The FI-WARE Project – Core Platform of theFuture InternetContext Broker versionsTwo versions• R1:› The one currently available› Uses MySQL as persistence layer› Mono-thread› Uses a different name (“SAMSON Broker”)• R2:› Available by end of June› Uses MongoDB as persistence layer› Multi-thread24
  26. 26. The FI-WARE Project – Core Platform of theFuture Internet05Demo
  27. 27. The FI-WARE Project – Core Platform of theFuture InternetDemo environment26Port ListenerNGSIqueriesresponsesdata10.95.26.5510.95.249.25tcp/44444tcp/1026tcp/27017Client
  28. 28. The FI-WARE Project – Core Platform of theFuture InternetAdditional Orion Context Broker ResourcesDownload from (PPP member only by the moment)• https://forge.fi-ware.eu/frs/?group_id=23Page in the FI-WARE catalog• http://catalogue.fi-ware.eu/enablers/publishsubscribe-context-broker-samson-brokerFIWARE NGSI• NGSI9: http://forge.fi-ware.eu/plugins/mediawiki/wiki/fiware/index.php/FI-WARE_NGSI-9_Open_RESTful_API_Specification_%28PRELIMINARY%29• NGSI10: http://forge.fi-ware.eu/plugins/mediawiki/wiki/fiware/index.php/FI-WARE_NGSI-10_Open_RESTful_API_Specification_%28PRELIMINARY%29Manuals• Installation and Administration Guide: http://forge.fi-ware.eu/plugins/mediawiki/wiki/fiware/index.php/Publish/Subscribe_GE_-_SAMSON_Broker_-_Installation_and_Administration_Guide• Users and Programmers Guide: http://forge.fi-ware.eu/plugins/mediawiki/wiki/fiware/index.php/Publish/Subscribe_GE_-_SAMSON_Broker_-_User_and_Programmer_Guide27
  29. 29. The FI-WARE Project – Core Platform of theFuture InternetThank You !!
  30. 30. The FI-WARE Project – Core Platform of theFuture InternetBasic entities and operations (extra)Some Context Producers may also export a queryContext operation ContextBrokers may invoke at any given time to query on values of a designated set ofattributes linked to a given set of entities. They are called Context Providers.Because Context Providers exporting the queryContext operation aretypically unknown “a priori”, Context Brokers export a registerContextoperation which enable to register what Context Producers may be queriedNote that the Application which subscribes a particular Context Producer mayor may not be the/a Context Producer itself29ApplicationregisterContext (producer URI,registration data, duration, registration_id)Context Provider Context (Publish/Subscribe) BrokerqueryContextContext ConsumerqueryContextNot yet in Release 2. Planned for Release 3

×