Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 03-12-2004, 01:02 PM   #1
Member (4 bit)
 
Join Date: Sep 2003
Location: Atlanta GA
Posts: 14
Java Programming for Peer to Peer with centralized database

Hi, I have a question about Peer to Peer programming.

I am designing an application that clients can communicate with each other. A real scenario would work as followed:

1. client A becomes active. It starts up local listener, registers its methods locally and remotely (in a centralized database server), and publishs its ip address and port number (here is the problem! discuss it later).

2. client A retrieves user list from the database server ( or called Directory Server), and pick up client B. Client A looks up client B's ip address and port number.

3. client A connects to client B by B's ip address and port number.

As you can see, above will only work if all clients and database server are in the same local network or intranet, or have unique ip in the Internet.

Here is the problem: when client A has a local ip, say 192.168.0.100, and client B has a unique global ip, say 99.120.23.290. So client A will be able to connect to client B, but not vice versa.

To make matter worse, client B could have another local ip address 192.168.10.100.

My question is what information should client publish to the database server in order for other clients to connect back to itself. And under all circumstances, we only do programming, i.e. nothing involved in configuring routers or others.

Any ideas or pointers? Thanks alot.
sfish777 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:49 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2