Page 1 of 1

P2P over Twitter

Posted: Mon May 21, 2012 4:15 pm
by AndrewAPrice
Twitter is a great platform for broadcasting short messages (tweets) to the public. It offers a "streaming API" that allows you to retrieve messages in real-time.

This got me wondering - Twitter could be used by applications as a medium for decentralized communication or broadcasting over the Internet.

For example, imagine you're a small bedroom developer that creates a video game that can be played online.

Players should be able to start your game, select "Find network game", and it'll list games (hosted by other players) in progress and let you join in. Normally, you'd need your own server for these remote servers to connect to register themselves with, but let's say you're a poor student who can't afford to run this. You could use Twitter instead.

You could create a Twitter channel for your game - e.g. #GAMENAME_MAGICNUMBER.. e.g. #MyUberGame_ASD123. Now, all clients could be listening to "#MyUberGame_ASD123", and running servers can periodically tweet every minute or so: "#MyUberGame_ASD123 Server on IP 134.75.38.8 Players 4/10 NoPswd Map10". The disadvantage is that the client must be running for at least 60 seconds to listen to all of these messages. Servers that haven't tweeted for a couple of minutes can be considered dead.

I think there are many other things you could communicate over Twitter:
  • Finding torrent trackers
  • Individual game messages. Imagine the player is playing a turn-based game - their unique game ID is #8473, when they perform actions they could tweet:
    #MyUberGame_ASD123_8473 move 83 to 37, 20
    #MyUberGame_ASD123_8473 end turn
    Anyone could spectate if they knew the unique game ID.
  • A name server.
  • IP Over Twitter (hosting services behind a firewall).

Re: P2P over Twitter

Posted: Mon May 21, 2012 4:42 pm
by Gigasoft
What advantages does this offer over IRC?

Re: P2P over Twitter

Posted: Mon May 21, 2012 4:44 pm
by Griwes
I think that Twitter doesn't split as often as IRC network :lol:

Re: P2P over Twitter

Posted: Mon May 21, 2012 5:28 pm
by linguofreak
I wonder what Twitter's terms of service would have to say about this.

Even if there isn't anything in Twitter's current terms of service that would prohibit it, I imagine the terms of service might be changed to prohibit some or all of the things listed in the OP, because I can imagine some of them (IP over Twitter, for instance) could accidentally (D)DoS Twitter fairly easily (Say, a bunch of people torrenting a multi-gigabyte file over IP over Twitter).

Re: P2P over Twitter

Posted: Tue May 22, 2012 3:39 am
by Solar
linguofreak wrote:I wonder what Twitter's terms of service would have to say about this.
Pretty easy - last time I looked, they had a rather tight upper limit on the number of updates / downlinks from an account.

I remember because I used a Twitter account for a soccer live ticker: A PHP script would poll the Twitter account, read its messages (which I did send from my mobile while watching the game), and create a self-updating website from it (including stuff like "4th minute - corner for the home team, but to no avail." or "72th minute - GOAL! 1:0 by Rasp!"). The limit was low enough to make me cache the messages in a central file, instead of polling for every visitor, despite the number of visitors being in the low three-digit range.

I.e., yes, Twitter works well for extremely low-bandwidth solutions. If you exceed the limit, your account will be shut down.

IP over Twitter? I don't think so. Besides, if you have a serious (company) firewall, lots of connections to twitter.com will get noticed. People installing firewalls like that don't like people tunneling them.

Edit:
Twitter wrote:You may not do any of the following while accessing or using the Services: [...] (v) interfere with, or disrupt, (or attempt to do so), the access of any user, host or network, including, without limitation, sending a virus, overloading, flooding, spamming, mail-bombing the Services, or by scripting the creation of Content in such a manner as to interfere with or create an undue burden on the Services.