# Distributed Semantic Resource Directory

This directory contains the following files:

* [Synthetic Semantic Descriptor Generator](https://labs.etsi.org/rep/iot/smartm2m-semantic-and-query/distributed-semantic-resource-directory/tree/master/Synthetic%20semantic%20descriptor%20generator) that contains a software tool to generate synthetic semantic descriptors and distribute them accross CSEs. The generated data can be loaded into any triple store that will have as many CSE as named graphs, entailing that the triple store will allow querying CSE individually (limiting the queries to one named graph) or to multiple CSEs.
* [STF experiments material](https://labs.etsi.org/rep/iot/smartm2m-semantic-and-query/distributed-semantic-resource-directory/tree/master/STF%20experiments%20material) that contains the scripts and results obtained for the experiments carried during the the STF
* [Sample dataset](https://labs.etsi.org/rep/iot/smartm2m-semantic-and-query/distributed-semantic-resource-directory/blob/master/sample-dataset.zip) that contains a sample dataset generated with the [Synthetic Semantic Descriptor Generator](https://labs.etsi.org/rep/iot/smartm2m-semantic-and-query/distributed-semantic-resource-directory/tree/master/Synthetic%20semantic%20descriptor%20generator), which was used during the experiments of the STF.


In order to perform the different experiments, a regular triple store supporting named graphs is required. The experiments carried out during the STF relyed on a [GraphDB](https://www.ontotext.com/products/graphdb/graphdb-free/) but any other can be used as far as it supports named graphs.

To set up the environment the following steps must be performed:

1) Download and install your choosed triple store
2) Using the [Synthetic Semantic Descriptor Generator](https://labs.etsi.org/rep/iot/smartm2m-semantic-and-query/distributed-semantic-resource-directory/tree/master/Synthetic%20semantic%20descriptor%20generator) generate the data that suits the experimental scenario (number of CSEs, granularity of descriptors, etc.). 
3) Load the data into your triple store.
4) Using the queries provided in the [Synthetic Semantic Descriptor Generator](https://labs.etsi.org/rep/iot/smartm2m-semantic-and-query/distributed-semantic-resource-directory/tree/master/Synthetic%20semantic%20descriptor%20generator) or in the [STF experiments material](https://labs.etsi.org/rep/iot/smartm2m-semantic-and-query/distributed-semantic-resource-directory/tree/master/STF%20experiments%20material) test that the different CSEs generated have individual stores to keep their semantic descriptors, and also that the triple store was correctly populated.
5) Formulate hypothesis, build new queries, and validate the hypothesis.