Git Product home page Git Product logo

twitstorm's Introduction

TwitStorm

Overview

TwitStorm is a simple Storm topology that calculates the popularity of hashtags appearing in the Twitter Sample Stream. Specifically, it connects to a local redis instance and creates a sorted set called hashtags. Every two minutes, it adds each hashtag it's seen within the last ten minutes to hashtags with a rank equal to the number of times it was seen in that window.

Assumptions

There were several assumptions made in this process, most notably:

  • That the popularity of hashtags wouldn't bottom out immediately: Records are never removed from redis, but as long as a hashtag becomes less popular before disappearing entirely, this should not significantly impact the top-ten readout.
  • That the tweets are received shortly after they are created: Due to time zone issues, it was simpler to use the tweets' receipt timestamps rather than their creation timestamps.

Setup

This project was written in IntelliJ, and no attempt was made to make it run independently. I recommend downloading the free community edition of IntelliJ and running it from there. All java dependencies are specified in the Maven pom file. Before running, make sure you set up your run profile in IntelliJ to contain the JVM flags -Dtwitter.username=YOUR_TWITTER_USERNAME and -Dtwitter.password=YOUR_TWITTER_PASSWORD.

TwitStorm also requires a running redis server on localhost.

twitstorm's People

Contributors

davidh-raybeam avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

davidh-raybeam

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.