Successfully reported this slideshow.

Cubes – ways of deployment


Published on

Published in: Technology
  • Can you please explain about slicer as service and python application method.
    Are you sure you want to  Yes  No
    Your message goes here

Cubes – ways of deployment

  1. 1. data brewery Ways of Cubes Deployment Stefan Urbanek ■ @Stiivi ■ ■ February 2014
  2. 2. Simple Slicer 1 HTML & JS Application > slicer serve slicer.ini HTTP request Public Run Slicer server JSON reply 2 Slicer server Query server from JavaScript GET /cubes ! GET /cube/{CUBE}/model ! model store GET /cube/{CUBE}/aggregate?… 3 Provide desired output
  3. 3. WSGI Slicer HTML & JS Application HTTP request Public JSON reply WSGI Same usage as stand-alone Slicer server Slicer Flask App model store
  4. 4. Slicer as a Service HTML 1 Public Web Application PHP, RoR, Django Run a Slicer server instance 2 Get the model using HTTP HTTP request GET /cubes ! GET /cube/{CUBE}/model JSON reply Internal 3 Slicer server GET /cube/{CUBE}/aggregate?… model 4 store Query with HTTP requests Provide desired output
  5. 5. Python Application 1 Public Python Web App handles the request 2 HTML Application uses the Cubes directly: JSON reply from cubes import Workspace ! Django, Flask, … Cubes Python API workspace = Workspace(“slicer.ini”) browser = workspace.browser(…) result = browser.aggregate(…) model 3 store Python Web App provides output
  6. 6. Flask Blueprint* 1 Register Slicer as part of Flask app HTML from flask import Flask from cubes.server import slicer Public ! Flask app = Flask(__name__) Slicer Blueprint ! model app.register_blueprint(slicer, url_prefix=“/slicer", config="slicer.ini") store 2 Provide Slicer API as additional
 “raw analytical data” API do whatever you want in Flask *
  7. 7. Summary
  8. 8. HTTP Slicer server (stand-alone) HTTP JSON Slicer Blueprint ? HTTP WSGI + Slicer server Flask Python App JSON Cubes Python API separate integrated JSON ?
  9. 9. Links Cubes Home github Development Documentation for github master HEAD