Subject Re: [Firebird-Java] NIO and performance
Author Paulo Gaspar
Another interesting entry by Mike Spille, from a few days later at:
http://jroller.com/page/pyrasun/20040426#emberio_dispelling_nio_myths

This other entry:
http://jroller.com/page/pyrasun/20040416
...is more focused on EmberIO than the other 2 but exposes some
interesting details of the guts of NIO.

My feelling after reading these and other articles about NIO is that:
- It is a lot of effort to develop a robust (and actually faster)
communication solution based on NIO, even because NIO code does NOT
necessarily behave the same on different operating systems;
- It does not always pay back.

In the end, what I know matches David's summary (ByteBuffers being ok
included).

Anyway... good luck Roman,
Paulo Gaspar


David Jencks wrote:

>You might want to look at Mike Spilles comments on NIO and his EmberIO
>project: here's one of his old blog entries.
>
>http://jroller.com/page/pyrasun/20040413#the_genesis_of_emberio
>
>My impression is that (a) ByteBuffers are a good idea and (b) other
>than that NIO won't help much unless you have hundreds to thousands of
>simultaneous requests -- i.e. it is basically useful on a server. I
>don't have much first hand experience however.
>
>thanks
>david jencks
>
>
>
>On May 29, 2005, at 4:16 PM, Roman Rokytskyy wrote:
>
>
>
>>Hi,
>>
>>I have tried to create a version of the wire protocol that uses Java
>>NIO
>>(ByteBuffer and SocketChannel) instead of the code that was optimized
>>by
>>Blas before JayBird 1.0.
>>
>>So far the performance of the NIO solution on multi-user AS3AP tests
>>is up
>>to 10 times lower compared to the current implementation (and also it
>>causes
>>sometimes errors, but that's another issue). However, that is my first
>>try
>>of the NIO package, maybe I did something wrong there...
>>
>>Should NIO usage improve performance, or the main advantage is only
>>non-blocking socket handling?
>>
>>Is there anybody willing to check the implementation and possibly take
>>care
>>of it?
>>
>>Roman
>>
>>