You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Tim Dev <tk...@ugcs.net> on 2004/11/23 21:07:48 UTC

attachments

I am thinking of using attachments, but I have a few questions:

1)
Given that the attachment sizes will be from 2KB to maybe 1GB or even
more, can Axis deal with them in a performant way?

2)
I have the option of retrieving/sending content via a plain HTTP servlet
using GET/PUT and I could make it look like it's part of the same session
because the two servlets run in the same webapp and I can set the same
session cookie for both the WS requests and the HTTP requests. I know the
plain HTTP servlet performs as best as it can, should I use this instead
of going thru the trouble of setting up attachments and running into
perfromance issues with Axis?

3)
Do I need to enable the "streaming" mode for my Axis service in order to
use attachments or make them perform well (I would not like a 1GB
attachment to be cached in memory ...)

4)
For interop with .NET, I understand .NET only supports DIME and not MIME.
How difficult is it to get both to perform in Axis?

Thanks.

Tim


RE: attachments

Posted by Rajal Shah <ra...@cisco.com>.
>From our analysis, Attachments are the only way to do production ready Web
Services where you have a moderate to a high payload (> 50K) and you expect
a heavy load of simultaneous users..

The single biggest reason, being that the business doc payload is outside
the SOAP envelope and thus the SOAP envelope is processed by the Axis engine
quickly. Even with doc-lit where the XML payload is inside the envelope, the
Axis engine is forced to read the entire payload in memory even though it
doesn't process it at all.. Sure, it passes the DOM structures as is to the
business logic.. But DOM is always the wrong solution for a large payload
cause very quickly we run out of memory on our servers with even 5-10 users
on the system. We use XSL to process incoming XML and never create the DOM
ourselves, thus making the Axis work a huge cost for us as it gives very
poor performance.

I'd be glad to have a healthy discussion where someone can prove me wrong..
I see a lot of emails about rpc and doc-lit services.. I strongly feel that
those will never give you sufficient performance in production for moderate
to heavy payload interaction were you to perform any load testing.. (for
small payload like the stock quote service, rpc will perform admirably.. I'm
not talking about those cases).

I understand the interoperability issues with Attachments currently.. And
we've thought of workarounds - such as doing rpc style and encoding the XML
as a string as one input parameter so that AXIS doesn't create DOMs for us..
But Attachments is the cleanest per se when you look at the message on the
wire (tcpmon/SOAPMonitor).

On a similar note, I still can't figure out why doc-lit doesn't have an
interface to get RAW XML message as is, without having AXIS create any
in-memory structures for it.. That would have solved most of the problems.
(Except that AXIS still has to read the high-paylod first as it is part of
the envelope. You can't beat Attachments for performance due to it.)

 --
Rajal



-----Original Message-----
From: Rajal Shah [mailto:rajalsha@cisco.com] 
Sent: Wednesday, November 24, 2004 9:38 AM
To: axis-user@ws.apache.org; dims@apache.org
Subject: RE: attachments

The load testing was done about a year ago.. I'm guessing it was release
1.1.
--
Rajal


-----Original Message-----
From: Davanum Srinivas [mailto:davanum@gmail.com] 
Sent: Wednesday, November 24, 2004 9:31 AM
To: axis-user@ws.apache.org
Subject: Re: attachments

Rajal,

Which version are u using?

thanks,
dims


On Wed, 24 Nov 2004 09:18:47 -0800, Rajal Shah <ra...@cisco.com> wrote:
> I've done extensive load-testing with Attachments.. and it seems to work
> beautifully! The best thing about the Attachments as regards performance
is
> that the message is entirely outside the SOAP envelope.. This allows the
> Axis engine to process the SOAP Headers without having to read in the
entire
> 1 GIG of business data.. The AXIS engine thus processes is very quickly..
> And passes on the 1Gig of data to the business logic.. In all our testing,
> the Axis engine was less than 3-5% of the total transaction time.. And it
> handled all requests without any errors! The errors starting showing up in
> the business logic layer when we had simulataneous users of 500. But not
the
> axis layer..
> 
> I've published some of those numbers at:
> http://www.informit.com/articles/article.asp?p=177376
> 
> You can get the article without advertisements at:
> http://www.informit.com/articles/printerfriendly.asp?p=177376
> 
> --
> Rajal
> 
> 
> 
> 
> -----Original Message-----
> From: Tim Dev [mailto:tkaxis@ugcs.net]
> Sent: Tuesday, November 23, 2004 12:08 PM
> To: axis-user@ws.apache.org
> Subject: attachments
> 
> I am thinking of using attachments, but I have a few questions:
> 
> 1)
> Given that the attachment sizes will be from 2KB to maybe 1GB or even
> more, can Axis deal with them in a performant way?
> 
> 2)
> I have the option of retrieving/sending content via a plain HTTP servlet
> using GET/PUT and I could make it look like it's part of the same session
> because the two servlets run in the same webapp and I can set the same
> session cookie for both the WS requests and the HTTP requests. I know the
> plain HTTP servlet performs as best as it can, should I use this instead
> of going thru the trouble of setting up attachments and running into
> perfromance issues with Axis?
> 
> 3)
> Do I need to enable the "streaming" mode for my Axis service in order to
> use attachments or make them perform well (I would not like a 1GB
> attachment to be cached in memory ...)
> 
> 4)
> For interop with .NET, I understand .NET only supports DIME and not MIME.
> How difficult is it to get both to perform in Axis?
> 
> Thanks.
> 
> Tim
> 
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/



