technoweenie / twitter-node

Discontinued: check out nTwitter
https://github.com/AvianFlu/ntwitter
MIT License
446 stars 547 forks source link

Updating filter should follow Twitter's predicates #12

Open AfraidOfMonsters opened 13 years ago

AfraidOfMonsters commented 13 years ago

When updating the filter track mid stream, the old connection should not be dropped until the new connection is opened and collecting data to avoid tweet data loss as detailed here: http://dev.twitter.com/pages/streaming_api_concepts#updating-filter-predicates

"Connect with your new predicate, wait for the first response, then immediately disconnect the old connection. Keep the window where you are connected twice to an absolute minimum. Sometimes the Streaming API service will disconnect the old connection as it begins to feed the new connection. This step probably requires a multi-threaded development environment, or at the very least, inter-process-communication (IPC) of some sort. But, once this technique is working well, the lost tweets should be practically zero."

technoweenie commented 13 years ago

I'll be happy to merge a pull request for this. I don't use this project anymore.