Faster Web Services with Binary XML
November 29th, 2005I just read that the W3C is starting a Working group to develop binary XML. I do not know how many times I have been in a meeting and the discussion turns to SOA and everyone starts to point out that web services are too slow because XML is not an efficient means of transferring information. But it works great to integrate systems because you can handle XML in every major language.
I never say much in these discussions because it always turns out the same. .NET Remoting is usually prescribed as the obvious alternative to XML-based web services. I just do not see the benefit of the discussion. I feel the same about discussing optimizing the performance of my code by using a StringBuilder instead of using concatenating Strings with a plus operator. It only matters maybe 1% of the time. If you hit the web service once every 5 second and it takes less than a second to process, then there is no need to optimize it. The server is sitting there 80% of the time waiting for the next request.
Besides, a solution to optimize your solution will be developed so that you do not have to do anything. For instance, with Java they optimized the compiler and runtime to find all of the String concatenations with the plus operator and compile them to use the StringBuffer class. The programmer can continue to develop code which is readable and allow the compiler to make it perform well.
The same will apply to web services and SOA. In about a year or two a standard will be recommended out of this working group and we will be able to proxy our pre-existing web services through a transport which will produce this binary form which takes our 55k message down to 12k and we will see an instant benefit. And perhaps by then the transactions will be screaming along at a frequency of 3 every 5 seconds but now take 310 milliseconds to complete instead of 920.
In the meantime, I use a trade secret solution to relay data between diverse platforms/languages such as .NET, Delphi and Java. It is a called a relational database and I interact with it using SQL. It is highly performant and every language can talk to the database quite well. *sarcasm*
Let's try to not prematurely optimize web services and degrade the true value of SOA. More and more publicly accessible websites should be exposing more functionality with standard web services. Amazon.com, Google, and many others are doing it. I'd like to see all government services produce web service endpoints for all of their services. The NOAA has XML and SOAP services already. Next I think the USPS, IRS and the DMV could provide useful services with an SOA architecture. I would be sure happy to avoid ever going to the DMV again.
