0

Ok programmers, here's one for you.

I'm writing an open source IM client/protocol as a learning exercise and to scratch my itch about some problems with current protocols.

However, I'm poor. I do run a server but off the back of my own low-bandwidth residential connection (which I would rather -not- saturate by running an IM server on it).

I was thinking about the problem and looked into various alternatives (this was before I considered writing my own client/protocol) but there's nothing which doesn't require -any- server hardware.

The reason for this is fairly obvious, in order to keep contact lists persistent and synchronous, the simplest solution is to store them remotely and have the user download their contact list each time they log in.

One solution I did consider was storing the contact list information on USB flash drives but that is far from ideal (not least because I don't have one myself). Another option would be to implement a peer discovery network similar to bonjour, but that would not provide a contact list of your friends, just a contact list of everyone else who's online. More feasible than the USB idea, but the function isn't ideal in this case.

Does anybody have any other ideas for a serverless IM protocol?

Chris Browne
  • 274
  • 2
  • 8
  • You could use web-based email API to access contact lists, such as [Google Contacts Data API](http://code.google.com/apis/contacts/docs/3.0/developers_guide.html) – Ed James Apr 04 '11 at 12:37

2 Answers2

4

Essentially you are talking about a P2P IM protocol (P2P = Peer to Peer). This provides a bunch of options for you, of varying usefulness.

  • Bonjour style peer discovery--and then use a distributed storage mechanism like BitTorrent. Assuming your friend list is small, you can dedicate a certain portion of your hard drive to storing snippets of peoples friend lists. NOTE: make sure the friend lists remain private.
  • Leverage existing services like Yahoo! Mail or GoogleMail to store the user's contact list.

Search around for what other P2P technologies are doing and see if that inspires you.

NOTE: a big challenge for you with a P2P solution is making it so that when two peers are online they are connected to each other. If I had a friend in Japan and I live in America, I'd like to pop open the chat and communicate with them if we happen to be online at the same time. Assuming the contact includes the connection point the IM protocol needs to make the connection, the contact will always be checked in addition to the ad hoc connections.

Berin Loritsch
  • 45,784
  • 7
  • 87
  • 160
  • 1
    BitTorrent requires trackers, which are servers. – vartec Apr 04 '11 at 16:26
  • I didn't say use BitTorrent, but use a mechanism like it. Essentially, you build your peers using the Bonjour style discovery but transfer the bits like BitTorrent would. This replaces the tracker with your Bonjour style peer list. – Berin Loritsch Apr 04 '11 at 17:02
  • @vartec: sort of. Look up dhts. Also note that there can be (un)amusing issues with firewalls... – Paul Nathan Apr 04 '11 at 20:03
  • @Paul: DHT still require servers for peer discovery. – vartec Apr 04 '11 at 20:24
  • More or less what I suggested myself in my question, but helpful in that it confirms my suspicions that this problem is non-trivial. – Chris Browne Apr 04 '11 at 22:36
1

If you want a server try a free tier Amazon EC2 host, they are well free.

Zachary K
  • 10,433
  • 2
  • 37
  • 55