ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <steve_lough...@hpl.hp.com>
Subject Re: How to pipe output to input?
Date Thu, 23 Jun 2005 16:20:43 GMT
Matt Benson wrote:
> --- Steve Loughran <stevel@apache.org> wrote:

>>>-Matt
>>
>>Interesting design. I would have done a <namedpipe
>>id="" /> datatype 
>>that did the synchronisation; producers and
>>consumers would sync by 
>>choice of pipename.
> 
> 
> That could work, for isolation.  How would you specify
> the roles of producer/consumer?  Not that it matters
> too much, because:


It depends on the role. If you ask a named pipe for an input stream, you 
get an input stream, become a reader and block until there is a writer. 
If you ask one for an output stream, you get an output stream and block 
once the buffer is full. If >1 thing wants to be a reader or writer, 
signal a fault. (in unix you can have multiple readers or writers, but I 
dont want to complicate close() semantics with new reference counted 
closers)

> 
> 
>>But like you say, the problem
>>becomes process 
>>co-ordination; handling failures and propagating
>>them gracefully, or 
>>just how to keep processes around until their
>>consumer/producer was 
>>there. This is the stuff we normally delegate to the
>>OS, or, for 
>>distrubution, to some message queue. Though named
>>pipes work across 
>>clusters, at least on the apollo and hpux cluster
>>systems.
>>
> 
> This grows beyond my level of understanding.  :)

ahh, go and build it, you will soon learn. I've used unix named pipes in 
the past, and think they are a very cool form of IPC; like a socket but 
with better decoupling of produce/consume.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message