Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

FIWARE Orion Context Broker to Backbone Sync

Introduction

  • 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.
  • BackboneJS is a JavaScript framework which enables us to build rich web apps.
  • 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

Usage

O2BB is pretty straightforward.

  1. 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>
    
  2. 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 type prototype object. If your access to Orion requires an access token, you also must set up the token prototype object.

  3. Voilà!

Demo

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:

  1. Clone this repository

    git clone https://github.com/digitalilusion/o2bb.git
    
    
  2. Install NodeJS packages

    cd o2bb
    npm install connect serve-static proxy-middleware
    
  3. Run the server.js

    cd o2bb
    node server.js
    
  4. Open your browser, enter the address http://localhost:8080/html/orion_test.html and follow the instructions!

License

MIT License.

© 2015 Digitalilusion S.L.

You can’t perform that action at this time.