WS-Addressing and routing is a pain in the ass

So here we have our nice soap 1.2 messaging standard. All works fine with encryption, signing, policies, end-points, validation, schema’s. Microsoft created most drafts for the WS-* specs I think and in time they were slowly change to requests from the market and WSE (wizzy) is a nice product of their effort. I know that we’ll get WCF in the future but that also has to work with the WS-* standards and doesn’t solve the problem I am currently having.

We start our adventure with a contract first design. We create a nice interface with mostly fat messages in a fire and forget fashion if possible and then start to implement the damn service. But then multiple systems start implementing the same service. Not a problem of course because the loosely coupled design of the contract first method is exactly the reason why we choose this.

Our client knows the interface and asks some kind of service locator for an end-point that knows this contract and voila we seem to have multiple implementations. This isn’t an issue when you are within one enterprise. You just configure to use just one implementation for your client. But now imagine that we want to connect multiple enterprises that all publish at least one service with this contract.

The question the client is having is "I want to communicate with enterprise X with contract Y and I want an end-point for that enterprise". Not a problem if system X is allowed to directly communicate with another system. The soap specs has the WS-Addressing for this. We have a Destination element that contains a uri for the service identifier (Address) and the end-point that knows how to process this message (Via). All is working fine if you can communicate directly through any transport mechanism. Doesn’t matter if it’s http, msmq, smtp, tcp, udp or in-process it just works.

But now we have this issue that says that all messages between systems pass a message broker. The sender knows where the message must be going (enterprise X) and know through which system the message must be routed being the message broker. I could those between the following implementations:
A – The client knows the exact end-point uri but sends it to the message broker and supplies it with meta-information to route the message (the soap service end-point that processes the message).
B – The client only knows the contract and no end-point and sends it to the message broker with meta-information about the destination enterprise (domain name for example)

1. In the first scenario (A) I would imagine that the client sends a the soap message to the message broker that just picks it up and sends it to the listener within enterprise X. It does this for example with meta-information in a custom soap-header within the soap envelope. The message structure stays the same and only the soap header gets slightly modified by the message broker.

2. Another option is that the client wraps up the message within another message. The inner message contains the actual message to be delivered to enterprise X. The outer message contains information where to route/send the inner message to. The message broker unwraps the outer message and sends the inner message to end-point for enterprise X that knows this contract.

3. In the second scenario (B) the client is unaware of end-point for enterprise X. It only knows that the message is for enterprise X. Here we can do the same two techniques as I just described.

I always try to reflect these kind of situations to everyday stuff. So this seems like the normal snail mail system we have. We write a message for a department, stuff the paper in an envelope and write the address of the organisation that should receive it on the envelope. We only know that mailbox in our street and only god knows how that envelope can get shipped that fast to the other side of the world. The envelope was never opened or  repackaged but it did travel by car, fan, plane or bicycle (the different transports). What did happen is that the envelope got wrapped in a container. This container could be the actual car, fan or plane. So you could say it got wrapped by the enveloper that is needed for that kind of transport.

This makes me quite confused to be honest….

But then I thought "those soap dudes that thought about the design of  WS-Addressing must have thought about it’s usage thoroughly". After googling for hours searching for examples and browsing the w3c documents I can just come up with one conclusion. WS-Addressing does not fix my problem.

I have found the most interesting posts about routing problems with WS-Addressing at Steve Main his blog:
 – [Adventures in Next-Hop Routing (part 1 of n)],
 – [Adventures in next-hop routing part 2: the return address rabbit-hole],
 – [Subsuming WS-Referral with WS-Addressing]

These are posted about 2 years ago but the best I could find.

With this information I come to the conclusion that the soap messages should not be wrapped within a new soap envelope. The existing soap envelope should be extended with end-point information and routing hints. But it seems that there isn’t a standard for this. I also found an msdn article [Moving from WS-Routing to WS-Addressing Using WSE 2.0] where they have the following example:

   <wsa:Action>urn:chat:message</wsa:Action>

   <wsa:ReplyTo>
     <wsa:Address>soap.tcp://localhost:123/aaron</wsa:Address>
     <wsa:PortType xmlns:prefix0="urn:chat">prefix0:WseChatSoapPort</wsa:PortType>
     <wsa:ServiceName wsa:PortName="ChatPort" xmlns:c="urn:chat">c:WseChat</wsa:ServiceName>
   </wsa:ReplyTo>
   <wsa:To>soap.tcp://askonnard:456/monica</wsa:To>

But the sample is wrong especially with the contract first approach in mind. The To references a real end-point without service information. The rather strange thing is that the ReplyTo mentions a ServiceName. So.. shouldn’t this be there too in the To? And why do we have a Address and a To in the header?

