Turns a negative into a positive by implementing a simple load generator for MongoDB using mentions of @realDonaldTrump via the Twitter Streaming API.
- A Twitter account
- A set of read-only "Twitter Apps" keys (See: Twitter Apps Keys steps below)
- A Percona Server for MongoDB / MongoDB instance, replset or cluster
- Python 2.7 (Python 2.6 and 3.x not tested) with 'pip', 'json' and 'dateutil' modules, ie: "yum install python-pip python-json python-dateutil" on Redhat/CentOS
- Pip dependencies specified in 'requirements.txt' (installed by "make" command)
Smallhands requires Twitter API auth keys. You will need to register a new read-only "app" at https://apps.twitter.com to get a set of Consumer and Access auth key pairs.
Smallhands is self-interested; it frequently creates data but it is unable to read data. This makes it useful for testing inserts only.
The test tweet data is likely to contain unfathomably offensive material, false information, utter nonsense, etc.
git clone https://github.com/timvaillancourt/smallhands
cd smallhands
make
cp example.yml config.yml
# (edit config.yml for your situation)
make run
- Better, trump-themed errors/handling (ie:
TREMENDOUS
,SAD
, etc)
I beat Python with a hammer until it works. Your improvements are appreciated!