P2P over Twitter
Posted: Mon May 21, 2012 4:15 pm
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:
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).