You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by James Mansion <ja...@mansionfamily.plus.com> on 2007/12/31 11:55:16 UTC

Subprocess connector?

Has anyone considered how subprocesses might be accomodated in mina?

It seems to me that this isn't quite like the serial port active 
connection support since we have three channels to manage.

Perhaps if we had a process starter then we could provide it with two 
acceptor services - one of which will receive a connection from the new 
process' stdin/stdout and one of which will receive a connection from 
stderr?  I'm thinking that if the process starter is given an UUID or 
similar then the peer address could be the UUID.

Be nice to extend this through a process' own standard pipes too.

James




Re: Subprocess connector?

Posted by Brian McCallister <br...@skife.org>.
On Dec 31, 2007, at 2:55 AM, James Mansion wrote:

> Has anyone considered how subprocesses might be accomodated in mina?
>
> It seems to me that this isn't quite like the serial port active  
> connection support since we have three channels to manage.
>
> Perhaps if we had a process starter then we could provide it with  
> two acceptor services - one of which will receive a connection from  
> the new process' stdin/stdout and one of which will receive a  
> connection from stderr?  I'm thinking that if the process starter is  
> given an UUID or similar then the peer address could be the UUID.

No need for UUID, use the pid. That said, I think a connector, rather  
than acceptor, is the right way to think about it. You actively fork  
the subprocess, you don't wait for them to spin off on their own... (I  
hope!)

>
>
> Be nice to extend this through a process' own standard pipes too.
>
> James

Darned tootin handy, I think. Multi-process stuff is unusual in java  
land, but is a nice way to handle a lot of things.

-Brian