I've been working on Tuiter. This new release count with two major features: Automatic Reconnection and Gzip compression.
Streaming API connections are incredible powerful and it's very common to keep those connections open all the time. The thing is Twitter closes valid connections very often because of:
- Duplicate clients logins (earlier connections terminated)
- Hosebird server restarts (code deploys)
- Lagging connection terminated (client too slow, or insufficient bandwidth)
- General Twitter network maintenance (Load balancer restarts, network reconfigurations, other very very rare events)
Following the Twitter Team recommendations I made this simple Automatic reconnector for the library.
Twitter give us the oportunity of reduce the streams to 1/5 size using Gzip-formatted data via
Accept-encoding header. Using the header and uncompressing with the help of the node.js core module 'zlib' now all API calls are performed with this format.
For the next release I want to improve the performance of the library and the parameters pre-processing. Don't forget to Fork me on Github!