tapilab / theissier

Master's project
Apache License 2.0
0 stars 0 forks source link

theissier

[Procfile for heroku]

Installation & Configuration

If you don't have node.js running on your machine go to : http://nodejs.org/ download and install the current version -> Project running on version 2.4.8.

If you don't have MongoDB running on your machine go to : http://www.mongodb.org/ download and install the current version -> Project running on version v0.10.24.

If you don't have ElasticSearch running on your machine go to : http://www.elasticsearch.org/ download and install the current version -> Project running on version version[0.90.11].

ElasticSearch setup

You should index some documents (tweets) into an ElasticSearch index with the bulk API

INDEX NAME HAS TO BE : tweets
INDEX TYPE HAS TO BE : tweet

Command to run :

curl -s -XPOST localhost:9200/_bulk --data-binary @myfilename; echo

where myfilename has to be structured like that :

{"index": {"_index": "tweets", "_type": "tweet", "_id": "468510797367615488" }} 
{ yourJsonTweet }  
{"index": {"_index": "tweets", "_type": "tweet", "_id": "468509383576801280"}}
{ yourJsonTweet } 
etc...

Documentation of ElasticSearch on the Bulk API : http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-bulk.html

Python setup

Node.js & python scripts run on two different processes. They can communicate and send data to each other thanks to ZeroRPC library : http://zerorpc.dotcloud.com/ Install ZeroRPC libraries:

If you have errors: It might be because zeroMQ and libtool libraries are not installed on your machine. I succeeded in installing zeroRPC library after executing this command :

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-e

Overview of system architecture

The system is composed of :

Example of a /search request performed by the user:

Alt text

Example of a /affectscore request performed by the user when clicking on YES or NO buttons:

Alt text

Example of a /train request performed when the user clicks on the TrainClassifier button:

Alt text

Launch the app