avalon-apps-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kevin.s.rul...@mail.sprint.com
Subject RE: InfoMover Interfaces: the Proposals
Date Fri, 16 Aug 2002 20:24:20 GMT

Berin,

How could this support a "fork" in the pipeline.  Say the same data 
needs to be put in two different formats in two different files?

Assume of course, that transactionality is not an issue.

By doing the chaining thing, one could define a sink which does the 
fork and passes the data on to both sides.

Kevin

> -----Original Message-----
> From: bloritsch [mailto:bloritsch@apache.org]
> Sent: Friday, August 16, 2002 3:16 PM
> To: avalon-apps-dev; nicolaken
> Cc: bloritsch
> Subject: RE: InfoMover Interfaces: the Proposals
> 
> 
> > From: Nicola Ken Barozzi [mailto:nicolaken@apache.org] 
> > 
> > Berin Loritsch wrote:
> 
> <snip/>
> 
> > > ---------------- From Me (Third Version) --------------
> > > 
> > > interface Input
> > > {
> > >     Transaction getNextTransaction();
> > > }
> > > 
> > > interface Output
> > > {
> > >     Response process( Transaction trans );
> > > }
> > > 
> > > interface Manipulator
> > > {
> > >     Transaction manipulate( Transaction trans );
> > > }
> > > 
> > > ----------------- NOTES -------------------
> > 
> > First not from me... at a first glance I don't get it... 
> > ...thinking... ...but it seems that you have solved the 
> > threadsafe problem by putting 
> > the extra methods needed to setup first and then execute in 
> different 
> > objects... interesting...
> > 
> > So instead of having one object with three methods to call in 
> > order, we 
> > have three objects each with an atomic method.
> 
> Yes. Think of the Job as the MorphPipeline so to speak.  It forwards
> stuff on to the next stage.
> 
> > 
> > I'm still not sure if this is clever or just illusionism 8-) 
> > but still 
> > thinking...
> 
> Here is the processing loop in code:
> 
> ---------------------------------------------------------------------
> 
> Transaction transaction = null;
> 
> while ( ( transaction = m_input.getNextTransaction() ) != null )
> {
>     Iterator it = m_manipulators.iterator();
> 
>     while ( it.hasNext() )
>     {
>         Manipulator manipulator = (Manipulator) it.next();
>         transaction = manipulator.process( transaction );
> 
>         if ( ! transaction.isSuccessful() )
>         {
>             m_notifier.notify( transaction.getResponse() );
>             break;
>         }
>     }
> 
>     if ( transaction.isSuccessful() )
>     {
>         m_notifier.notify( m_output.process( transaction ) );
>     }
> }
> 
> ---------------------------------------------------------------------
> 
> Another alternative is to have the Input return a TransactionIterator
> or something like that.
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:avalon-apps-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: 
<mailto:avalon-apps-dev-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:avalon-apps-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-apps-dev-help@jakarta.apache.org>


Mime
View raw message