Re: [jgroups-dev] jgroups port to android
Vladimir Blagojevic <[email protected]> Tue, 11 Jan 2011 08:14:20 -0300
| Newsgroups | gmane.comp.java.javagroups.devel |
|---|---|
| Message-ID | <[email protected]> |
Awesome!!! Yann, can you blog about it/write a summary? Regards, Vladimir On 11-01-11 4:19 AM, Bela Ban wrote: > Hi Yann, > > (don't forget to post to jg-dev...) > > Inline > > On 1/10/11 9:38 PM, Yann Sionneau wrote: >> Hello, >> >> Good news ! It's working on android 2.1 2.2 and 2.3 ! > > Great ! > > >> I have tested the SimpleChat application with 3 phones connected >> together (1 HTC Desire on 2.3, 1 Nexus One on 2.2 and 1 HTC Hero on 2.1) >> with 2 computers (1 Mac OS X Snow Leopard and 1 Ubuntu). >> >> All of these devices were connected to the same wifi subnetwork. >> I used your Broadcast PING which did a good job ! >> my udp.xml conf : http://pastebin.com/HnNfukxa >> >> It was working just fine :) > > I see you used the default broadcast address of 255.255.255.255 without > issues, good... > > >> I ported the Draw demo from jgroups to android too (with several >> modifications so that it's not compatible anymore with the PC version >> included in your git repository). >> It worked well with the phones :) > > Do you think there's a chance we can merge those changes back into the > regular Draw, so we have 1 version. Or is this too cumbersome ? > > >> Just one strange thing, if I draw on one phone, then start the app on a >> second phone, the second phone does not get the history of the drawing, >> it starts all blank. Is it normal ? > Yes. By default, Draw doesn't do any state transfer (state == content of > the canvas). If you start Draw with -state, it'll transfer the canvas. > > >> With SimpleChat all the history was transmitted when joining the group. > > Yes, because SimpleChat by default uses state transfer. > > >> Another question, I had troubles with this file : >> src/org/jgroups/stack/RangeBasedRetransmitter.java , I modified it like >> this : >> https://github.com/fallen/JGroups/commit/959608be03f9e050fce2527e408f555062e4ab81 > > I made a comment: this is a bug, as the keys (= execution times) will > need to be ordered. So you could use TreeMap, but would then have to > synchronize access to it, as TreeMap is not synchronized. > > The better solution (for now) is to use DefaultRetransmitter wherever > RangeBasedRetransmitter is used. I had a configuration switch, but > removed it some months ago because RangeBasedRetransmitter works really > well. > > This is used by UNICAST2 and NAKACK, via NakReceiverWindow. > > >> So I replaced the ConcurrentSkipListMap by a ConcurrentHashMap, because >> ConcurrentSkipListMap is not available in Android 2.1 and 2.2 (it's only >> available since 2.3 !) > > See my comment above > > >> It seems to be working just fine, but in theory i am loosing the ordering in the HashMap, is this a serious issue ? > > Yes, it is > > >> Or am I fine like >> that ? Am I going to be in trouble later with bigger programs ? > > The exceution times are off, so when you run into retransmissions, they > might get executed at an incorrect time (= too late). > > >> I do not understand fully the possible side effects of this change ! >> >> Thank you again for all your help, you have been more than helpful :) > > No problem. Let me know when the application is available, I'd like to > try it out ! > > ------------------------------------------------------------------------------ Gaining the trust of online customers is vital for the success of any company that requires sensitive data to be transmitted over the Web. Learn how to best implement a security strategy that keeps consumers' information secure and instills the confidence they need to proceed with transactions. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Javagroups-development mailing list