RE: JxtaBiDiPipe questions
"Vitaly Vainer" <[email protected]>
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, I have very similar behavior in my application, main difference is that I'm using JxtaSocket instead of BiDiPipe. My suggestion: try similar algorithm when client notifies server with his pip advertisement, but: Client creates server socket and accepts on it, while server tries to connect. In such a case you won't need long timeout. Regards, Vitaly Vainer. -----Original Message----- From: giorgos d. [mailto:[email protected]] Sent: Wednesday, August 03, 2005 6:44 PM To: [email protected] Subject: [JXTA user] JxtaBiDiPipe questions Hello people! Im currently working on a distributed computing system using JXTA. A main aspect of the application is distributing Tasks among peers. My first attempt was using Messages and unicast pipes but the results were not very good: sometimes Messages were lost on the way. Im trying now to use BiDiPipes and i have some questions: 1. In the tutorial a server listens for a connection on his ServerPipe and when that happens sends its msgs. The Client implements a listener on his BiDiPipe (the other end of the ServerPipe?) and responds accordingly. What about the client sending a request to the server? How the server handles these events? The JXTAServerPipe implements an EventListener but how is this used inside the application? 2. My first try with BiDiPipe was this: - Peer A and B on one machine. Multicast TCP enabled on 127.0.0.1. No HTTP. (also i never check the rendevouz peer on either of them, but i guess thats not necessary) - A sends a Request msg to B using B's unicast pipe. on the msg there is a newly created _pipeAdvertisement (unpublished). - A creates a new BiDiPipe and tris to connect() (with a very long timeout) using the new _pipeAdvertisment - B reads the pipeAdvertisment from the Request msg and creates a JXTAServerPipe with it. Sets the timout to 0 and tries to accept(). Then send the Task message. I know that this is somehow the other way around but i thought that with a big timeout the above procedure would be succesful. Well it isnt since Peer A never manages to connect to the serverPipe. Any suggestions/help would be very wellcome. Thank you! Giorgos Doudalis. -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.9/62 - Release Date: 02/08/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.9/62 - Release Date: 02/08/2005