Hi Alex,

2005/11/26, Alex Cruise <[EMAIL PROTECTED]>:
On a related note, I'm naively considering a move to a semi-synchronous
architecture for my project and have been wondering whether MINA and
specifically StreamIOHandler are a good fit.

Specifically, I have a lot of code that expects to use InputStreams, but
parts of my code also spend a lot of time waiting for external systems
to do their business, during which time I'd prefer not to have useful
threads blocked waiting for them.

I was thinking I could extend StreamIOHandler with a "streaming" flag.
If the streaming flag were set, likely because someone had asked for an
InputStream and not closed it yet, I would fire any received data into
the Piped*Stream pairs, and if not, I would take a more event-driven
approach to handling the block.

Does this sound reasonable?

Are you saying that it would be great if you can switch the mode (semi-synchronous stream I/O and original MINA way)?  If so, this is a wonderful idea.

Thanks,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Reply via email to