Coder Social home page Coder Social logo

twittertop's Introduction

Twitter Topword Tracker

This tool follows a twitter stream and prints out the most frequently encountered words over the given reporting frequency.

This is related to a concept we gave to a customer who wanted to solve this problem a while back. This is a significantly scaled down version, but it can exercise a server pretty hard by doing the following:

What it Does

Count Words

Every tweet that comes in is split into the words that make it up and those words are counted within the tweet. Each word is then incremented against the current time window.

Maintain Top Lists

Also after each tweet, we maintain the top 1,000 words. In order to do this, we do a cas loop where we get the current list, do a giant multi-get of the union of all of the words currently in the list and all of the words we just found to find their current counts, then update the list with this value. The cas frequently fails, and will likely fail more with more -workers.

Reporting

Based on the -interval parameter, a report will be sent to stdout showing the top of the top list. That's currently just a simple get and in-memory ops.

Doing More

In general, twitter only provides a 1% stream of tweets. Using the -multiplier parameter, you can send every tweet through multiple times such that -multipler=100 should approximately equal the traffic of all of twitter (though the words being processed would vary, etc...).

twittertop's People

Contributors

dustin avatar

Stargazers

Alexandre Nicastro avatar Angus H. avatar Cem Ezberci avatar  avatar

Watchers

Thuan Nguyen avatar Richard Smedley avatar Matthew D. Groves avatar Denis Rosa avatar Venkat avatar Leo Schuman avatar  avatar Jeffry Morris avatar Charles Dixon avatar Priya Rajagopal avatar Chris Harris avatar Jake Rawsthorne avatar Dmitrii Chechetkin avatar Pavel Paulau avatar James Cloos avatar Donald Scott avatar  avatar  avatar Hod Greeley avatar Subhashni Balakrishnan avatar Till Westmann avatar Artem Stemkovski avatar  avatar Clarence J M Tauro avatar Sandip Nandi avatar  avatar  avatar James Nocentini avatar Tai  avatar Rohinton Kazak avatar  avatar Jaekwon Park avatar  avatar  avatar Mike Goldsmith avatar Ali Alsuliman avatar Jack Harper avatar Rob Hedgpeth avatar Sarath Kumar Sivan avatar Fabrice Leray avatar Elliot Scribner avatar Fujio Turner avatar  avatar Cyrus Hanlon avatar Matt Hall avatar Gilda avatar Arun Vijayraghavan avatar  avatar Richard Ponton avatar Brian Downs avatar  avatar Daniel James avatar Adam S Levy avatar Daniel Nicholson avatar Parag Agarwal avatar  avatar James H avatar  avatar  avatar  avatar James Powenski avatar Phil Stott avatar Naitik Shah avatar  avatar Anji avatar  avatar David Maier avatar Arunkumar Senthilnathan avatar  avatar Jesse Roberson avatar  avatar Balakumaran G avatar Austin Gonyou avatar Hussain Towaileb avatar  avatar Isaac Lowe avatar Ashwin avatar Murtadha Hubail avatar Roi Katz avatar  avatar Karim Meliani avatar Daniel Ma avatar  avatar Vijay Girish avatar Korrigan Clark avatar Jayahari Vavachan avatar  avatar Keshav Murthy avatar Pascal Gasp avatar  avatar Rob Ashcom avatar Raphaël CHIR avatar David Saadeh avatar Seth Lowie avatar Ryan Kehoe avatar Wael avatar  avatar Raymundo Flores Medina avatar Ludovic DUFRENOY avatar Jared Casey avatar

Forkers

kkumar86

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.