joola

The open-source data visualization framework

joola

Technical DocsSetup GuideAPI DocsContributingAbout joola

joola is a real-time data analytics and visualization framework allowing you to quickly save, query and visualize your data. Some of the main benefits of using joola include:

  • Simple, flexible and powerful JSON to describe your data and push to joola.
  • Our intuitive query JSON syntax makes it easy to analyze or visualize your data in blazing speed.
  • Seamlessly embeddable into existing sites, including single-sign-on and advanced features.
  • Big-data, supports distributed caching and processing to cope with big-data needs.
  • Real-time data processing. Display analytics as they arrive.
  • Fast, advanced caching algorithm. Avg. query time of less than a few seconds.
  • Embed quickly, seamlessly integrate with your site.
  • Scalable, run on a single machine or a node-based matrix.
  • Secure, role-based, multi-tenant, data segregation.
  • Extend, easy to add more data sources, authentication and cache middleware.

We've pre-loaded the package with a fully working sample site, so it's easy to get started.

joola uses several leading open-source software for its operation. Before getting started, please install MongoDB, Redis and RabbitMQ, for more details on these pre-requisites please refer to the wiki.

For the example below to work out-of-the-box, it's required to have both joola and its dependencies installed on localhost. For more details on the installation process, please refer to this guide.

We have included a Docker file to support easy playing around and testing. Using Docker will pull the latest docker image and run joola in a container for you.

$ docker run -p 8081:8081 -it joola/joola

We have included a Vagrant file to support easy playing around and testing. Running vagrant up will install all needed dependencies and allow you to run joola in a sand boxed virtual environment.

# Clone this repository
$ git clone https://github.com/joola/joola
$ cd joola
# Update submodules containing chef recipes
$ git submodule init
$ git submodule update
$ npm install
 
$ vagrant up
# wait for the box to come online
$ vagrant ssh 
 
# once in the box
$ cd /vagrant
$ node joola.js

We have configured the VM to use 2 CPUs with 2048MB of memory, but these can be configured from Vagrantfile if you prefer different settings.

$ mkdir /opt/joola
$ cd /opt/joola
$ npm install joola
$ node ./node_modules/joola/joola.js

Access REST API using cURL (-k switch due to default localhost SSL certificate)

$ curl -i -k  https://localhost:8081/system/version?APIToken=apitoken-demo
 
HTTP/1.1 200 OK
Server: joola
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: ETag, X-RateLimit-Limit, X-RateLimit-Remaining,
  X-RateLimit-Reset
X-joola-Request-Id: 87IpUGxDQ:1399738779977:0xOC0CqXB
X-Powered-By: joola
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4973
X-RateLimit-Reset: 1399741710
Retry-After: 2930
X-joola-Duration: 5
X-joola-Requested-By: 87IpUGxDQ
X-joola-Fulfilled-By: 87IpUGxDQ
X-joola-Duration-Fulfilled: 2
Content-Type: application/json
Content-Length: 36
ETag: "867689076"
Vary: Accept-Encoding
Date: Sat, 10 May 2014 16:19:39 GMT
Connection: keep-alive
 
{ "version": "joola version 0.4.1" }

Following the installation, point your browser to https://localhost:8081 and you'll be able to use the framework.

Learn more about getting started with joola

Using cURL:

$ curl \
     --include \
     --request POST \
     --header "Content-Type: application/json" \
     --data-binary "[{
       \"timestamp\": null,
       \"article\": \"Sample Analytics\",
       \"browser\": \"Chrome\",
       \"device\": \"Desktop\",
       \"engine\": \"Webkit\",
       \"os\": \"Linux\",
       \"userid\": \"demo@joo.la\",
       \"ip\": \"127.0.0.1\",
       \"referrer\": \"http://joo.la\",
       \"visits\": 1,
       \"loadtime\": 123
     }]" \
     https://localhost:8081/beacon/{workspace}/{collection}{?APIToken}

Using the SDK:

var joola = require('joola.sdk');
 
joola.init({host: 'https://localhost:8081', APIToken: 'apitoken-beacon'}, function(err) {
  var doc = {
    "timestamp": null,
    "article": "Sample Analytics",
    "browser": "Chrome",
    "device": "Desktop",
    "engine": "Webkit",
    "os": "Linux",
    "userid": "demo@joo.la",
    "ip": "127.0.0.1",
    "referrer": "http://joo.la",
    "visits": 1,
    "loadtime": 123
  };
  joola.beacon.insert('collection-name', doc, function(err) { 
    console.log('Document saved');
  });
});

Learn more about pushing data

<script src="https://localhost:8081/joola.js?APIToken=apitoken-demo"></script>
<script>
joola.events.on('ready', function(err) {
  if (err)
    throw err;
    
  var options = {
    caption: 'Visits over Time',
    query: {
      timeframe: 'last_hour',
      interval: 'minute',
      dimensions: ['timestamp'],
      metrics: ['visits'],
      collection: 'collection-demo'
    }
  }
  $('<div></div>').Timeline(options).appendTo('body');
});
</script> 

Learn more about analytics and visualizations

We would love to get your help! We have outlined a simple Contribution Policy to support a transparent and easy merging of ideas, code, bug fixes and features.

If you've discovered a security vulnerability in joola, we appreciate your help in disclosing it to us in a responsible manner via our Bounty Program.

If you're looking for a place to start, you can always go over the list of open issues, pick one and get started. If you're feeling lost or unsure, just let us know.

Contacting us is easy, ping us on one of these:

Copyright (c) 2012-2015 Joola Smart Solutions. GPLv3 Licensed, see LICENSE for details.