P2P over Twitter

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
User avatar
AndrewAPrice
Member
Member
Posts: 2298
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

P2P over Twitter

Post 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).
My OS is Perception.
Gigasoft
Member
Member
Posts: 855
Joined: Sat Nov 21, 2009 5:11 pm

Re: P2P over Twitter

Post by Gigasoft »

What advantages does this offer over IRC?
User avatar
Griwes
Member
Member
Posts: 374
Joined: Sat Jul 30, 2011 10:07 am
Libera.chat IRC: Griwes
Location: Wrocław/Racibórz, Poland
Contact:

Re: P2P over Twitter

Post by Griwes »

I think that Twitter doesn't split as often as IRC network :lol:
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
linguofreak
Member
Member
Posts: 510
Joined: Wed Mar 09, 2011 3:55 am

Re: P2P over Twitter

Post 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).
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: P2P over Twitter

Post 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.
Every good solution is obvious once you've found it.
Post Reply