Sign inSign up

rwthacis/mobsos-query-visualization

By rwthacis

•Updated over 5 years ago

Image
0

3.0K

rwthacis/mobsos-query-visualization repository overview

⁠MobSOS Query Visualization

Build Status codecov Join the chat at https://gitter.im/rwth-acis/mobsos

MobSOS Query Visualization is a Web service for the interactive exploration and visualization of relational data sets. The exploration basically consists in authoring query visualizations that can be persisted, exported to written reports or published on Web sites. Authoring a query visualization consists in three simple steps:

  1. selecting a data set,
  2. formulating a query statement (usually in SQL) and
  3. selecting a visualization type (e.g. pie or bar chart).

Optionally, query statements and visualizations can be parameterized and further described by meta data such as title or display dimensions.

⁠Use

⁠Build

Before you build the project make sure you have set up a database⁠.

mysql -u YOUR_USER -p -e 'CREATE DATABASE QVS;'
mysql -u YOUR_USER -p QVS < db.sql
mysql -u YOUR_USER -p -e "SET GLOBAL time_zone = '+00:00';"

Enter the credentials in the property file⁠. The following values are important:

PropertyDescription
stDbKeyDefault database key
stDbHostHost for the connection
stDbPortPort of the SQL Server
stDbDatabaseName of the database
stDbUserLogin name
stDbPasswordPassword

Execute the following command on your shell:

./gradlew clean build --info

Sometimes the tests would fail on the first run. try the above command again if that happened to you

⁠Deploy

The start_network.bat script uses the L2PNodeLauncher class to start the service. It does also register the content of the "startup" directory and it starts the Web-Connector at port 8080.

For running the frontend server read #frontend⁠

⁠How to run using Docker

First build the image:

docker build . -t mobsos-query-visualization

Then you can run the image like this:

docker run -e MYSQL_USER=myuser -e MYSQL_PASSWORD=mypasswd -p 8080:8080 -p 9011:9011 mobsos-query-visualization

Replace myuser and mypasswd with the username and password of a MySQL user with access to a database named QVS. By default the database host is mysql and the port is 3306. The REST-API will be available via http://localhost:8080/QVS⁠ and the las2peer node is available via port 9011.

In order to customize your setup you can set further environment variables.

⁠Node Launcher Variables

Set las2peer node launcher options⁠ with these variables. The las2peer port is fixed at 9011.

VariableDefaultDescription
BOOTSTRAPunsetSet the --bootstrap option to bootrap with existing nodes. The container will wait for any bootstrap node to be available before continuing.
SERVICE_PASSPHRASEprocessingSet the second argument in startService('service@version⁠', '<SERVICE_PASSPHRASE>').
SERVICE_EXTRA_ARGSunsetSet additional launcher arguments. Example: --observer to enable monitoring.
⁠Service Variables

Variables for service configuration.

VariableDefault
MYSQL_USERmandatory
MYSQL_PASSWORDmandatory
MYSQL_HOSTmysql
MYSQL_PORT3306
INIT_EXAMPLE_DATABASEunset
MYSQL_EXAMPLE_USERexample
MYSQL_EXAMPLE_PASSWORDexample
MYSQL_EXAMPLE_HOSTmysql
MYSQL_EXAMPLE_PORT3306
⁠Web Connector Variables

Set WebConnector properties⁠ with these variables. httpPort and httpsPort are fixed at 8080 and 8443.

VariableDefault
START_HTTPTRUE
START_HTTPSFALSE
SSL_KEYSTORE""
SSL_KEY_PASSWORD""
CROSS_ORIGIN_RESOURCE_DOMAIN*
CROSS_ORIGIN_RESOURCE_MAX_AGE60
ENABLE_CROSS_ORIGIN_RESOURCE_SHARINGTRUE
OIDC_PROVIDERShttps://api.learning-layers.eu/o/oauth2,https://accounts.google.com⁠
⁠Other Variables
VariableDefaultDescription
DEBUGunsetSet to any value to get verbose output in the container entrypoint script.
⁠Frontend

In your frontend, make sure to adjust the data-redirect attribute in the sign-in button of the frontend/demo.html file.

    data-redirect="http://localhost:5500/demo.html"

Also you need to change the data-clientid.

    data-clientid="localtestclient"

You also need to adjust the REST API endpoint. In frontend/js/queryviz.js,adjust the LASHOST variable to reflect the url on which your endpoint is reachable.

var LASHOST='http://127.0.0.1:8080/';

Then you can build and run the frontend server:

npm install
node index.js
⁠Volumes

The following places should be persisted in volumes in productive scenarios:

PathDescription
/src/node-storagePastry P2P storage.
/src/etc/startupService agent key pair and passphrase.
/src/logLog files.

Do not forget to persist you database data

⁠Background

The original use case behind MobSOS QV was the exploration of MobSOS datasets for metrics explaining the success (or failure) of artifacts (i.e. services or tools) provided by a community information system (CIS). Any MobSOS data set comprises automatically collected, cleaned and metadata-enriched usage data as well as end-user-contributed survey data. The exploration of possible CIS success metrics is much more convenient and intuitive with the help of interactive query visualizations. Additional persistence of such query visualizations enables analysts to build up their own CIS success metric catalogues, to create dashboards showing query visualizations on real-time data and ultimately to compile MobSOS-style hierarchical CIS success models. CIS success metrics thereby serve as proxy indicators of certain CIS success factors. These factors in turn are assigned to one of six predefined and scientifically validated CIS success dimensions. The result is a CIS success model to be validated and refined over time to reflect a community's changing understanding of CIS success for given CIS artifacts. However, MobSOS QV quickly turned out to be a rather generic tool for query visualizations on arbitrary relational data sets. It has been used for creating dashboards on the evolution of different scientific or open-source developer communities.

Tag summary

Content type

Image

Digest

Size

203.9 MB

Last updated

over 5 years ago

docker pull rwthacis/mobsos-query-visualization