Thursday, February 03, 2005
« dasBlog upgrade and a trip to Chicago | Main | SOA really is just RPC with angle-bracke... »

I’ve hashed and rehashed this topic numerous times. In particular, read this and this. But the debate rages on, paralyzing otherwise perfectly normal development teams in a frenzy of analysis paralysis over something that is basically not all that critical in a good architecture.

 

I mean really. If you do a decent job of architecting, it really doesn’t matter a whole hell of a lot which RPC protocol you use, because you can always switch away to another one when required.

 

And while web services a pretty obvious choice for SOA, the reality is that if you are debating between remoting, web services and DCOM/ES/COM+ then you are looking for an RPC protocol – end of story.

 

If you were looking to do service-oriented stuff you’d reject remoting and DCOM/ES/COM+ out of hand because they are closed, proprietary, limited technologies that just plain don’t fit the SO mindset.

 

In an effort to summarize to the finest point possible, I’ll try once again to clarify my view on this topic. In particular, I am going to focus on why you might use remoting and how to use it if you decide to. Specifically I am focusing on the scenario where remoting works better than either of its competitors.

 

First, the scenario that remoting does that web services and ES/COM+/DCOM don’t do (without hacking them):

 

1.      You want to pass rich .NET types between AppDomains, Processes or Machines (we’re talking Hashtables, true business objects, etc.)

2.      You are communicating between layers of an application that are deployed in different tiers (We’re not talking services here, we’re talking layers of a single application. We’re talking client-server, n-tier, etc.)

3.      You want no-touch deployment on the client

 

If you meet the above criteria then remoting is the best option going today. If you only care about 1 and 2 then ES/COM+/DCOM is fine – all you lose is no-touch deployment (well, and a few hours/days in configuring DCOM, but that’s just life :-) ).

 

If you don’t care about 1 then web services is fine. In this case you are willing to live within the confines of the XmlSerializer and should have no pretense of being object-oriented or anything silly like that. Welcome to the world of data-centric programming. Perfectly acceptable, but not my personal cup of tea.  To be fair, it is possible to hack web services to handle number 1, and it isn't hard. So if you feel that you must avoid remoting but need 1, then you aren't totally out of luck.

 

But in general, assuming you want to do 1, 2 and 3 then you should use remoting. If so, how should you use remoting?

 

1.      Host in IIS

2.      Use the BinaryFormatter

3.      Don’t create custom sinks or formatters, just use what Microsoft gave you

4.      Feel free to use SSL if you need a secure line

5.      Wrap your use of the RPC protocol in abstraction objects (like my DataPortal or Fowler’s Gateway pattern)

 

Hosting in IIS gives you a well-tested and robust process model in which your code can run. If it is good enough for www.microsoft.com and www.msn.com it sure should be good enough for you.

 

Using the BinaryFormatter gives you optimum performance and avoids the to-be-deprecated SoapFormatter.

 

By not creating custom sinks or formatters you are helping ensure that you’ll have a relatively smooth upgrade path to Indigo. Indigo, after all, wraps in the core functionality of remoting. They aren’t guaranteeing that internal stuff like custom sinks will upgrade smoothly, but they have been very clear that Indigo will support distributed OO scenarios like remoting does today. And that is what we’re talking about here.

 

If you need a secure link, use SSL. Sure WSE 2.0 gives you an alternative in the web service space, but there’s no guarantee it will be compatible with WSE 3.0, much less Indigo. SSL is pretty darn stable comparatively speaking, and we’ve already covered the fact that web services doesn’t do distributed OO without some hacking.

 

Finally, regardless of whether you use remoting, web services or ES/COM+/DCOM make sure – absolutely sure – that you wrap your RPC code in an abstraction layer. This is simple good architecture. Defensive design against a fluid area of technology.

 

I can’t stress this enough. If your business or UI code is calling web services, remoting or DCOM directly you are vulnerable and I would consider your design to be flawed.

 

This is why this whole debate is relatively silly. If you are looking for an n-tier RPC solution, just pick one. Wrap it in an abstraction layer and be happy. Then when Indigo comes out you can easily switch. Then when Indigo++ comes out you can easily upgrade. Then when Indigo++# comes out you are still happy.

