Poor Service Semantics

| No Comments | No TrackBacks

Though I've seen my share of badly formed "everything is a string" type interfaces like:

String runIt (in String stuff); // I saw this in someones IDL once :-(

or with more specific CORBA types in the interface:

AnySeq dotIt (in AnySeq stuff);   // Where AnySeq was a sequence of CORBA Anys
 

The problem with these is that the semantics are lost as to what the business actually is doing. Then you have to look at various pieces of implementation code to find out ALL the different things that this interface is. THIS IS BAD!!! Moreover you've just wasted money on technology - in this example CORBA. Why? Because now you have to essentially do all the marshaling of data in and out of the strings or Anys. Something that CORBA was designed to solve for you by giving you the type mappings. (Anys had their place ... allegedly ;-) Similarly if your Web service merely had a String parameter instead of some XML structure or data types you couldn't take advantage of all the marshaling capabilities of modern Web service enabling technology.

Some advocate a much more granular interface operation. E.g. having a specific interface operation for every product in your store! But this is neither practical or useful.

void buyItem (ProductCode, Quantity);

is much more sensible than:

void buyCheese( Quantity ); // I've seen something similar suggested

Consider an on-line retailer. You can be sure that there is not a placeItemTypeInCart for every subcategory of ItemType - i.e. placeNovelBookInCart or placeGardenHoseInCart etc. It would be completely impractical writing code (even generating code), maintaining code and documenting such an interface. Every time a business partner brings more products to your "store" you need to write more code.

This is the problem with taking some of the OO type concepts into the SOA world. We saw this and the earlier everything-is-a-string type approaches in CORBA and other technologies. Successful CORBA based application implementations are more than likely SOA based. You cannot and should not, as much as possible, let your implementation influence your SOA design. Now sometimes it does because perhaps you're not starting from scratch and you are dealing with production code (aka legacy). Extra layers of abstraction might be required to make a legacy application more service oriented.

No TrackBacks

TrackBack URL: http://ipbabble.com/cgi-bin/mt/mt-tb.cgi/41

Leave a comment

Who is IPBabble

William Henry IP Babble is the personal blog of William Henry.

William has 20 years experience in software development and distributed computing and holds a M.Sc from Dublin City University. He is currently working in the office of CTO at Red Hat on the MRG product. This weblog is not funded by Red Hat.

Posts are intended to express independent points of view, but understand that there is probably a bias based on the influence of working with standards based middleware for over a decade. (See disclaimer below)

February 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28

Disclaimer

The views expressed in this blog are solely the personal views of the author and DO NOT represent the views of his employer or any third party.

About this Entry

This page contains a single entry by William Henry published on March 9, 2006 10:46 PM.

Autonomous Orchestration was the previous entry in this blog.

I've been arRESTed! is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.