-
Notifications
You must be signed in to change notification settings - Fork 0
Frontend Usage
System forntend is deployed on database machine 172.17.84.79. Frontend offers a REST interface to controll and monitor the app.
The frontend requieres the spark app running to be responsive. In the user folder there is LSF.jar which reresents the most recent build of sprak app. It should be run passing in the 3 reqiered parameters:
LSF.jar
- delay - the delay in seconds specified for twitter streaming api - represents how frequently we query twitter
- window - the tweets buffer size in seconds, it specifies how much data will be processed at a time
- slide - time in seconds, declaring by how much to slide the window over data, should be equal delay
Example parameters LSF.jar 1 1000 1
The manipulation of keywords happens through the url: http://172.17.84.79:8080/lsf/keyword
- GET - lists all keywords that would be sought for
- PUT - requieres two parameters. category specifying the word category can be any string. name specifies the actual keyword to add to database
- DELETE - removes a keyword, requieres a parameter name, specifing the keyword to remove - any data asociated with the keyword is deleted
- GET http://172.17.84.79:8080/lsf/tag - lists every hash tag found by sprak in tweets
- GET http://172.17.84.79:8080/lsf/tag/monitored - lists hashtags scheduled to be analized against used words
- POST http://172.17.84.79:8080/lsf/tag/monitored - requests to monitor a tag and look for keywords in it's contents. requieres a name parameter specifies the tag to be monitored
- GET http://172.17.84.79:8080/lsf/tag/activity - presents how many times each tag was used in speciied timeframe - deault time frame includes all data. the timeframe can be specified by parameters from and to each schould define a date with time in format yyyy-mm-dd yy:mm:ss
The api is analogus to hashtag api - just change the word tag in urls into user
The most general test mechanizm allows to execute arbitraty sql query. The url _http://172.17.84.79:8080/lsf/query can be used to POST query for execution the url should include a parameter sql specifing the query to execute
There are also predefined tests
- GET _http://172.17.84.79:8080/lsf/test - lists availabled predefined test names
- GET _http://172.17.84.79:8080/lsf/test/{name} - executes the test specified by the {name} part of url it should be the one of listed by above url - the test results in time it took to execute it and read whole data returned by it
- GET _http://172.17.84.79:8080/lsf/test/{name}/show - prints the sql hidden behind the test
- GET _http://172.17.84.79:8080/lsf/test/{name}/select - prints the data returend by the test query rather than it's timing
- GET _http://172.17.84.79:8080/lsf/delayTest - requiered name parameter specifing a keyword to test and category parameter specifiing a category for this keyword. The test will insert the specified keyword to database and measure the time it took sprak to save some data about this keyword in database