You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Joel Turkel <jt...@Endeca.com> on 2011/02/24 16:06:23 UTC

Local Transport Benchmarks

Hi,

 

I'm exploring the possibility of using the CXF local transport to
optimize the performance of a SOAP web service for intra-JVM
communication. Has anyone done any benchmarking of the local vs. http
transport? I'm sure the performance depends greatly on the web service
but I'm just trying to get a feel for other people's experiences with
the local transport.

 

Thanks,

Joel


RE: Local Transport Benchmarks

Posted by Sven Zethelius <sv...@expedia.com>.
The reason they need to be in the same classloader is CXF keeps a map of destinations.  In separate war files, the services would be in separate classloaders.  To accomplish what you want, the CXF jar, its dependencies, if you are using object binding then the object jar too, all need to be in the tomcat common classloader (e.g. tomcat's lib directory, not in a war), which is generally a bad idea unless its absolutely necessary. If you aren't using object binding, the extra complexity introduced doesn't really buy you much over just doing a localhost route of HTTP, since you are still paying the serialization time.

________________________________________
From: jaybytez [jaybytez@yahoo.com]
Sent: Tuesday, June 21, 2011 4:23 PM
To: users@cxf.apache.org
Subject: Re: Local Transport Benchmarks

Asking a quick beginner question about this.

The Coloc information as well as this post says:

/They MUST be in the same classloader. This would be normal if on the same
Bus./

So in order for the local to work with sharing classloader and bus, the
client and server would essentially need to be in the same war file?  Is
that the case?

What if I have a war file making a call to another war file in the same
application server, could I take advantage of using the local?

Thanks...jay

--
View this message in context: http://cxf.547215.n5.nabble.com/Local-Transport-Benchmarks-tp3398693p4512336.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Local Transport Benchmarks

Posted by jaybytez <ja...@yahoo.com>.
Asking a quick beginner question about this.

The Coloc information as well as this post says:

/They MUST be in the same classloader. This would be normal if on the same
Bus./

So in order for the local to work with sharing classloader and bus, the
client and server would essentially need to be in the same war file?  Is
that the case?

What if I have a war file making a call to another war file in the same
application server, could I take advantage of using the local?

Thanks...jay

--
View this message in context: http://cxf.547215.n5.nabble.com/Local-Transport-Benchmarks-tp3398693p4512336.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Local Transport Benchmarks

Posted by Daniel Kulp <dk...@apache.org>.
On Friday 11 March 2011 1:13:27 PM Joel Turkel wrote:
> Wow! I was unaware of the coloc feature. Using that makes my service
> call timings roughly equivalent to making direct Java method calls on my
> service implementation class. Awesome feature!

It is a nice feature, but you do need to be aware of it's "limitations".  For 
one, the symantics are very different.   Normally, you have pass by value 
symantics when using WebServices.   You can muck with the incoming objects all 
you want.   With Coloc, it's pass by reference.   

Also, any processing around security (like usernames, auth stuff,etc... ), 
logging, etc... are also likely to be bypassed with Coloc.  

For many use cases, that's perfectly fine, but you need to be aware of it.

Dan


> 
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Thursday, March 10, 2011 6:59 PM
> To: users@cxf.apache.org
> Subject: Re: Local Transport Benchmarks
> 
> On Thursday 10 March 2011 11:18:01 AM Joel Turkel wrote:
> > I finally got around to running some benchmarks on my web service and
> > found that the local transport was 19% slower than the http transport
> > using CXF 2.3.2... definitely not what I was expecting! After a
> 
> warm-up
> 
> > period, the benchmark made 10,625 calls to my service sending ~21GB of
> > data in outbound requests and receiving 2MB in inbound responses. The
> > test was run on a 6-core 2.8GHz Windows 7 machine. I haven't done any
> > profiling yet to see where the extra time is being spent.
> 
> Interesting.  Definitely a bit unexpected.
> 
> If both are using the same Bus object, you might want to try enabling
> the
> ColocFeature.    (org.apache.cxf.binding.coloc.feature.ColocFeature)
> That
> woud then bypass much of the writing/reading entirely.
> 
> Dan
> 
> > -----Original Message-----
> > From: Daniel Kulp [mailto:dkulp@apache.org]
> > Sent: Friday, February 25, 2011 3:36 PM
> > To: users@cxf.apache.org
> > Cc: Joel Turkel
> > Subject: Re: Local Transport Benchmarks
> > 
> > On Thursday 24 February 2011 10:06:23 AM Joel Turkel wrote:
> > > I'm exploring the possibility of using the CXF local transport to
> > > optimize the performance of a SOAP web service for intra-JVM
> > > communication. Has anyone done any benchmarking of the local vs.
> 
> http
> 
> > > transport? I'm sure the performance depends greatly on the web
> 
> service
> 
> > > but I'm just trying to get a feel for other people's experiences
> 
> with
> 
> > > the local transport.
> > 
> > Honestly, I'm not sure if the Local transport would be significantly
> > faster
> > unless you combine it with the object binding.   Pretty much the
> 
> entire
> 
> > code
> > path is the same so  all the SOAP serialization, etc... would still
> > occur
> > which is normally the expensive part.
> > 
> > I could be wrong though.  :-)

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

RE: Local Transport Benchmarks

Posted by Joel Turkel <jt...@Endeca.com>.
Wow! I was unaware of the coloc feature. Using that makes my service
call timings roughly equivalent to making direct Java method calls on my
service implementation class. Awesome feature!

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Thursday, March 10, 2011 6:59 PM
To: users@cxf.apache.org
Subject: Re: Local Transport Benchmarks

