Monday, September 10, 2007

Interview on SOA and Web services

WS-* vs REST arguments are getting very popular these days. Knowing WS-* for some extent and read through the REST concept a bit, I don't understand the real fuss behind these arguments at all. Since all the big industrial giants are competing on this each other, I don't want to dig my little head in to it. But I just wanted to clarify something to myself. So this post is just to make my self clear on these technologies. I think by asking my own questions to me, I will be able find some answers or at least my friends will jump in to me and explain it. Let me try to make this post more interesting. I would like to invite Lasantha (The busy journalist in Sri Lanka) to interview me on this !!!


Lasantha : Hi JK, would you spend some time on a interview with me.


JK : Me ? With you, oh no, you are a very dangerous guy !


Lasantha : That's all past JK, Now I moved in to interview about these more safer WS vs REST arguments !


JK : Oh god, You will find it more difficult than your political interviews man. Anyway go ahead.


Lasantha : People are arguing on WS-* vs REST , SOA vs ROA etc etc. What's your opinion on this.


JK : First of all Lasantha, I do not belong SOA republican party or ROA conservative party. I am non-aligned guy or rather I know neither of these technologies very much.


Lasantha : Thats ok, what do you think about the SOA and ROA?


JK : Well, SOA is an attempt to approach a design on a service oriented way. You define the services independently first and then provide a way to the designer on how these services can talk each other. Basically it is an evolution of traditional modular programming. But different is , you embed the service call inside the codes in the traditional distributed programming, where in SOA you treat them as services and provide the meta data about a service to another service instead calling it from source code.


Lasantha : What's the point doing it ?


JK : There is a point. First of all you see a business driven design (Is it a new term or an obvious one ? ). Designers will start looking the system in a services oriented way. So reusability will become easy and sensible I suppose. Atomic level of modularity becomes larger and the a service it self will become an application you can see.


Lasantha : Yes I see a point.


JK : There is another important point as well. Remember I told you, a service will offer a meta data of it, where another service can use the meta data to know how to talk with that service. So just think like if that meta data becomes a standard one then every body will start using it. The so called interoperability will become easy then.


Lasantha : Isn't it the CORBA or DCOM trying to archive ?


JK : You started asking your political questions now. Well I didn't tell you that CORBA is different from SOA. You see, SOA is a concept. CORBA or DCOM or web services are technologies which can be used to implement a SOA application.


Lasantha : So SOA is not web service then ?


JK : Correct, no way both can be same. In your terms, SOA is like communism and web service is like Marxism . But you know there are Leninism or Maoism where all these are trying to archive communism in different ways.


Lasantha : oh Ok .. So SOA is more of a methodology while web service is a kind of representation or rather implementation right ?


JK : Yes great.


Lasantha : Then why people confuse on web service and SOA are same.


JK : It is like how REST people forgot about the origin of REST. REST was there even before, but now only it becomes a buzz word. Like wise the SOA concept is there even before these CORBA and DCOM came, but now only it shapes up well with web services. And full credit to the companies who successfully faltered people for make them believing SOA and web service are same !


Lasantha : That means web service is not the sole representation of SOA ?


JK : It cannot be sole ... but it is the best option available for now. Something like 'Dravid is the best currently available option for Indian captaincy !, but of course not the best '


Lasantha : Why do you think so ?


JK : Because Ganguly has just come back in ! Just kidding. Ok get back to the point. This is one thing I am also looking for. I think web services adopt SOA really well. Probably when web service was introduced there must be a good understanding on SOA. So web services concept or rather specs might have developed with SOA in mind.


Lasantha : Can you describe more please ...


JK : The key success for the SOA is on how you define the contract. That is very important since here machines talks each other without any manual intervention. The contract specified in web services is more clear , understandable which is in XML. More over CORBA is a an object oriented model. The client server coupling is very tight opposed to the web service's loose coupling. The wire protocol is SOAP which is much easier to work with than the binary format in CORBA. And I see CORBA as an underlying technology as it doesn't address the SOA approach in a broad way. But web service is giving is a big picture and it is very easy to design a SOA flavored application using web service than the CORBA. I think these days these kind arguments are not raising much after WS-I drops the RPC concept in web services.


Lasantha : Why is that ... RPC is a good model though.


JK : Thats the thing. You need to come out from the object oriented model which CORBA posts. SOA is more to do with services not operations. Traditional web services used to create the web service methods and functions at the source code level and the transform them is WSDL. For example you write method called foo in a class and create the WSDL from that java class.


Lasantha : What's wrong with it ?


JK : Every thing is wrong. You have to focus on the contract first, Otherwise you will often change your contract when ever you change the server classes. The RPC feature in WS had this impact. People often looked at the RPC web service as a replacement of CORBA. And they forgot to think about the “service” orientation there. Otherwise you would fall in to the reverse engineering I suppose.


Lasantha : So you think the contract first is very important ?


JK : I think thats entry point for SOA. It's like you have to design first without worrying about the underlying implementation. And when it comes to interoperability, it is even more important. You have to define the contract of your service properly. You got to implement the WSDL. This is all about messaging and services not operations.



JK : Beside that web services adopts the www very well as how it's name suggests. I think thats where it stands tall. Its focus on security and trust like features go beyond what http provides. It tries to standardize these features very well. For example, you can sign a SOAP message and send in a much secure way than what standard HTTP promises. Most of the times http can be safe enough but there are situations when you need more that what http addresses.


Lasantha : I think, we need to discuss this in details and should bring ROA or rather REST in this conversation. We will continue soon


JK : Yes true. It would be better if we continue this with REST later. See u then bye.

No comments: