Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cubes – Ways of Deployment

Cubes – Ways of Deployment

Different ways of deploying Cubes - Lightweight Python OLAP frameworks.

Stefan Urbanek

February 04, 2014
Tweet

More Decks by Stefan Urbanek

Other Decks in Technology

Transcript

  1. Ways of Cubes
    Deployment
    data brewery
    Stefan Urbanek ■ @Stiivi ■ [email protected] ■ February 2014

    View full-size slide

  2. Simple Slicer
    Public
    store
    Slicer server
    HTML & JS
    Application
    HTTP request
    JSON reply
    model
    Run Slicer server
    Provide desired output
    1
    3
    2 Query server from JavaScript
    GET /cubes
    !
    GET /cube/{CUBE}/model
    !
    GET /cube/{CUBE}/aggregate?…
    > slicer serve slicer.ini

    View full-size slide

  3. WSGI Slicer
    Public
    store
    WSGI
    HTML & JS
    Application
    HTTP request
    JSON reply
    Slicer Flask App
    model
    Same usage as stand-alone Slicer server

    View full-size slide

  4. Slicer as a Service
    Internal
    Public
    store
    Slicer server
    Web Application
    PHP, RoR, Django
    HTTP request
    JSON reply
    model
    HTML
    GET /cube/{CUBE}/aggregate?…
    Run a Slicer server instance
    Provide desired output
    1
    3
    4
    Query with HTTP requests
    2 Get the model using HTTP
    GET /cubes
    !
    GET /cube/{CUBE}/model

    View full-size slide

  5. Python Application
    from cubes import Workspace
    !
    workspace = Workspace(“slicer.ini”)
    browser = workspace.browser(…)
    result = browser.aggregate(…)
    Public
    store
    JSON reply
    Cubes
    Python API
    Django, Flask, …
    HTML
    model
    Python Web App handles the request
    Python Web App provides output
    1
    2
    3
    Application uses the Cubes directly:

    View full-size slide

  6. Flask Blueprint*
    * http://flask.pocoo.org/docs/blueprints/
    Public
    store
    Flask
    HTML
    Slicer Blueprint
    model
    from flask import Flask
    from cubes.server import slicer
    !
    app = Flask(__name__)
    !
    app.register_blueprint(slicer,
    url_prefix=“/slicer",
    config="slicer.ini")
    Register Slicer as part of Flask app
    Provide Slicer API as additional

    “raw analytical data” API
    do whatever you want in Flask
    1
    2

    View full-size slide

  7. Slicer server
    (stand-alone)
    HTTP JSON
    Flask
    Slicer Blueprint
    HTTP
    JSON
    Python App
    ? ?
    Cubes Python API
    WSGI + Slicer server
    HTTP JSON
    separate integrated

    View full-size slide

  8. Links
    Cubes Home
    cubes.databrewery.org
    github
    github.com/Stiivi/cubes
    Development Documentation
    cubes.databrewery.org/dev/doc/
    for github master HEAD

    View full-size slide