Friday, September 03, 2004
« A thorough examination of SOA concepts b... | Main | My highfalutin career advice »

In some previous posts on service-oriented architecture (SOA), I got comments from various people indicating that SO could/should be applied inside applications as well as between applications. I am skeptical about this - here's why.

Attempting to apply service-oriented concepts inside an application is non-trivial. This is exactly what we tried to do in FORTRAN, C and other languages years ago.

At the time we all argued that it was a good idea - procedural programming made a lot of sense. If you passed all required data in via paramters, and got all data out as a result then procedures were a great way to encapsulate behavior. In this context a procedure of yesteryear and a service of tomorrow are really the same thing.

Of course it didn't actually work that way. Packaging all the data into the parameters was often a huge task, and so virtually everyone cheated by using a common block of memory or other global variable techniques. Thus procedural programming was brought to its knees, because procedures didn't “own” the data on which they operated.

This is a core flaw in object-oriented (OO) designs as well. It is very common to pass an object as a parameter and have some method act on the object. But what you really pass is an object reference. The actual object is conceptually similar to a common block in that case.

Now I agree that OO avoids many flaws of procedural programming, but the fact that methods end up acting on the same physical set of data (objects) can be problematic.

So to apply SO (service-oriented) concepts inside an application means that we're going to take the procedural approach from FORTRAN, but this time we're not going to cheat. Instead we're going to package all the required data into a message (not an object, because the message must be passed by value!!!) and pass it to the procedure (service).

As with FORTRAN years ago, I agree that this could be done. But we didn't have the discipline then, and I very much doubt we have the discipline now. It is just too damn much work to create an XML document (or whatever) each time I need to call a method, and then to unpack an XML document to get at the result. It is simply unrealistic to expect that developers are going to go through this much work.

And people today complain about code bloat. Think of the bloat we're talking about here. Rather than putting an integer on the stack to call a method, we're now going to put the integer into XML and put the XML on the stack? Good thing Moore's Law is out there to save our collective asses...

This is not to say that SO won't work between applications. In that case it will (I think) work very nicely, because you can't cheat. It isn't possible to use a common block or reference to an object across process or network boundaries, so we have to pack parameters and pass them by value.

In the end, SO is what FORTRAN and C were meant to be - and without the possibility of cheating it might really work. Long live procedural programming!

Friday, September 03, 2004 8:04:15 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  | 

Friday, September 03, 2004 9:10:22 AM (Central Standard Time, UTC-06:00)
Rocky, thanks very much for all the SOA-related posts on your blog. Over the last few months you have taken just about every angle to try and explain to people what SOA is all about. So much so that I can just point people to your blog, and when they come back to me, I can see there is a "new light shining upstairs". 8-)

Just like with anything else in the programming world, there is no hard and fast rule to help to decide when to use a service interface or not. You have mentioned various criteria that helps with this decision, such as levels of trust, frequency of the calls, fine-grained vs. coarse-grained, etc. There is another aspect that I like to add to this, and it is how much the specific call relates to the system vs. to the business.

Yes, all information ultimately does end up being used by the user (the business), but try to think just about an individual call at a time, for example with a call to retrieve data from a data source, it is still just data at that time, no business logic has been applied to it yet, hence very little business value, more system value, which means probably not a good idea for a service interface!

But put a whole bunch of data together, that came from individual data retrieval calls, apply some business logic, expose it as some type of a business process, and suddenly the business is more interested - More business value and more suited for a service call!
Anton van der Merwe
Thursday, September 09, 2004 9:31:47 AM (Central Standard Time, UTC-06:00)
Hey Rocky,

An excellent and concise explanation. for more details we can go to Pat Helland...

Jackie
Thursday, September 09, 2004 5:32:29 PM (Central Standard Time, UTC-06:00)
Rocky,
Very helpful, thanks for clarifying the different spaces.
It seems that to work with services in an architected way we will need an orchestration mechanism to oversee the process.

What is your take on Event driven architecture and it's relationship with SOA?

This blog entry includes some useful links on EDA:
http://blogs.msdn.com/michael_platt/archive/2004/08/04/207801.aspx

Isn't ERDA also another approach to managing services?
http://www.gotdotnet.com/workspaces/workspace.aspx?id=9c29a963-594e-4e7a-9c45-576198df8058

Bill
Bill
Comments are closed.