RE: attachments

Posted by Rajal Shah <ra...@cisco.com>.
The load testing was done about a year ago.. I'm guessing it was release
1.1.
--
Rajal


-----Original Message-----
From: Davanum Srinivas [mailto:davanum@gmail.com] 
Sent: Wednesday, November 24, 2004 9:31 AM
To: axis-user@ws.apache.org
Subject: Re: attachments

Rajal,

Which version are u using?

thanks,
dims


On Wed, 24 Nov 2004 09:18:47 -0800, Rajal Shah <ra...@cisco.com> wrote:
> I've done extensive load-testing with Attachments.. and it seems to work
> beautifully! The best thing about the Attachments as regards performance
is
> that the message is entirely outside the SOAP envelope.. This allows the
> Axis engine to process the SOAP Headers without having to read in the
entire
> 1 GIG of business data.. The AXIS engine thus processes is very quickly..
> And passes on the 1Gig of data to the business logic.. In all our testing,
> the Axis engine was less than 3-5% of the total transaction time.. And it
> handled all requests without any errors! The errors starting showing up in
> the business logic layer when we had simulataneous users of 500. But not
the
> axis layer..
> 
> I've published some of those numbers at:
> http://www.informit.com/articles/article.asp?p=177376
> 
> You can get the article without advertisements at:
> http://www.informit.com/articles/printerfriendly.asp?p=177376
> 
> --
> Rajal
> 
> 
> 
> 
> -----Original Message-----
> From: Tim Dev [mailto:tkaxis@ugcs.net]
> Sent: Tuesday, November 23, 2004 12:08 PM
> To: axis-user@ws.apache.org
> Subject: attachments
> 
> I am thinking of using attachments, but I have a few questions:
> 
> 1)
> Given that the attachment sizes will be from 2KB to maybe 1GB or even
> more, can Axis deal with them in a performant way?
> 
> 2)
> I have the option of retrieving/sending content via a plain HTTP servlet
> using GET/PUT and I could make it look like it's part of the same session
> because the two servlets run in the same webapp and I can set the same
> session cookie for both the WS requests and the HTTP requests. I know the
> plain HTTP servlet performs as best as it can, should I use this instead
> of going thru the trouble of setting up attachments and running into
> perfromance issues with Axis?
> 
> 3)
> Do I need to enable the "streaming" mode for my Axis service in order to
> use attachments or make them perform well (I would not like a 1GB
> attachment to be cached in memory ...)
> 
> 4)
> For interop with .NET, I understand .NET only supports DIME and not MIME.
> How difficult is it to get both to perform in Axis?
> 
> Thanks.
> 
> Tim
> 
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/


Re: attachments

Posted by Davanum Srinivas <da...@gmail.com>.
Rajal,

Which version are u using?

thanks,
dims


On Wed, 24 Nov 2004 09:18:47 -0800, Rajal Shah <ra...@cisco.com> wrote:
> I've done extensive load-testing with Attachments.. and it seems to work
> beautifully! The best thing about the Attachments as regards performance is
> that the message is entirely outside the SOAP envelope.. This allows the
> Axis engine to process the SOAP Headers without having to read in the entire
> 1 GIG of business data.. The AXIS engine thus processes is very quickly..
> And passes on the 1Gig of data to the business logic.. In all our testing,
> the Axis engine was less than 3-5% of the total transaction time.. And it
> handled all requests without any errors! The errors starting showing up in
> the business logic layer when we had simulataneous users of 500. But not the
> axis layer..
> 
> I've published some of those numbers at:
> http://www.informit.com/articles/article.asp?p=177376
> 
> You can get the article without advertisements at:
> http://www.informit.com/articles/printerfriendly.asp?p=177376
> 
> --
> Rajal
> 
> 
> 
> 
> -----Original Message-----
> From: Tim Dev [mailto:tkaxis@ugcs.net]
> Sent: Tuesday, November 23, 2004 12:08 PM
> To: axis-user@ws.apache.org
> Subject: attachments
> 
> I am thinking of using attachments, but I have a few questions:
> 
> 1)
> Given that the attachment sizes will be from 2KB to maybe 1GB or even
> more, can Axis deal with them in a performant way?
> 
> 2)
> I have the option of retrieving/sending content via a plain HTTP servlet
> using GET/PUT and I could make it look like it's part of the same session
> because the two servlets run in the same webapp and I can set the same
> session cookie for both the WS requests and the HTTP requests. I know the
> plain HTTP servlet performs as best as it can, should I use this instead
> of going thru the trouble of setting up attachments and running into
> perfromance issues with Axis?
> 
> 3)
> Do I need to enable the "streaming" mode for my Axis service in order to
> use attachments or make them perform well (I would not like a 1GB
> attachment to be cached in memory ...)
> 
> 4)
> For interop with .NET, I understand .NET only supports DIME and not MIME.
> How difficult is it to get both to perform in Axis?
> 
> Thanks.
> 
> Tim
> 
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

