Re: Hello! I have a problem with reconnection...
"Rodney Eng" <[email protected]> Thu, 7 Dec 2006 18:37:19 -0500
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_37547_18423225.1165534639579 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm not quite sure what you mean; could you elaborate a little? My code is multi-threaded but I'm not exactly sure where synch problems could occur. Thanks! On 12/7/06, Mr. Sushimonster <[email protected]> wrote: > > I had similar problems with my project when I first > began. Part of my problem was that I had many threads > running and accessing the various jxta input and > output pipes, and I wasn't careful with > synchronization. After cleaning that part up a bit, I > haven't had much problem. > > --- Rodney Eng <[email protected]> wrote: > > > Hello, > > > > I'm currently working with a group on a prototype > > secure P2P file sharing > > system as an academic project. > > We're working with JXTA through the EZEL/JAL lib, > > though not purely; there > > seem to be some problems with the JAL libraries (for > > instance, one of the > > JAL EZMinimalPeer() constructors forgets to add the > > peer as a listner on > > incoming message events, something that befuddled us > > for some time), so > > we've tried to use JAL where it works and where it > > doesn't, we delve deeper > > into the underlying JXTA code to get things done. > > > > For testing, I've set up one copy of our program > > running on my desktop and > > one on my laptop (they're not on the same subnet, > > BTW; one is running on > > Time Warner cable, the other is hooked into a campus > > wireless network) with > > the desktop as a rendezvous peer and the laptop as > > an edge peer. When run > > for the first time (i.e. without having any > > configuration files in place), > > everything seems to work. The laptop finds the > > desktop and I can exchange > > messages between the two computers; I've been able > > to send messages > > containing books from Project Gutenberg from one > > computer to the other > > without that much trouble. > > > > However, I get problems with I halt the program on > > the laptop. First, the > > desktop doesn't realize the laptop is gone, and > > second, when I bring the > > program back online on the laptop and try to send a > > message, the desktop > > receives the message and responds, but the laptop > > doesn't receive the > > message response sent by the desktop. If I bring > > both computers offline and > > turn them back on with the configuration files > > created in the initial > > session, then they can't exchange messages at all. > > Nothing seems to cure > > this besides completely wiping out the .jxta > > configuration folder, which is > > troubling. > > I've been doing some research on this problem, and > > I'm guessing, does this > > have to do with the Peer and Pipe Advertisements for > > peers and their pipes > > going stale? As in, even though a peer goes > > offline, all the other > > computers in the network still have its > > advertisements. Thus, they still > > think it's online, and when it comes back online for > > real and they try to > > send it a message, the message gets routed to a > > stale pipe advertisement, > > never making it to its intended recipient? > > If I'm right, how could I fix this? Set the > > advertisement lifetime lower? > > If I do that, do I need threads constantly > > republishing the advertisements > > for a peer? > > > > Secondly, could someone give me an overview of the > > security features of > > JXTA? Generally, how could I get peers to > > authenticate with each other to > > exchange messages securely? > > > > Thank you all very much for your help! > > > > - Rodney Eng, Cornell University > > > > > > > > ____________________________________________________________________________________ > Do you Yahoo!? > Everyone is raving about the all-new Yahoo! Mail beta. > http://new.mail.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > ------=_Part_37547_18423225.1165534639579 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm not quite sure what you mean; could you elaborate a little? My code is multi-threaded but I'm not exactly sure where synch problems could occur. Thanks!<br><br><div><span class="gmail_quote">On 12/7/06, <b class="gmail_sendername"> Mr. Sushimonster</b> <<a href="mailto:[email protected]">[email protected]</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> I had similar problems with my project when I first<br>began. Part of my problem was that I had many threads<br>running and accessing the various jxta input and<br>output pipes, and I wasn't careful with<br>synchronization. After cleaning that part up a bit, I <br>haven't had much problem.<br><br>--- Rodney Eng <<a href="mailto:[email protected]">[email protected]</a>> wrote:<br><br>> Hello,<br>><br>> I'm currently working with a group on a prototype<br> > secure P2P file sharing<br>> system as an academic project.<br>> We're working with JXTA through the EZEL/JAL lib,<br>> though not purely; there<br>> seem to be some problems with the JAL libraries (for<br> > instance, one of the<br>> JAL EZMinimalPeer() constructors forgets to add the<br>> peer as a listner on<br>> incoming message events, something that befuddled us<br>> for some time), so<br>> we've tried to use JAL where it works and where it <br>> doesn't, we delve deeper<br>> into the underlying JXTA code to get things done.<br>><br>> For testing, I've set up one copy of our program<br>> running on my desktop and<br>> one on my laptop (they're not on the same subnet, <br>> BTW; one is running on<br>> Time Warner cable, the other is hooked into a campus<br>> wireless network) with<br>> the desktop as a rendezvous peer and the laptop as<br>> an edge peer. When run<br>> for the first time ( i.e. without having any<br>> configuration files in place),<br>> everything seems to work. The laptop finds the<br>> desktop and I can exchange<br>> messages between the two computers; I've been able<br>> to send messages <br>> containing books from Project Gutenberg from one<br>> computer to the other<br>> without that much trouble.<br>><br>> However, I get problems with I halt the program on<br>> the laptop. First, the <br>> desktop doesn't realize the laptop is gone, and<br>> second, when I bring the<br>> program back online on the laptop and try to send a<br>> message, the desktop<br>> receives the message and responds, but the laptop <br>> doesn't receive the<br>> message response sent by the desktop. If I bring<br>> both computers offline and<br>> turn them back on with the configuration files<br>> created in the initial<br>> session, then they can't exchange messages at all. <br>> Nothing seems to cure<br>> this besides completely wiping out the .jxta<br>> configuration folder, which is<br>> troubling.<br>> I've been doing some research on this problem, and<br>> I'm guessing, does this <br>> have to do with the Peer and Pipe Advertisements for<br>> peers and their pipes<br>> going stale? As in, even though a peer goes<br>> offline, all the other<br>> computers in the network still have its <br>> advertisements. Thus, they still<br>> think it's online, and when it comes back online for<br>> real and they try to<br>> send it a message, the message gets routed to a<br>> stale pipe advertisement, <br>> never making it to its intended recipient?<br>> If I'm right, how could I fix this? Set the<br>> advertisement lifetime lower?<br>> If I do that, do I need threads constantly<br>> republishing the advertisements <br>> for a peer?<br>><br>> Secondly, could someone give me an overview of the<br>> security features of<br>> JXTA? Generally, how could I get peers to<br>> authenticate with each other to<br>> exchange messages securely? <br>><br>> Thank you all very much for your help!<br>><br>> - Rodney Eng, Cornell University<br>><br><br><br><br><br>____________________________________________________________________________________<br>Do you Yahoo!? <br>Everyone is raving about the all-new Yahoo! Mail beta.<br><a href="http://new.mail.yahoo.com">http://new.mail.yahoo.com</a><br><br>---------------------------------------------------------------------<br>To unsubscribe, e-mail: <a href="mailto:[email protected]">[email protected]</a><br>For additional commands, e-mail: <a href="mailto:[email protected]">[email protected]</a><br><br></blockquote></div><br> ------=_Part_37547_18423225.1165534639579--