FIWARE Orion Context Broker to Backbone Sync
- FIWARE Orion Context Broker (aka Orion) is a General Enabler (GE) that provides object allocation, query and Pub/Sub operations. Formally, Orion is implemented following the NGSI10/NGSI9 specification.
- Orion 2 Backbone (aka O2BB) is "the glue" between these entities. With O2BB we can integrate our project quickly in an easy way with FIWARE's Orion.
O2BB enables to companies accelerated by FIWARE a rapid, easy and cross-platform integration with Orion GE
We've developed O2BB for Outbarriers project
O2BB is pretty straightforward.
Include the orion.js file after Underscore & Backbone references:
<script src="/underscore.js" charset="utf-8"></script> <script src="/backbone.js" charset="utf-8"></script> <script src="/orion.js" charset="utf-8"></script>
If you want to create a Backbone Model, you must extend it from
Backbone.OrionModel. In case of a collection,
Backbone.OrionCollection. Due to Orion functionality, you must set up a
typeprototype object. If your access to Orion requires an
access token, you also must set up the
This demo connects to Orion Context Broker Test Bed. That instance runs on the following address http://orion.lab.fiware.org:1026 and it's public but you need an access token.
It's necessary a simple HTTP proxy server made in NodeJS because of Orion Test Bed instance does not implement CORS and we can't talk directly with it.
Follow these steps to run the demo:
Clone this repository
git clone https://github.com/digitalilusion/o2bb.git
Install NodeJS packages
cd o2bb npm install connect serve-static proxy-middleware
Run the server.js
cd o2bb node server.js
Open your browser, enter the address http://localhost:8080/html/orion_test.html and follow the instructions!
© 2015 Digitalilusion S.L.