More general questions (P2P involved)

Giganews Newsgroups
Subject: More general questions (P2P involved)
Posted by:  Jeremy Darling (jdarli…@eonclash.com)
Date: Fri, 7 Oct 2005

Ok, I have my chat client up and running at a very basic level.  Now I want
to get into the nitty gritty.  I'm not doing file sharing, just an advanced
chat type system.  Right now a client connects to a server (witch is another
client).  Thus allowing the users to create the rings themselvs.  This is
very uncomfortable, and will result in one client/server being overloaded
quickly.  So its time to add in smart handoffs.

A smart handoff happens any time that their is a resolveable network
overload.  This means that if client/server A has 10 client connections to
it and knows of 5 other available client/servers that it can hand a client
off to that are only at 5 connections each it will hand out 5 of its clients
to these other servers (ideally this would not happen as as the clients
connect they would be handed off to load balance, but it is possiable that
multiple clients connect at the same time thus causing this scenario).

Here is where my problem (and questions) start:
1) How do I know if a user is behind a firewall or can only make an outgoing
connection?
  a) I'm guessing that I can tell the client to try serverx and if it can't
connect then try another, but this seems a litlle ridiculious.
  b) Upon a client connecting the server can attempt to make a connection
back to this client.  This leads to the problem of clients being behind
private walls being registered as reachable when they are not.
  c) A combination of a and b where the server checks the client, then makrs
it as good or bad, if good then it can tell another client to connect to
that system.  If the client fails it asks for another connection.

2) This means that at any time a client could be connected to 2 different
servers (one in handshake and the other handeling messages until the 2nd
server accepts it).  This is handled by the servers and clients properly
already, but can anyone see where (from an IP side) this would cause a
problem?

3) The client's each have their own drawing board and VNC connection that
allows clients to work together to solve problems (its for developers
internal to the company all over the world).  Sending the VNC stuff isn't a
problem, but sending the drawing board is.  I want to break the drawing
board up so as not to congest the network too much (the whole point of P2P
usage).  I know that I will have to do this manually, thus adding another
layer to my messaging system (no problem here).  Drawing only sends the
commands that are releviant (not the entire image) except when a user
connects innitially, then it recieves the drawing boards from all connected
users and sends its drawing board as a broadcast to other users.  Does this
seem like the right way or will it cause congestion on the network?

Basically this is just a sanity check on my behalf before I do work that I
don't need to or that would be irrelivent.

Jeremy

Replies