On Friday 12 September 2008 11:19:30 am Christian Vest Hansen wrote:
> On Fri, Sep 12, 2008 at 11:07 AM, Kent Närling <[EMAIL PROTECTED]> 
wrote:
> > Hi!
> > I guess this might have been answered here before, but I searched the
> > lists and the FAQ:s and could not find anything so I will take the risk
> > ... ;-)
> >
> > What ARE reasonable overheads using CXF Webservices? for instance
> > compared to RMI/Beans etc?
>
> I would never recommend RMI. It is based on Java serialization, which
> is fundamentally broken.
>
> I'd suggest using Googles Protocol Buffers instead.
>
> > We did some measurments and found that some basic calls got between 3-5
> > milliseconds of overhead/response time (using a dummy implementation).
> > Is this normal? or does it sound high? can this be tuned significantly?
>
> Considering this is (presumably) over a network connection, then this
> latency looks to me to be quite good. But I wonder how this was
> measured. The process-schedulers in most operating systems use 10 ms
> timeslices, so unless you really know your way around benchmarking and
> statistical analysis, you can expect measurements in the < 20 ms scale
> to be very inaccurate.
>
> I suppose it can be tuned by using a binary XML format. There has been
> some talk about on this list, but I can't find anything on the wiki so
> I don't know if it is actually feasible.

With CXF 2.1.2, you can configure in a Fastinfoset feature and it will 
negotiate using the binary XML which definitely can be faster both in parsing 
as well as with smaller "on the wire" messages so the network traffic is 
less. 

Definitely need to get documented.   If someone would like to do that, the 
classname of the feature is:
org.apache.cxf.feature.FastInfosetFeature

You can configure it via the "features" element on the jaxws elements or 
cxf:bus element or via the @Features annotation.

In anycase, 3-5ms is probably about correct on "average" computers.  I've seen 
sub-ms on very fast computers.    Also, we've done some performance tuning on 
the 2.1.3-SNAPSHOTs the last couple weeks.   I can get some new snapshots 
deployed later today that may also help a little.

Dan



> > Mainly I need to know to decide our strategy for using webservices etc
> >
> > For our external interface this latency/overhead is not an issue, but we
> > have discussed using webservices as an internal interface in a SOA
> > architecture, but then this overhead would not be practical...
>
> Is latency really that important to you? Or is it actually throughput
> that is your real concern?
>
> Only a proper load-test can tell whether or not the throughput will be
> good enough. My experience is that you throughput-bottleneck is much
> more likely to be in your application code that in CXF itself. At
> least, that is my conclusion for load that ranges up to 20.000
> requests per minute.
>
> I don't know anything about systems that need to live up to real-time
> gaurantees, though.
>
> > Best regards,
> > Kent



-- 
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to