On Tue, Jun 17, 2003 at 08:09:22PM +0200, Mark Wielaard wrote: > 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.
We may well need the charset stuff in the next 6 months. We probably won't need the regexes, our text-based formats aren't generally particularly amenable to them. > > 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). Whereas Freenet remains pre-alpha and will continue to be for some time. > > 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). This has not been our experience... and we need at least 100 connections for various reasons. > > 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 I had heard occasionally of NBIO. I didn't pay it much notice because Freenet was not working well on free platforms when I tried it. I would very much like it to, but I can't spend project time on it. > > Cheers, > > Mark -- Matthew J Toseland - [EMAIL PROTECTED] Freenet Project Official Codemonkey - http://freenetproject.org/ ICTHUS - Nothing is impossible. Our Boss says so.
pgp00000.pgp
Description: PGP signature
