You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Aleksander Slominski <as...@cs.indiana.edu> on 2001/02/06 07:11:18 UTC

streaming outbound messages (was Re: [Vote] 1 Msg or 2)

Sanjiva Weerawarana wrote:

> > I seem to have lost the battle for streaming the inbound message.  I must
> > agree that conformance to the spec is a fairly compelling argument.
>
> I don't think you have- my view is that what's in the "IncomingMessage"
> is a source from which the message can be accessed. It *must* be in
> a streaming form (SAX) at the lowest level IMO and if someone wants it
> in another form they hafta ask for it. When they do ask for it, then
> the canonical form that's "currently available" will become whatever
> the other form is. We can always generate SAX from DOM, DOM from JDOM
> etc., but there's clearly a price to pay. That's where smart ordering
> of the handlers will pay off. As I said in the last telecon, we only
> give make the gun; you pull the trigger yourself.
>
> > So now, I ask: can the outbound message be streamed?  It seems to me that a
> > fairly common scenario would be that the inbound message is a selection
> > criteria, and the outbound message is the results of a database query.

hi,

i agree that it is good to have multiple interfaces to access inbound message.

i would put them in this order:
* pull parser or MessageElement/XMLElement (as proposed by James Snell)
* SAX as it is easy to convert pull parser XML events into SAX events
* DOM or JDOM as it can always be built from SAX events or pull parser events

however i think that streaming outbound messages in HTTP/1.0 is almost impossible
and not that useful as to create valid POST it is necessary to known
Content-length - i do not know other way to do it (and get through HTTP
proxies...) maybe except creating invalid POST request without Content-length...

it would be still possible with HTTP/1.1 chunking but i have not seen it on the
list of things to do for AXIS ARCH (or I may be wrong...).

thanks,

alek
--
Aleksander Slominski, LH 316, IU, http://www.extreme.indiana.edu/~aslom
As I look afar I see neither cherry Nor tinted leaves Just a modest hut
on the coast In the dusk of Autumn nightfall - Fujiwara no Teika (1162-1241)



Re: streaming outbound messages (was Re: [Vote] 1 Msg or 2)

Posted by George I Matkovits <ma...@uswest.net>.
Yes, the later Tomcat versions support chunking. Over an URL connection (will support
500 codes correctly with Java2V1.4, the 2 years old URLconnection bug is finally
going to be fixed :-)  HTTP/1.1 support can easily be put even into the current Soap
V2.1+. It should also work in AXIS, since an HTTP/1.1 URL connection will support
correctly not only JSP/Servlet sessions but also chunking.
Regards - George

Aleksander Slominski wrote:

> Sanjiva Weerawarana wrote:
>
> > > it would be still possible with HTTP/1.1 chunking but i have not seen it on
> > the
> > > list of things to do for AXIS ARCH (or I may be wrong...).
> >
> > Can u please explain how HTTP chunking works and how that can be used
> > to do outbound streaming? I think that could have a major performance
> > impact.
>
> when HTTP/1.0 POST is used as defined in SOAP spec 1.1 it is necessary to
> calculate Content-Length before starting sending anything and it means that we
> need to keep an output buffer in memory (to calculate content length).
>
> with HTTP/1.1 chunking it is possible to start sending as soon as we have
> something serialized and more important - we do not need to keep the output
> buffer in memory! however to have it working both sides - client and server -
> must implement chunking. i think that apache has support for it so running tomcat
> <-> apache will give chunking support but we still need to have it on client side
> to work...
>
> for details please on chunking please see
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1
>
> thanks,
>
> alek
> --
> Aleksander Slominski, LH 316, IU, http://www.extreme.indiana.edu/~aslom
> As I look afar I see neither cherry Nor tinted leaves Just a modest hut
> on the coast In the dusk of Autumn nightfall - Fujiwara no Teika (1162-1241)


Re: streaming outbound messages (was Re: [Vote] 1 Msg or 2)

Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Sanjiva Weerawarana wrote:

> > it would be still possible with HTTP/1.1 chunking but i have not seen it on
> the
> > list of things to do for AXIS ARCH (or I may be wrong...).
>
> Can u please explain how HTTP chunking works and how that can be used
> to do outbound streaming? I think that could have a major performance
> impact.

when HTTP/1.0 POST is used as defined in SOAP spec 1.1 it is necessary to
calculate Content-Length before starting sending anything and it means that we
need to keep an output buffer in memory (to calculate content length).

with HTTP/1.1 chunking it is possible to start sending as soon as we have
something serialized and more important - we do not need to keep the output
buffer in memory! however to have it working both sides - client and server -
must implement chunking. i think that apache has support for it so running tomcat
<-> apache will give chunking support but we still need to have it on client side
to work...

for details please on chunking please see
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1

thanks,

alek
--
Aleksander Slominski, LH 316, IU, http://www.extreme.indiana.edu/~aslom
As I look afar I see neither cherry Nor tinted leaves Just a modest hut
on the coast In the dusk of Autumn nightfall - Fujiwara no Teika (1162-1241)



Re: streaming outbound messages (was Re: [Vote] 1 Msg or 2)

Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
Hi Alex,
> i agree that it is good to have multiple interfaces to access inbound
message.
>
> i would put them in this order:
> * pull parser or MessageElement/XMLElement (as proposed by James Snell)
> * SAX as it is easy to convert pull parser XML events into SAX events
> * DOM or JDOM as it can always be built from SAX events or pull parser
events

This is a good list and I agree with the priority ordering!

> however i think that streaming outbound messages in HTTP/1.0 is almost
impossible
> and not that useful as to create valid POST it is necessary to known
> Content-length - i do not know other way to do it (and get through HTTP
> proxies...) maybe except creating invalid POST request without
Content-length...
>
> it would be still possible with HTTP/1.1 chunking but i have not seen it on
the
> list of things to do for AXIS ARCH (or I may be wrong...).

Can u please explain how HTTP chunking works and how that can be used
to do outbound streaming? I think that could have a major performance
impact.

Sanjiva.