Thursday, February 03, 2005 10:11:20 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [5]  |  Related posts:
Webcast on SOA, REST and related topics
Why enable the data portal behind a web service?
Serializing business objects to Silverlight/AJAX?
WCF NetDataContractSerializer and SecurityException
Does workflow compete with CSLA .NET?
Semantic coupling: the elephant in the SOA room
Tracked by:
"Are SQL Server 2005 Web Services SOA's friend or foe? " (Enjoy Every Sandwich) [Trackback]
"Are SQL Server 2005 Web Services SOA's friend or foe? " (Mr. Bad Example) [Trackback]
"Two Down, Three To Go" (Javier G. Lozano) [Trackback]
"Cakes/Onions/Ogres/Code - All have LAAYEERS !!!" (Sahil Malik : Sex, Food ) [Trackback]
"Performance of Web Services / Remoting / Enterprise Services" (www.ChrisMay.org... [Trackback]
"bay area photographer" (bay area photographer) [Trackback]
"maryland automotive windshield" (maryland automotive windshield) [Trackback]
"her first audition" (her first audition) [Trackback]
"annuncio affitti isernia" (annuncio affitti isernia) [Trackback]
"paul posey tallahassee florida" (paul posey tallahassee florida) [Trackback]
"sauna mista milano" (sauna mista milano) [Trackback]
"georgia bulldog" (georgia bulldog) [Trackback]
"cd organizers" (cd organizers) [Trackback]
"congelatore da incasso" (congelatore da incasso) [Trackback]
"cameriere in autoreggenti" (cameriere in autoreggenti) [Trackback]
"Sports Betting Rss Feed" (Sports Betting Rss Feed) [Trackback]
"albuquerque respiratory jobs va medical center" (albuquerque respiratory jobs v... [Trackback]
"tiaras and headpieces" (tiaras and headpieces) [Trackback]
"used kountry aire camper trailer" (used kountry aire camper trailer) [Trackback]
"columbus ohio commercial real estate" (columbus ohio commercial real estate) [Trackback]
"invisibile pulcino dildo" (invisibile pulcino dildo) [Trackback]
"fotografico" (fotografico) [Trackback]
"sms gratis cellulare" (sms gratis cellulare) [Trackback]
"racconto erotici con animali" (racconto erotici con animali) [Trackback]
"female body builders posing" (female body builders posing) [Trackback]


Friday, February 04, 2005 1:02:57 AM (Central Standard Time, UTC-06:00)
One issue I've run into in designing distributed archictures are -

I have the choice of not abstracting enough and risking future distributed architecture's break my current architecture.

Or

I have the choice of abstracting enough and have 17 tiers to execute a simple select query.

The right path to walk in between will become clearer when the Indigo CTP comes out in March (I think?).

I worked on a project that had about 650 distributed servers across the united states. The architecture was heavily invested in remoting. The problem is, such architectures were devised 3 years back when Indigo was still in diapers (It's still only in knickers, but atleast it's potty trained now).

And thinking in the mindset of a project architect when remoting was new, and DCOM/RPC/MTS Packages were the norm, the average project architect is too busy implementing real business problems rather than constantly following the possibility of something called a channel that will be fully configurable - when he is still used to setting IP addresses in registry for his DCOM solution.

In short - I really hope the distributed computing paradigm settles down a bit at Indigo.

It really needs to, or we will end up with a lot of crappy architectures to inherit. A cruel fact of life, not everyone is Rocky Lhotka or Ari Bixhorn.

:)
Friday, February 04, 2005 2:06:19 PM (Central Standard Time, UTC-06:00)
One concern of abstracting away Indigo/Indigo++/Indigo++# is how crazy they are going to throwing away plain old X objects (POXO, borrowed from POJO, plain old java objects). For example, are they going to force people using those crazy attributes in every plain objects? if that is the case, abstraction is out of luck.

I understand that you also have noticed this, for CSLA.net v2. I hope Indigo is not that crazily "innovative"!!

Kai
Saturday, February 05, 2005 7:58:29 AM (Central Standard Time, UTC-06:00)
Excellently put, Rocky. I wish more people could 'get' it as clearly as you put it. SOA as it is understood by so many people-who-make-the-decisions is really screwing up what sould be really tight application architectures.

Reminds me of the XML-is-the-solution-to-everything attitude I have had to deal with for years now. I almost cry with frustration when the experts convince companies that passing XML from the XMLSerializer between layers of a single PRIVATE application is the ONLY way to go.

The more 3 letter acronyms that appear the less people seem to understand (glad CSLA is 4 letters :)
Friday, February 11, 2005 12:36:19 PM (Central Standard Time, UTC-06:00)
We need 1, 2 and 3 and went with .net remoting. Of course, .net is on both sides (client and server) so that certainly helps. Only 'issue' is the performance hit with setting up the remoting infrastructure on the first call into the remote server.

ASP.NET does a load of startup on the first initial request, which is why
stuff hosted by ASP.NET incurs a performance hit. JIT compilations, shadow
copying, setting up of file watchers, loading modules, handlers etc, etc,
etc, etc

I am sure this is no better with a web service though.
Friday, December 02, 2005 12:46:38 AM (Central Standard Time, UTC-06:00)
find the best payday site here
Comments are closed.