• Stars
    star
    152
  • Rank 244,685 (Top 5 %)
  • Language
    Ruby
  • Created over 12 years ago
  • Updated about 12 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

realtime Twitter trending hashtags computation using RedStorm / Storm

Tweitgeist v1.2.0

Tweitgeist analyses the Twitter Spitzer hose and compute in realtime the top trending hashtags using RedStorm/Storm. What makes this interesting other than being a cool Storm example, is the fact that this architecture will work at full Twitter Firehose scale without much modifications.

There are three components:

  • The Twitter Spitzer stream reader which pushes messages in a Redis queue
  • The Redstorm analyser which read the Twitter stream queue, computes the trending hashtags and output the top N list every 5 seconds in a Redis queue
  • The viewer UI for the visualization

Dependencies

This has been tested on OSX 10.6+, Linux 11.10 & 12.04 using JRuby 1.6.x for the RedStorm topology and Ruby 1.9.x for the Twitter Spitzer hose reader.

Installation

  • Redis is required
  • RVM is highly recommended as you will need to work with both Ruby/JRuby and different gemsets.

Redstorm backend

  • requires JRuby 1.6.x

  • set JRuby in 1.9 mode by default

    export JRUBY_OPTS=--1.9
  • install the RedStorm gem using bundler with the supplied Gemfile

    $ bundle install
  • run RedStorm installation

    $ bundle exec redstorm install
  • package the topology required gems

    $ bundle exec redstorm bundle topology
  • if you plan on running the topology on a cluster, package the topology jar

    bundle exec redstorm jar lib/tweitgeist/

Twitter Spitzer stream reader

  • requires Ruby 1.9.x

  • install required gems using bundler with the supplied Gemfile

    $ bundle install

Viewer

  • requires Node.js

    $ sudo apt-get install nodejs
  • requires npm

    $ sudo apt-get install npm
  • install CoffeeScript if you want to modify the Node.js server

    $ npm install -g coffee-script
  • install other dependencies

    $ cd lib/viewer
    $ npm install .

Usage overview

Redstorm backend

  • requires JRuby 1.6.x

  • set JRuby in 1.9 mode by default

    export JRUBY_OPTS=--1.9

RedStorm backend in local mode.

$ bundle exec redstorm local lib/tweitgeist/storm/tweitgeist_topology.rb

RedStorm backend in remote cluster mode.

$  bundle exec redstorm cluster lib/tweitgeist/storm/tweitgeist_topology.rb

Twitter Spitzer stream reader

  • requires Ruby 1.9.x

  • edit config/twitter_reader.rb to add your credentials

$ ruby lib/tweitgeist/twitter/twitter_reader.rb

Viewer

$ coffee server.coffee --port 8080 --host 127.0.0.1 --redis-port 6379 --redis-host 127.0.0.1

or (with simulated data in case of no redis)

$ coffee server.coffee --port 8080 --host 127.0.0.1 --mock

Author

Colin Surprenant, @colinsurprenant, https://github.com/colinsurprenant, [email protected]

Contributors

Francois Lafortune, @quickredfox, https://github.com/quickredfox, [email protected]

Nicholas Brochu, @nbrochu, https://github.com/nbrochu, [email protected]

License

Tweitgeist is distributed under the Apache License, Version 2.0.

More Repositories

1

redstorm

JRuby on Storm
Ruby
298
star
2

bloombroom

Ruby/JRuby bloom filters for bounded and unbounded (streaming) data, FNV hashing and bit fields
Ruby
106
star
3

hotwater

Fast Ruby FFI string edit distance algorithms
Ruby
81
star
4

raad

Ruby as a Daemon
Ruby
48
star
5

geokdtree

Fast Ruby FFI k-d tree with support for latitude/longitude and geo distance range search
C
48
star
6

storm-jruby

Storm JRuby integration
Ruby
19
star
7

redstorm-starter

Example RedStorm topologies and specs
Ruby
10
star
8

localforkedclone

Automatic configuration for local Git repository from a project fork
Shell
10
star
9

bunnypunisher

Ruby stress tests for qpid, amqp and RabbitMQ
Ruby
10
star
10

qpid

Repackaged and Gemified version of the Apache Qpid AMQP client implementation in Ruby, version M3
Ruby
8
star
11

memcached-config

cache_fu/acts_as_cached memcached.yml config parser
6
star
12

asynchrony

example async app using Sinatra and Grape with support for streaming
Ruby
5
star
13

scout-memcached-stats

Scout plugin to monitor and gather statistics of a memcached server
4
star
14

fast_fuzzy

Fast and fuzzy text pattern matching using Lucene analyzers
Ruby
3
star
15

logstash-antlr-config

logstash ANTLR configuration parser
ANTLR
3
star
16

devopsmtl-docker

DevOps Montreal Meetup Docker Presentation
Shell
3
star
17

montrealrb-redis-zeromq

Montreal.rb presentation on intro in Redis & 0MQ messaging with Ruby
Ruby
2
star
18

jruby-stdin-channel

JRuby extension to expose an interruptible NIO FileChannel for STDIN
Java
2
star
19

jruby-mmap

JRuby extension to Java NIO Mmap
Java
2
star
20

redstorm-benchmark

Java/JRuby comparative benchmark topologies
Java
2
star
21

fsqstalk

Foursquare Stalker
Ruby
1
star
22

artup-starter

artup-starter
JavaScript
1
star
23

jruby-mmap-benchmark

JRuby memory mapped file benchmarks
Ruby
1
star
24

jrubyconf-2015

JRubyConf.EU 2015 talk material
Ruby
1
star
25

jruby-mmap-queues

JRuby persistent queues using Java NIO Mmap
Ruby
1
star