November 2009 - Posts

Travel

Today I’m leaving for South Africa where I’ll spend 2.5 months with my family. If you have any questions about Window Clippings or my articles please be patient as I may not be able to get online to check my email as regularly.

Any suggestions for affordable mobile broadband in South Africa would be welcome!

Posted by KennyKerr with 1 comment(s)

Windows Web Services versus ATL SOAP

After publishing the WWS article I received some questions about how this compares to ATL’s SOAP stack. I’m certainly not trying to convince anyone to switch over to WWS but it has some benefits that may be useful in some scenarios. I also haven’t used the ATL/ServerXMLHTTP stack much so I’m probably not the best person to do a comparison. From what I can tell however it uses either WinHTTP or WinInet and MSXML. Given that there are some things I can point out

1. WWS is not limited to SOAP over HTTP and provides first-class support for TCP and UDP bindings. It’s also not limited to text encoding and can provide a considerable performance boost with binary encoding when applicable. It is possible for developers to modify the ATL source code to use a different transport and encoding as several teams at Microsoft have done in the past but you are on your own when doing this whereas WWS can handle this for you.

2. The XML layer in WWS, which includes serialization for C data types and structures, is much faster than XmlLite which in turn is much faster than MSXML. In some scenarios that can make a big difference. Control over memory management and reduced working set is also critical for many customers (many of whom live within Windows core). This also has a big impact on throughput which is critical in scenarios like financial services.

3. I didn’t touch on this in the article but there’s a very nice (and efficient) asynchronous programming and cancellation model that works with completion ports making it really scalable.

4. ATL SOAP is no longer in active development and Microsoft only supports the version of ATL SOAP that shipped with Visual Studio 2005. Of course if this works for you that’s great.

The list can go on.  One of the biggest reasons for using WWS that I’ve heard from Microsoft and others is the interoperability with modern SOAP stacks like WCF, WebSphere, Weblogic, and others. With ATL SOAP it is only possible to build clients for services that use the basic SOAP services specs that fall under the Basic Profile 1.0. If a service uses any of the WS-* standards released past 2002, ATL SOAP just doesn’t support it out of the box.

Concerns over platform support are warranted although a lightweight redistributable for WWS is available going back to Windows XP.

Posted by KennyKerr with no comments
Filed under: , ,

Windows with C++: Windows Web Services

My latest Windows with C++ column, Windows Web Services, just went live on the MSDN Magazine website. Here I’m taking a break from Direct2D to highlight the new SOAP stack introduced with Windows 7 for building both clients and servers. It’s completely native, has minimal overhead, and is incredibly fast. From the article:

One of the main reasons many developers flocked to the Microsoft .NET Framework, and Java to a lesser degree, was the fact that it made it much easier to write software for the Internet. Whether you were writing an HTTP client or server application, the .NET Framework had you covered with classes for making HTTP requests and processing XML easily. You could even generate SOAP clients from WSDL documents and implement SOAP servers with ASP.NET. As the standards around Web services matured, Microsoft developed the Windows Communications Foundation (WCF), also built on the .NET Framework, to make it easier to use the increasingly complex Web standards for handling different transports, such as TCP and UDP, and provide more versatile security options.

C++ developers, however, were left wondering whether it was even practical to use C++ to write Web applications. Microsoft had provided a couple of temporary solutions in the form of ATL classes and a COM-based toolkit, but in the end these couldn’t keep up with the progress that the managed SOAP stacks had made and thus were largely abandoned.

I hope you enjoy it.

Here are links to some of the most recent Windows with C++ columns:

September 2009 –  Drawing with Direct2D

June 2009 – Introducing Direct2D

April 2009 – The Virtual Disk API in Windows 7

February 2009 – Visual C++ 2010 and the Parallel Patterns Library

December 2008 – x64 Debugging With Pseudo Variables and Format Specifiers

October 2008 – Exploring High-Performance Algorithms

August 2008 – Asynchronous WinHTTP

And here is a complete list.

Posted by KennyKerr with 5 comment(s)
Filed under: , ,
More Posts