Consuming the Twitter Streaming API with Ruby and MongoDB
summary
A runnable Ruby command‑line script connects to the Twitter Streaming API, authenticates with HTTP Basic, parses the verbose JSON and inserts each status directly into MongoDB using the tweetstream gem and the mongo gem, deployable to Heroku with mongolab. It demonstrates tracking mentions (example: @aplusk), honors deletions, and relies on limits: 400 keywords, 5,000 user IDs, 25 location boxes and one stream per account, letting you collect raw data for later analysis.
AI-written summary · about
chapters (9)
- 0:00Twitter Streaming API intro
- 3:10Streaming API overview
- 8:24Tweet Stream Gem & JSON
- 13:53HTTP Basic Auth setup
- 16:43MongoDB for tweets
- 21:49Ruby script walkthrough
- 27:16Security & GitHub best practices
- 29:39Next steps & applications
- 30:49Q&A
related talks
26mBuilding Stream Processing Applications with Ruby & Meroxa
28mAn Architecture to Tweet Them All
27mCloning Twitter: Rails + Cassandra = Scalable Sharing
30mStupid Ideas For Many Computers
42m"Distributed stream processing in Ruby"
41mInside Twitter's Realtime Delivery of Tweets for Enterprise Customers
35mBlack-boxing with Ruby
46mLightning Talks 2
