Source Download and Installation Instructions

Source code for all tools accompanying CityBench together with details to set up testbed infrastructure can be download from CityBench Source Code at github Below are the instructions to download, install and setup testbed.

Installation Instruction

CityBench is a java-based benchmarking toolset for RSP engines, currently CQELS and C-SPARQL are supported.

CityBench Benchmark Prerequisite

* JVM 1.7
* Webserver of your choice (JBoss,Tomcat etc.)
* Java IDE (for debugging and extensions)

Folders & Files

* cqels_query: sample queries in CQELS syntax;
* csparql_query: sample queries in C-SPARQL syntax;
* dataset: background knowledge base, mostly sensor service repositories;
* ontology: ontologies used;
* result_log: output files generated by CityBench, e.g., query latency, result count and memory consumption;
* src:source code;
* lib: libraries used;
* streams: sensor observation raw data in .csv formats, used to generate RDF streams´╝Ť
* EC-log: logger file output;
* configuration file loaded by CityBench.

To run

* Download all resources and source code
* Import to your Java IDE and run Or
* Use "java -jar" command to execute the CityBench.jar

Configuration file

* dataset = dataset/[your_sensor_repository_file]
This configuration tells CityBench where to look for static background knowledge.

* ontology = [your_ontology_folder]
This configuration tells CityBench where to look for ontologies used.

* streams = [your_streams_folder]
This configuration tells CityBench where to look for raw data to simulate sensor streams.

* cqels_query = [your_cqels_queries_folder]
This ocnfiguration tells CityBench where to look for cqels queries.

* csparql_query = [your_csparql_queries_folder]
This configuration tells CityBench where to look for csparql queries.

Please note all paths are relative path to the project root
Normally if you use the downloaded resources as they are, you would not need to change the default content in the configuration file. The exception is the dataset property: you might want to change the default sensor repositories and use a different repository file (e.g., dataset/simrepo-5-10.n3) in order to test the performance of the cqels engine with different KB sizes loaded.

Program Parameters

Acceptable params:

* rates = (double)x,
This parameter sets the sensor stream acceleration rate (based on real world sensor observation intervals).

* queryDuplicates = (int)y,
This parameter sets the number of duplicate queries to run concurrently.

* duration = (long)z,
This parameter sets the duration of the test in milliseconds.

* startDate = (date in the format of "yyyy-MM-dd'T'HH:mm:ss")a,
This parameter sets the start time of sensor observations from where CityBench should start consuming the streams.

* endDate = b,
This parameter sets the end time of sensor observations till when CityBench should continue consume the streams.

* frequency = (double)c.
This parameter sets the fixed frequency for sensors, only has effect when rate=1.0

* engine = "cqels" or "csparql"
This parameter sets the RSP engine to test.

* query = (String) q
This parameter is file name/names of the queries to run (under cqels_query or csparql_query), multiple files should be separated with ","

* Note: engine, start and end dates are mandatory.

* Also notice for C-SPARQL tests:
Some C-sparql queries needs loading static knowledge bases, those queries contains clauses like " FROM ".
To load such RDF files, deploy the rdf files under "dataset/csparql_web_server/" on your local web server and make sure they are accessible from the url specified in the clause (you can change the url according to your web server configuration).