Hi, On Tue, 2003-06-17 at 16:05, [EMAIL PROTECTED] wrote: > >What parts of nio does freenet need? > > the selectable channels stuff, more specifically SocketChannel and > ServerSocketChannel > > the selector (of course!) > > java.nio.ByteBuffer; except for the memmapped stuff > > none of the regexp and charset stuff (yet). But we are thinking about doing > those eventually.
Thanks. I have CCed the gcj mailinglist again since Michael Koch is on that list and he is working on this stuff and can hopefully say how much of the above is already working. But remember that the new nio things will not be released before gcc 3.4 which is currently still in stage 1 development, which basically means that a release is still some 6 months away (maybe more). As long as we are still fixing bugs to get current freenet implementations to work on gcj or kaffe and there hasn't been any release of gcj or kaffe with even basic nio support I would not recommend using nio stuff for new versions. For my own project, a Bittorent protocol client, I have just used blocking io with multiple threads. I had thought that I would hit resource limits soon since the client has tens of connections to other peers which each need a thread (for incoming and outgoing traffic). But it did scale very well (on gcj at least, kaffe did give up after more then 50 connections). But the bittorrent protocol is not as complex as freenet and almost completely network i/o driven. Also using multiple threads does make it easier to make some mistakes that can lead to deadlocks if you are not careful. So if you really need a select/poll based non-blocking io interface then I would recommend the NBIO work of Matt Welsh who has also helped design the new java.nio interfaces. NBIO is free software that has seen much production use. And Matt Welsh says: "Migration from NBIO to java.nio should not be difficult. If you are in need of an efficient, working nonblocking I/O library for Java, my recommendation is to go ahead and use NBIO, and move over to java.nio once it is available." There are also Debian packages available (apt-get install libnbio2-java). And the SEDA framework that is build on top of it is also really interesting for designing high-performance servers. See: http://www.eecs.harvard.edu/~mdw/proj/java-nbio/index.html Cheers, Mark _______________________________________________ devl mailing list [EMAIL PROTECTED] http://hawk.freenetproject.org:8080/cgi-bin/mailman/listinfo/devl