Archive for April, 2006

XFire 1.1 RC, JiBX, and MTOM performance

Sunday, April 30th, 2006

We released a XFire 1.1 release candidate this weekend. This release is mostly a lot of bug fixes, but there are some cool things like:

  • MTOM which is smart enough to cache files when they hit a certain threshold
  • Proven interop with MTOM and Microsoft’s WSE
  • Improved spring configuration syntax - now you can do everything jsr 181 does in glorious XML files.
  • Improved WS-Security support

Please test it out and see how it goes for you!

1.1 RC won’t end up being a true release candidate though. I think we’ll be adding in the JiBX support which Tomek Sztelak had put in the xfire-sandbox. We were waiting to a new JiBX release with some fixes, but it appears that Dennis Sosnoski will be doing a 1.1-beta-2 release very soon.

Speaking of JiBX - I’m not what I think about it - its fast and the mapping files are decent, but I’m not a big fan of having to do byte code munging. Its a real PITA. I’d much rather do it on the fly.

In other news, Santiago did some benchmarks to see when exactly MTOM optimization should be done. Turns out it is when your data reaches around 4-5K - at least when you’re using the JAX-WS RI. He also has this benchmark utility called Japex which he wrote. Its able to do performance testing like you do JUnit testing and produce nice graphs. I’ll definitely be checking it out in more depth!

Whine, moan - yes, integration is hard

Tuesday, April 25th, 2006

On TheServerSide there are a bunch of wanks people, moaning yet again that SOAP and web services is too complicated. Like slashdot, the discussions on TSS quickly degrade into ignorance and childish interactions. (Hence the tone of this entry will be slightly deprecating)
Is the underlying problem here that SOAP is hard? No. Its that integration is hard. If you think that REST/POX is going to make it easier you are just crazy. Lets look at some of the things which are hard regardless:

  • Understanding the operations - for both you need to figure out the inputs and outputs. For both you’ll most likeloy have schemas.
  • Writing the operations - for both you’ll need to either construct some xml or some data transfer objects. In certain cases one will be easier than the other, and neither are specific to SOAP or POX.
  • Describing the operations - whether its documentation or a wsdl document, you need to let users know how your service works.

Although I’m sure REST people wouldn’t use operations, but close enough.

And heres a little bonus on SOAP vs REST/POX for all of you who care…
Hey you enterprisey loser, REST/POX really is easier

Is it really? Why? Its all just XML anyway.

Are you complaining about how hard it is to write a WSDL straight off the bat? Then start with code first, and work your way to a more defined WSDL.

But this is nearly irrelavent, because the actual work comes in when you design your schemas. If you have an API of any decent size, the schemas are where the majority of the work will be. And you will need a schema regardless of whether you do POX or SOAP.

But REST/POX is better - look at Amazon!
One example I’ve always seen is the Amazon API. “Look the SOAP API is barely used.” However, I think this shows when SOAP should be used and when POX/HTTP approaches should be used. Amazon has hundreds of defined schema elements. The API encompasses a huge amount of functionality. But how much does the typical user need? A small small fragment. If you’re going to use the whole API I will guarantee that the SOAP API will be easier. Yet, for a small subset, their REST API will most likely be easier.

And this does nothing at all to debunk that SOAP services aren’t effective. I can generate a .NET or Java client with ease. While some have complained about how hard these are to use, I argue that it is only hard because the API contains so much functionality and the Amazon docs largely ignore the SOAP interface.

But there are interoperability problems!

The truth is now we’ve worked out most of the interoperability problems. I can go and use WSDL, SOAP, WS-Security, WS-Addressing, and a myriad of others across platforms. Just use a decent SOAP stack.

Enough already

Can we just accept that sometimes SOAP is good and sometimes REST/POX is good? Just like sometimes Java is good and sometimes Ruby is good. Or any number of things. Anyone who looks for One Thing To Rule Them All wil most likely be left empty handed or looking like a religious fanatic.

Dynamic Web Services with Groovy and XFire

Sunday, April 23rd, 2006
Sorry to those of you that read, the XFire blog, but I thought this was cool enough to justify a cross post:

Guillaume Alleon has been doing some work on integrating Groovy and XFire. Today he announced the release of Groovy Web Services on the XFire mailing list:

I am pleased to announce the second release (aka 0.2) of GroovySOAP.

There’s a WIKI page for it at http://docs.codehaus.org/display/GROOVY/Groovy+SOAP

It’s still is the early stages but you are now able to build a web service from a Groovy Object

I especially like the client example:

import groovy.net.groovysoap.SoapServer

def proxy = new SoapClient(”http://localhost:6980/MathServiceInterface?wsdl”)

def result = proxy.add(1.0, 2.0)
assert (result == 3.0)

result = proxy.square(3.0)
assert (result == 9.0)

 No stub generation, just dynamically typed goodness! Very cool!

Apache XmlSchema 1.0.1

Sunday, April 16th, 2006

A while back I was browsing SVN at apache to see what I could see. I ran across a bunch of code to manipulate XML schemas. Having looked for something like that for a long time, I was quite surprised to find out that it had been sitting there two years. I believe it was some code donation from a long time ago that never fully got off the ground.

After looking through the code I determined two things. First, the API sucks.  Second, I was going to use it because it worked and wasn’t worth rewriting. After some patches I wiggled my way into becoming the release manager so I could use it in XFire. Now we have an Apache XmlSchema site and a brand new 1.0.1 release. If you need to manipulate XML Schemas in Java I suggest you check it out.

Enterprise Crap is Yummy

Monday, April 3rd, 2006

Jeff at Service Oriented Enterprise writes: At the end of the day - we were scratching our heads. We DON’T know the MS Live architecture - but we’ve got a pretty good guess on what it looks like - and ya know what? According to our mocked up version, it looked like all of our ‘Enterprise Crap’.

I think if there a magic pill that got us away from enterprise crap, we would’ve take it by now.