Saturday, August 28, 2010

The Future is here. I just forked a running website:

I recently started working on a Twitter client. This seems like a really stupid idea because there are so many already. My main motivation was the stale development of the Tweetie for Mac client and that I wanted something really, really hackable. Ideally with the ability to do JavaScript plugins.

There comes
  • A Twitter client with a node.js backend that talks to twitter's brand new user stream API
  • This means updates appear in true realtime in your timeline. No polling involved.
  • When you scroll down, streamie maintains your scroll state as new tweets appear. I can't use a Twitter client without this feature
  • It does some more stuff, but is far from finished.

Now be warned. Streamie is ultra alpha. It will probably crash the moment this blog post appears and it might just post goatse pictures to twitter on your behalf.

If you are not scared, read on:

Ultra Hackable

Now on to the title of this post:
Streamie is extremely hackable. You should never really need to do anything with the backend system (unless you want to fix bugs). The frontend has a access to the full Twitter REST API, so all regular features for a Twitter client should be implementable from the frontend.

Now if you want to build your own version of streamie, there are nine easy steps:
  1. Fork Streamie on Github
  2. git branch gh-pages
  3. git checkout gh-pages
  4. git pull origin gh-pages
  5. git submodule init; git submodule update
  6. edit something in ./public
  7. git commit
  8. git push origin gh-pages
  9. Wait a little on the first time
Now go to and visit your new Twitter client.

This is my personal branch.
I love this idea. Maybe it is really stupid and people will make evil clients abusing Streamie's oauth secrets, but maybe this will work and we'll build a great client together :)

This might be a good way to learn all the new hot stuff built into Streamie:


Jef Claes said...

Loving the idea! I will def look into this one of these..

Samurai Jack said...

Great idea. Every online tool should follow this approach..

andrehjr said...

This is awesome!

mostmodernist said...

Wow. Thank you for doing this.

joe said...

Is there any step by step on how to do this for newbie?

Is this suitable for shared server?


Unknown said...

is there any document how to run our own backend?

thanks in advance,
ps: we would like to use it with statusnet

Malte said...

Running your own server isn't really hard, but requires having a node.js 2.0 installation with various very old modules. I'd suggest porting streamie to a modern node as the first order of business.

Kareem Darwish said...

I had a lot of difficulty running a streamie server instance. Can you please help? the first problem i encountered is that most of the node.js modules that the setup proceedure tries to install (sudo sh deps) were much older that is what is available. I updated the version numbers in the "deps" file. I had to adjust .git/config to make the Socket.IO all lowercase. git submodule update led to a fatal error:
fatal: reference is not a tree: 336331a32ce7e820da2ce0a2894bde61f0666462
Unable to checkout '336331a32ce7e820da2ce0a2894bde61f0666462' in submodule path 'public/ext/'
After following the rest of the steps, I got the following error:
throw e; // process.nextTick error, or 'error' event on first tick
TypeError: object is not a function
at Object.CALL_NON_FUNCTION (native)
at Object. (/Users/kareemdarwish/RESEARCH/STREAMIE/streamie/lib/oauth.js:4:14)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object. (/Users/kareemdarwish/RESEARCH/STREAMIE/streamie/lib/server.js:6:16)
at Module._compile (module.js:441:26)

Malte said...

Streamie relies on very, very old version of Node. Feel free to port it to a modern version, but it will be a non-trivial effort.