cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Spörk <>
Subject RE: [C3] StAX research reveiled!
Date Mon, 12 Jan 2009 12:17:28 GMT

I just want to give my thoughts to unified pipeline and data conversion
topic. In my opinion, the pipeline can't do the data conversion, because it
has no information about how to do this. Let's take a simple example: We
have a pipeline processing XML documents that describe images. The first
components process this xml data while the rest of the components do
operations on the actual image. Now is the question, who will transform the
xml data to image data in the middle of the pipeline? 

I believe the pipeline cannot do this, because it simply do not know how to
transform, because that’s a custom operation. You would need a component
that is on the one hand a XML consumer and on the other hand an image
producer. Providing some automatic data conversions directly in the pipeline
may help developers that need exactly these default cases but I believe it
would be harder for people requiring custom data conversions (and that are
most of the cases).

The actual architecture allows to fit any components into the pipeline, and
only the components itself have to know if they can work with their
predecessor or the component following them. That allow most flexibility
when thinking about any possible conversions. If a pipeline should do this,
you would need "plug-ins" for the pipeline that are registered and allow the
pipeline to do the conversions. But then, it is the responsibility of the
developer to register the right conversion plug-ins and you would have get
new problems if a pipeline requires two different converters from the same
to the same data type because the pipeline cannot have automatically the
information which converter to use in which situation.

The only thing cocoon can help here with is to provide as much "standard"
converters for use as possible, but it is still the responsibility of the
developer to use the right ones.

Best Regards,

-----Original Message-----
From: Grzegorz Kossakowski [] 
Sent: Samstag, 10. Januar 2009 23:09
Subject: Re: [C3] StAX research reveiled!

Sylvain Wallez pisze:
> Again I doubt of the real value of a common unified pipeline if all the
> responsibility of ensuring proper compatibility between components
> (including possible data conversion) is delegated to components. This
> leaves a lot of complexity to component implementers (except in the
> simple straightforward push scenario), and the features of the pipeline
> will be limited to linking the components together and caching.

I've been having similar concerns thus I'm eagerly waiting for some non-XML
examples that would change my mind.

> Furthermore, people will have to take great care of choosing components
> that fit together, or they will get exceptions at pipeline execution
> time. Hmm... reminds me of some criticism about the StAX stream API :-D

LOL! :-)

> So let's agree that we disagree. I'll see what you guys come up with and
> hope I'll change my mind then.

I just wanted to say that I share many points with Sylvain even if it's
still hard for me to say which option I prefer.

This will require some more thinking...

Best regards,
Grzegorz Kossakowski

View raw message