cubes – ways of deployment
DESCRIPTION
TRANSCRIPT
![Page 2: Cubes – ways of deployment](https://reader035.vdocument.in/reader035/viewer/2022081807/54963ee9ac7959412e8b4fed/html5/thumbnails/2.jpg)
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
![Page 3: Cubes – ways of deployment](https://reader035.vdocument.in/reader035/viewer/2022081807/54963ee9ac7959412e8b4fed/html5/thumbnails/3.jpg)
WSGI Slicer
Public
store
WSGI
HTML & JS Application
HTTP request
JSON reply
Slicer Flask App
model
Same usage as stand-alone Slicer server
![Page 4: Cubes – ways of deployment](https://reader035.vdocument.in/reader035/viewer/2022081807/54963ee9ac7959412e8b4fed/html5/thumbnails/4.jpg)
Slicer as a Service
Internal
Public
store
Slicer server
Web ApplicationPHP, 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
![Page 5: Cubes – ways of deployment](https://reader035.vdocument.in/reader035/viewer/2022081807/54963ee9ac7959412e8b4fed/html5/thumbnails/5.jpg)
Python Application
from cubes import Workspace !workspace = Workspace(“slicer.ini”) browser = workspace.browser(…) result = browser.aggregate(…)
Public
store
JSON reply
CubesPython API
Django, Flask, …
HTML
model
Python Web App handles the request
Python Web App provides output
1
2
3
Application uses the Cubes directly:
![Page 6: Cubes – ways of deployment](https://reader035.vdocument.in/reader035/viewer/2022081807/54963ee9ac7959412e8b4fed/html5/thumbnails/6.jpg)
Flask Blueprint*
* http://flask.pocoo.org/docs/blueprints/
Public
store
Flask
HTML
Slicer Blueprintmodel
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
![Page 7: Cubes – ways of deployment](https://reader035.vdocument.in/reader035/viewer/2022081807/54963ee9ac7959412e8b4fed/html5/thumbnails/7.jpg)
Summary
![Page 8: Cubes – ways of deployment](https://reader035.vdocument.in/reader035/viewer/2022081807/54963ee9ac7959412e8b4fed/html5/thumbnails/8.jpg)
Slicer server(stand-alone)
HTTP JSONFlask
Slicer Blueprint
HTTP
JSON
Python App? ?
Cubes Python APIWSGI + Slicer serverHTTP JSON
separate integrated
![Page 9: Cubes – ways of deployment](https://reader035.vdocument.in/reader035/viewer/2022081807/54963ee9ac7959412e8b4fed/html5/thumbnails/9.jpg)
LinksCubes Home
cubes.databrewery.org
github
github.com/Stiivi/cubes
Development Documentation
cubes.databrewery.org/dev/doc/for github master HEAD