On Thursday 10 March 2011 11:18:01 AM Joel Turkel wrote:
> I finally got around to running some benchmarks on my web service and
> found that the local transport was 19% slower than the http transport
> using CXF 2.3.2... definitely not what I was expecting! After a
warm-up
> period, the benchmark made 10,625 calls to my service sending ~21GB of
> data in outbound requests and receiving 2MB in inbound responses. The
> test was run on a 6-core 2.8GHz Windows 7 machine. I haven't done any
> profiling yet to see where the extra time is being spent.

Interesting.  Definitely a bit unexpected.

If both are using the same Bus object, you might want to try enabling
the 
ColocFeature.    (org.apache.cxf.binding.coloc.feature.ColocFeature)
That 
woud then bypass much of the writing/reading entirely.  

Dan



> 
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Friday, February 25, 2011 3:36 PM
> To: users@cxf.apache.org
> Cc: Joel Turkel
> Subject: Re: Local Transport Benchmarks
> 
> On Thursday 24 February 2011 10:06:23 AM Joel Turkel wrote:
> > I'm exploring the possibility of using the CXF local transport to
> > optimize the performance of a SOAP web service for intra-JVM
> > communication. Has anyone done any benchmarking of the local vs.
http
> > transport? I'm sure the performance depends greatly on the web
service
> > but I'm just trying to get a feel for other people's experiences
with
> > the local transport.
> 
> Honestly, I'm not sure if the Local transport would be significantly
> faster
> unless you combine it with the object binding.   Pretty much the
entire
> code
> path is the same so  all the SOAP serialization, etc... would still
> occur
> which is normally the expensive part.
> 
> I could be wrong though.  :-)

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Re: Local Transport Benchmarks

Posted by Daniel Kulp <dk...@apache.org>.
On Thursday 10 March 2011 11:18:01 AM Joel Turkel wrote:
> I finally got around to running some benchmarks on my web service and
> found that the local transport was 19% slower than the http transport
> using CXF 2.3.2... definitely not what I was expecting! After a warm-up
> period, the benchmark made 10,625 calls to my service sending ~21GB of
> data in outbound requests and receiving 2MB in inbound responses. The
> test was run on a 6-core 2.8GHz Windows 7 machine. I haven't done any
> profiling yet to see where the extra time is being spent.

Interesting.  Definitely a bit unexpected.

If both are using the same Bus object, you might want to try enabling the 
ColocFeature.    (org.apache.cxf.binding.coloc.feature.ColocFeature)   That 
woud then bypass much of the writing/reading entirely.  

Dan



> 
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Friday, February 25, 2011 3:36 PM
> To: users@cxf.apache.org
> Cc: Joel Turkel
> Subject: Re: Local Transport Benchmarks
> 
> On Thursday 24 February 2011 10:06:23 AM Joel Turkel wrote:
> > I'm exploring the possibility of using the CXF local transport to
> > optimize the performance of a SOAP web service for intra-JVM
> > communication. Has anyone done any benchmarking of the local vs. http
> > transport? I'm sure the performance depends greatly on the web service
> > but I'm just trying to get a feel for other people's experiences with
> > the local transport.
> 
> Honestly, I'm not sure if the Local transport would be significantly
> faster
> unless you combine it with the object binding.   Pretty much the entire
> code
> path is the same so  all the SOAP serialization, etc... would still
> occur
> which is normally the expensive part.
> 
> I could be wrong though.  :-)

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

RE: Local Transport Benchmarks

Posted by Joel Turkel <jt...@Endeca.com>.
I finally got around to running some benchmarks on my web service and
found that the local transport was 19% slower than the http transport
using CXF 2.3.2... definitely not what I was expecting! After a warm-up
period, the benchmark made 10,625 calls to my service sending ~21GB of
data in outbound requests and receiving 2MB in inbound responses. The
test was run on a 6-core 2.8GHz Windows 7 machine. I haven't done any
profiling yet to see where the extra time is being spent.

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Friday, February 25, 2011 3:36 PM
To: users@cxf.apache.org
Cc: Joel Turkel
Subject: Re: Local Transport Benchmarks

On Thursday 24 February 2011 10:06:23 AM Joel Turkel wrote: 
> I'm exploring the possibility of using the CXF local transport to
> optimize the performance of a SOAP web service for intra-JVM
> communication. Has anyone done any benchmarking of the local vs. http
> transport? I'm sure the performance depends greatly on the web service
> but I'm just trying to get a feel for other people's experiences with
> the local transport.

Honestly, I'm not sure if the Local transport would be significantly
faster 
unless you combine it with the object binding.   Pretty much the entire
code 
path is the same so  all the SOAP serialization, etc... would still
occur 
which is normally the expensive part.   

I could be wrong though.  :-)

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Re: Local Transport Benchmarks

Posted by Daniel Kulp <dk...@apache.org>.
On Thursday 24 February 2011 10:06:23 AM Joel Turkel wrote: 
> I'm exploring the possibility of using the CXF local transport to
> optimize the performance of a SOAP web service for intra-JVM
> communication. Has anyone done any benchmarking of the local vs. http
> transport? I'm sure the performance depends greatly on the web service
> but I'm just trying to get a feel for other people's experiences with
> the local transport.

Honestly, I'm not sure if the Local transport would be significantly faster 
unless you combine it with the object binding.   Pretty much the entire code 
path is the same so  all the SOAP serialization, etc... would still occur 
which is normally the expensive part.   

I could be wrong though.  :-)

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com