Yesterday I was reading some posts regarding WCF, and found the following:
"In my opinion, netTcpBinding is a very good option for us given its good performance and security options. On the other hand, it does not respect the tenets of SOA"
This made me think. Why using a TCP transport is considered a violation of the SOA tenets? Let's take a look again at those tenets (can be found here) and see what happen if we'll take an HTTP-based app and convert it to a TCP one:
1. Boundaris are explicit: When the service's boundaries are well defined, changing the protocol won't make any difference. We'll still need to send messages when we did it before, and where there were no messages at all - there won't be with TCP either.
2. Services are autonomous: If the service can stand-alone using HTTP, it will still have this capability using TCP.
3. Services share schema and contract, not class: Now, this is where we might have a problem. When using HTTP, we obviuosly share schema - simply put a monitor on the channel and the XML message will shine thrught it, all readable and clear. Now that what I call a schema! With TCP this is obviously not the case. It is using a binary format which is unreadable and can't be visualised (not easily, anyway). So, does this violates the 3rd tenet? Not necessarily. SOA should allow two (or more)applications to talk to each other, not application and human. The fact that we cannot understand the message does not mean it's invalid. It is just encoded in a different way, a way that, by chance, our inferior human brain can't fathom. But it is still schema nonetheless.
4. Service compatibility is determined based on policy: Here, also, the fact that we are using TCP instaed of HTTP has no impact.
We have grown to the perception that a valid SOA system must use SOAP over HTTP. It is more "Open", more "Stanndard", more "Understandable". Actually, all these may be true, but that's not make them a mandatory for a SOA application. There are many inherent advantages to using TCP instaed of HTTP, and using it will not make our app any less SOA-ish,