I just want to have the following information in my envelope:
 – Service identifier ( urn:MyCoolContractFirstService )
 – A logical endpoint reference ( urn:CoolServiceProcessor@receiverdomain.nl )
 – A physical endpoint reference that routes my message ( msmq://soaprouter.senderdomain.nl/private$/soaprouterincoming or like tcp://localhost:12345/soaprouter)

To be continued….

Someone stole my unique nickname!

I subscribed to Google Alerts some weeks ago and added two search queries. One where I search for my IRL name (Ramon Smits) and one with my unique nickname (Exyll). Up until this montht this nickname was unique on the web and identified me directly but now someone took my identity. You really don’t have an idea about how amazed I was when I discovered this today. Imagine "Googling" on your social security number to find out that people are using it for their convinience..  now you might imagine how I feel today.

Gonna play a game of Need For Speed Most Wanted to feel better….

Instant messaging hell

So here we are in 2006 with all those instant messaging networks that don’t cooperate. Well there is Microsoft that made a deal with Yahoo but who uses Yahoo Messenger outside the states anyway? My first IM experience was with ICQ. I had a very intimate relation with ICQ and it was obvious that ICQ was way better then Windows Messenger those days. Since the beginnen of ICQ you had invisibility, blocking, file-transfers, offline messages and the ability to give certain contacts still the option to see that your invisible. The last is a feature I mis with all other networks.

But around MSN version 6 Microsoft created a competitive messenger with good audio and video support and filetransfers that also worked behind nat routers. Due to Microsofts aggressive marketing through Internet Explorer default page (the MSN portal) it became THE messenger for the masses in most parts of the world. I like MSN for it’s feature set but the UI isn’t professional at all. It is cluttered and just too BIG!

Then Skype came around. It had excellent nat support for voice conversations. The UI was fresh and small and it had no advertisement banner that ICQ and MSN still have. They just released a new version with video support and I must say that it works very well! It is the only vendor that has a multi-platform Messenger and what is also a very nice feature of Skype is that eveything is encrypted by default.. well.. there isn’t a way to disable encryption. This is interesting for businesses that would like to add services through an IM network to exchange personal or financial data. No commercial IM has encryption AFAIK.

Then there is this weird other IM GoogleTalk. I really don’t understand why Google released it. Google used the XMPP standard so thumbs up for that! Although they used XMPP their IM network was private but they opened it up after a small period. I like the small UI of GoogleTalk. A straight to the point IM to do what is has to do! But I miss the video/webcam feature to cam with friends and the audio quality isn’t on par with Skype.

So which IM do I use everyday? MSN currently wins. Just because all of my friends and relatives use it. I also have Skype running most of the time because I have family accross the borders and it is nice to have good audio conversations then. I also run Miranda quite alot to be online on the Yabber,  ICQ and Yahoo network but doesn’t get launched when I logon. Yeah I know that Miranda also supports the MSN network but then you don’t have the webcam and custom emoticons feature.

What would be the ultimate messenger? Well I think that ain’t possible. It would be nice if all IM networks would embrace the XMPP messaging standard. This way you can atleast do the basic IM stuff with eveybody. XMPP IM messages are easily extensible with nice features like custom emoticons, winks and such  because it uses xml. XMPP can also be used for feature negotiation and handshaking to startup services like video/audio calls. The first MSN messenger versions used Netmeeting to do video-audio conferencing. A very good example to let each tool do in what it does best. ICQ had this feature to negotiate features between clients and you could easily start those. I used it  to launch a game of quake world deathmatch. This isn’t possible anymore in ICQ and not in MSN too. Maybe a nice feature request for MSNplus!…….

How do you think about IM these days? What is your IM client? Did you customize it? Do you use IM alot?

Kids programming language reminds me of Amos

I read the Z-Buffer blog once in a while and the Z-man refers to an article at channel9 about the KPL . It remembers me to the days that I was programming in Amos on my Amiga 500. I made all sorts of small fun things and coding in Amos is indeed FUN. They try to achieve that with KPL too and maybe this is the environment to recommend to people that want to play around in an IDE to find out what programming is all about. I occasionally get questions from friends about programming. For example what it is, where to start and such. Most people think programming is dull and boring while this is of course plain wrong (lol). The point is that I really can’t explain to them why am I so addicted to programming and why I am so eager to keep me up-to-date on certain aspects of programming. I am just too experienced in programming too explain it in dummy style because when I try that it is still way too advanced 🙂

What is even more interesting is that they localized the KPL syntax if I heard them say in the video. This makes it even more accessible for people that aren’t really that good in English.

The next version (2.0) has wrappers around the managed directx framework and the way I see KPL is a fun addictive, environment to learn programming in your own native language. On the technical side it looks like a something between Amos pro and the 3d construction kit (also an Amiga game programming environment) but then a nice modern jacket.

They make it possible to generate vb/c# code from the KPL language and compile it with the .net environment. They made the KPL framework libraries available to .net applications to achieve this. This means that when people have advanced far enough in the KPL IDE they can learn new stuff, a new language, a new framework and even begin optimize their code which is awesome I think.

tip : fast directory navigation via Start -> Run

Everybody knows that you can easily navigatie through intellisense in the Run dialog or the address textbox of the explorer. But did you know that when you enter a complete path name in the run box that is a subdirectory of one of the paths in your PATH that that folder will be openen in the explorer?

Just try system32 or assembly for example. It will work with all folders although these are subdirectories of the windows folder.

I have included %PROGRAMFILES% into my %PATH% environment setting to easily navigate to some application folders like WinAMP, Miranda, etc. You will need to logoff/logon to make it work. Killing and restarting explorer.exe will probably work too :-).

  • Recent Posts
  • Recent Comments
  • Archives
  • Categories
  • Meta