RE: attachments

Posted by Mayur Shetye <ma...@yahoo.com>.
If you want you can email Prof Madhusudhan Govindraju
(mgovinda@cs.binghamton.edu) can provide you with
EXACT figures and memory profiles for using
attachments . 

regards
Mayur Shetye

--- Rajal Shah <ra...@cisco.com> wrote:

> I've done extensive load-testing with Attachments..
> and it seems to work
> beautifully! The best thing about the Attachments as
> regards performance is
> that the message is entirely outside the SOAP
> envelope.. This allows the
> Axis engine to process the SOAP Headers without
> having to read in the entire
> 1 GIG of business data.. The AXIS engine thus
> processes is very quickly..
> And passes on the 1Gig of data to the business
> logic.. In all our testing,
> the Axis engine was less than 3-5% of the total
> transaction time.. And it
> handled all requests without any errors! The errors
> starting showing up in
> the business logic layer when we had simulataneous
> users of 500. But not the
> axis layer.. 
> 
> I've published some of those numbers at:
>
http://www.informit.com/articles/article.asp?p=177376
> 
> You can get the article without advertisements at:
>
http://www.informit.com/articles/printerfriendly.asp?p=177376
> 
> --
> Rajal
> 
> 
> -----Original Message-----
> From: Tim Dev [mailto:tkaxis@ugcs.net] 
> Sent: Tuesday, November 23, 2004 12:08 PM
> To: axis-user@ws.apache.org
> Subject: attachments
> 
> 
> I am thinking of using attachments, but I have a few
> questions:
> 
> 1)
> Given that the attachment sizes will be from 2KB to
> maybe 1GB or even
> more, can Axis deal with them in a performant way?
> 
> 2)
> I have the option of retrieving/sending content via
> a plain HTTP servlet
> using GET/PUT and I could make it look like it's
> part of the same session
> because the two servlets run in the same webapp and
> I can set the same
> session cookie for both the WS requests and the HTTP
> requests. I know the
> plain HTTP servlet performs as best as it can,
> should I use this instead
> of going thru the trouble of setting up attachments
> and running into
> perfromance issues with Axis?
> 
> 3)
> Do I need to enable the "streaming" mode for my Axis
> service in order to
> use attachments or make them perform well (I would
> not like a 1GB
> attachment to be cached in memory ...)
> 
> 4)
> For interop with .NET, I understand .NET only
> supports DIME and not MIME.
> How difficult is it to get both to perform in Axis?
> 
> Thanks.
> 
> Tim
> 
> 
> 



		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


RE: attachments

Posted by Rajal Shah <ra...@cisco.com>.
I've done extensive load-testing with Attachments.. and it seems to work
beautifully! The best thing about the Attachments as regards performance is
that the message is entirely outside the SOAP envelope.. This allows the
Axis engine to process the SOAP Headers without having to read in the entire
1 GIG of business data.. The AXIS engine thus processes is very quickly..
And passes on the 1Gig of data to the business logic.. In all our testing,
the Axis engine was less than 3-5% of the total transaction time.. And it
handled all requests without any errors! The errors starting showing up in
the business logic layer when we had simulataneous users of 500. But not the
axis layer.. 

I've published some of those numbers at:
http://www.informit.com/articles/article.asp?p=177376

You can get the article without advertisements at:
http://www.informit.com/articles/printerfriendly.asp?p=177376

--
Rajal


-----Original Message-----
From: Tim Dev [mailto:tkaxis@ugcs.net] 
Sent: Tuesday, November 23, 2004 12:08 PM
To: axis-user@ws.apache.org
Subject: attachments


I am thinking of using attachments, but I have a few questions:

1)
Given that the attachment sizes will be from 2KB to maybe 1GB or even
more, can Axis deal with them in a performant way?

2)
I have the option of retrieving/sending content via a plain HTTP servlet
using GET/PUT and I could make it look like it's part of the same session
because the two servlets run in the same webapp and I can set the same
session cookie for both the WS requests and the HTTP requests. I know the
plain HTTP servlet performs as best as it can, should I use this instead
of going thru the trouble of setting up attachments and running into
perfromance issues with Axis?

3)
Do I need to enable the "streaming" mode for my Axis service in order to
use attachments or make them perform well (I would not like a 1GB
attachment to be cached in memory ...)

4)
For interop with .NET, I understand .NET only supports DIME and not MIME.
How difficult is it to get both to perform in Axis?

Thanks.

Tim