• Stars
    star
    172
  • Rank 221,201 (Top 5 %)
  • Language
    Ruby
  • Created almost 15 years ago
  • Updated over 12 years ago

Reviews

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

Repository Details

Simple example of Twitter + AMQP + RabbitMQ + EventMachine + HTML5 WebSocket with no polling

Twitter AMQP WebSocket Example

Quick experiment of going from twitter to the browser, with no polling.

It goes something like this:

Twitter Stream → Filter → RabbitMQ → AMQP → EventMachine → WebSocket → HTML5 Browser

Since it uses a fanout exchange on RabbitMQ, it allows to have multiple clients connected to the eventmachine loop and receive the same real-time updates (and hopeful it will scale).

Requirements

  • Ruby
  • RabbitMQ
  • gem install bundler

How To

  1. bundle install (first time, to install the dependencies)
  2. rabbitmq-server # start rabbitmq
  3. ruby twitterfeed.rb twitter_username twitter_password # start the filter
  4. ruby socket.rb # on another shell

Then you can open client/index.html on a HTML5 WebSocket compatible browser (tested with Webkit nightly).

Read the code, and have fun! :)

More Repositories

1

map_crowd_reduce

Massively Distributed Browser-based Javascript Map Reduce Framework. node.js + socket.io (websockets) + webworkers + fun = global warming
JavaScript
136
star
2

fastimage

Finds the type and/or size of a remote image given its uri, by fetching as little as needed.
Go
90
star
3

rails-configd

Online rails configuration generator using etcd as source data
Go
34
star
4

motion-bt-low-energy-example

Simple example of using Bluetooth LE with RubyMotion to connect to a Heart Rate monitor
Ruby
29
star
5

gowalla-osx

[DEAD] Gowalla client(ish) for OS X with a MacRuby flavor
Objective-C
17
star
6

titanium-dropbox

Titanium Dropbox module for iOS
Objective-C
13
star
7

titanium-social

iOS6 Social module for Titanium
Objective-C
11
star
8

titanium-dropboxsync

DropboxSync module for Titanium Mobile iOS
Objective-C
8
star
9

titanium-webserver

Embed HTTP server module for Titanium iOS applications
Objective-C
8
star
10

tarpipe-ruby

Ruby bridge to tarpipe.com's REST API
Ruby
7
star
11

penetrate

penetrate for iOS maps network names into the default keys of known routers
Objective-C
7
star
12

titanium-keychain

Titanium mobile iOS Keychain module
Objective-C
6
star
13

ruby-http2xmpp

A HTTP to XMPP bridge written in Ruby
6
star
14

twitter-streamer-hub

node.js all-purpose, generic twitter UserStreams client hub
JavaScript
5
star
15

sinatra-capistrano-workshop

Code written during the Sinatra and Capistrano workshop at 06/03/2009, in Lisbon
Ruby
4
star
16

DudeNZB

Yet another Cocoa hellanzb frontend (with a MacRuby flavor)
Objective-C
4
star
17

whitme

Ruby library for the URL shortener service whit.me
Ruby
3
star
18

nzbmatrix_pogdesign_safari5

NzbMatrix PogDesign TV Calendar Safari 5 Extension
JavaScript
3
star
19

musicbox

workshop and fun experiment to access SAPO's MusicBox service as an API
Ruby
3
star
20

twitter_auth-with-couchdb

Twitter Auth, CouchDB flavor
Ruby
2
star
21

titanium-twitter

iOS5 Twitter iOS module for Titanium mobile
Objective-C
2
star
22

newzbin_xmpp

Ruby XMPP agent to search the newzbin.com website
Ruby
2
star
23

puny

Ruby library for the URL shortener service created by SAPO
Ruby
2
star
24

pogdesign_newzbin_chrome

Chrome extension to add newzbin download icons to pogdesign tv series calendar
JavaScript
2
star
25

validates_email_whitelist_of

Validates e-mail address format (RFC2822 and RFC3696) and whitelist / blacklist the domain part
Ruby
1
star