mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Creswell" <dan.cresw...@gmail.com>
Subject Re: poll VmPipe
Date Thu, 06 Nov 2008 15:59:29 GMT

On Thu, Nov 6, 2008 at 3:34 PM, Emmanuel Lecharny <elecharny@gmail.com>wrote:

> Dan Creswell wrote:
>> Hmmm, if VmPipe is done right it should allow me to build an app/service
>> on
>> top of MINA that can easily be tested all inside of a single JVM (good for
>> unit testing amongst other things) or deployed fully networked with
>> minimum
>> code disruption.
> Well, if you just use VmPipe to unit test your deployed networked
> development, then I think that the potential improvement you may gain from
> avoiding an encoding/decoding call is irrelevant. More than that, I would
> expect my unit test to behave as the real program works, ie using the
> sockets instead of a fake communication inside the JVM.

Wherever possible it's nice to have unit tests that reflect the real world,
agreed.  However it's not always possible and in fact sometimes it's
advantageous to take some complexity out enabling a broader set of tests
that run faster and allow more convenient testing of the code on either side
of the connection.  This has certainly helped me do basic failure/recovery
testing in the past (though I've not tried this pattern with MINA yet, but
would because it's been useful in the past).

All of that said, you are the maintainers and so ultimately you get to
choose what's appropriate for your code and what you want it to support (and
sometimes you know better than your users).



> AFAIR, the base idea was to eliminate the need to use sockets to exchange
> data between two threads in the same JVM. Blocking queues are ok for such
> purpose those days, no ?

> --
> --
> cordialement, regards,
> Emmanuel L├ęcharny
> www.iktek.com
> directory.apache.org

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message