Peep - an Open Twitter Server

So the stuff I was writing today in Python was more or less what I outlined a while ago while examining Twitter. The idea is to create a Jabber bot which you and friends can subscribe to which will pass messages back and forth between yourselves and Twitter, and hopefully be able to connect somehow in a P2P way with other bots as well. I just wanted to create a proof-of-concept prototype rather than some full-blown project, so I purposefully didn't use many libraries and kept it canonically simple. It uses the Python 2.5 and xmpppy project, but that's about it, so if you want to try it out.

I won't paste the code here as I'm still messing with it, but here's a link to what I got done so far. So far it's very bare bones. It starts up Jabber IM bot (using a log in you give it - I used another ID on my own Jabber server) and when you send a message to the bot, it re-posts what you wrote to Twitter. So rather than having to use the Twitter bot, which may be up or down, you can use your own bot.

It also spawns a basic Web server as well, which doesn't do much of anything at the moment, I just wanted to get it up and running. I tried to add it in a way that it can call back to the global methods from GETs and POSTs, so it should be easy to both re-create the Twitter API and also create an endpoint for a TextMarks SMS API call, enabling posting via mobile. Also, a basic admin page or something could be made - but at that point it might be better to create some sort of generic WSGI interface instead, so it could be plugged into Apache.

Next steps is to start to link everything together. Since the bot is actually just a live Jabber ID, by adding the bot ID in place of your own IM ID on Twitter, the bot won't need to poll Twitter for updates, but rather will get them posted to it automatically (almost pub/sub, hey?). I also want to add in a SQLite or serialized hash of some sort to save messages for later retrieval/archiving and/or syncing if Twitter is offline.

I called the project Peep. The general goal would be to create a simple to use and expand-upon group messaging server that you could throw up on a server that connected a dozen or a hundred people together, expanding on the Twitter API (so all those funky clients could be used), but being able to exist independently of a central store.

If you get what I'm saying and like to help with a *proof of concept*, we can throw the code up in a Google Code SVN server and start wacking away at it together.



< Previous         Next >