Skip to content

khamkham/Laravel-Twitter-MongoDB

 
 

Repository files navigation

Quick implementation of Twitter's Stream API - Aggregations - MapReduce with laravel and MongoDB

all this stuff was made in 3.5 hours, the code is not clean,

it's just for tests and experimentations

all code is not commented, just look the routes :

  • '/' is simili dashboard

  • '/keywords' is for looking keyword after a map reduce

  • '/exec/stream' is for collecting data from Stream API of twitter ( it's quick ~2800 tweets / 10 sec)

  • '/exec/mapreduce' it's for mapreduce all keywords in all tweets

  • '/api/twitter/total' total of tweets in db

  • '/api/hashtag/total' total of hashtags in db

  • '/api/hashtag/aggregate' return collection of 20 most popular hashtag

  • '/api/twitter/keywords/' return paginated list of keywords found in all tweets by mapreduce

so i put my logic in services classes.

don't forget to increase exec_time_limit in phpand install mongo.so or mongo.dll on windows

Voilaaa !

thanks to jenssegers/laravel-mongodb and makotokw/twient for awsome composer packages :o

alt tag

somes potatoes for you !

About

Quick implementation of stream api - aggregations - map reduce with laravel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 91.1%
  • JavaScript 8.5%
  • Other 0.4%