|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#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. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|