How to integrate C-SPARQL in the LBSMA work flows for Bottari
Install and Test Streaming Linked Data Server
download the Streaming Linked Data server (SLDServer) from here
- unzip it
- start it with ./SLD4SM.sh (Linux/Mac) and SLD4SM.bat (Win) and leave it running
download the Streaming Linked Data client (SLDClient) from here
- unzip it
- run it from another console with ./SLD4SM.sh (Linux/Mac) and SLD4SM.bat (Win)
- the SLDClient will ask the SLDServer to start analysing the tweets that express a positive opinion about the points of interest and extract a ranked list of points of interest (top positively judged first). Note that this is done by running queries over SOR to extract the historical tweets and streaming them through C-SPARQL.
- If everything goes well you should see the answer of C-SPARQL being printed on the screen
- Leave the server running
check the control control panel you find at http://localhost:8180/saltluxAdapterControlPanel
- When you open the page it shows:
- The form allows you to change:
Start time: the starting date (the point in time the tweets are streamed from), in format: YYYY-MM-DDThh:mm:ss.0 (e.g. 2010-02-23T00:00:00.0). The default is 2010-02-23T00:00:00.0.
Step: distance between the starting and the ending dates, expressed in xsd:duration format (e.g. PT48H); the amount of tweets that are loaded from SOR at each query (step). The default is 1 day.
Sleep: the delay between two queries (sleeping time). It is expressed in xsd:duration format. The default is no delay. Please note that you request the stream generator to be put in pause, but it can take a while to complete the running query and enter the sleeping mode. After any change, you should restart the stream generator.
- try to control the stream generator
- pause it
- in the SLDClient the answers from C-SPARQL should (disappear/stay the same)
- change the starting time to 2010-07-23T00:00:00.0
- start it again
- look into the SLDClient the answers from C-SPARQL should (re-appear/start changing again)
if everything went fine, you can go and have a break
you successfully installed and tested Streaming Linked Data Server
Install and Test the Two Workflows
download and install the plug-ins following the points 1-3 of this guide
- note that there are two new plug-ins needed for the CSparql workflows: lbsma.sldqueryrewriter and SLDPlugin
- update from the SVN LarKC4LBSMAClient. It now includes two more tests C_SPARQL_ONLY (the 1st query) and C_SPARQL_AND_SOR
- start the SLDServer
- start LarKC
run the LarKC4LBSMAClient to test the C_SPARQL_ONLY work-flow. The first time the result may be empty, because it takes a while to start generating the stream and analysing it. In the following executions (please, remember to comment the part of code that set up a new workflow) you should get results. I left it running for 2 hours yesterday and everything when fine. If you like you can try playing with the control pannel at http://localhost:8180/saltluxAdapterControlPanel
- shut down both LarKC and SLDServer
- start the SLDServer
- start LarKC
run the LarKC4LBSMAClient to test the C_SPARQL_AND_SOR work-flow. As before, the first time the result may be empty, because it takes a while to start generating the stream and analysing it. In the following executions (please, remember to comment the part of code that set up a new work-flow) you should get results. As for the previous work-flow, if you like you can try playing with the control pannel at http://localhost:8180/saltluxAdapterControlPanel. Please note that the two work-flows cannot be active at the same time.
if everything went fine, you can go home (have you seen it's dark already?) and rest ;-); you successfully installed and tested the first full integration of C-SPARQL (and Streaming Linked Data) and LarKC
