> Frans Bouma wrote:
> > I see where you're heading to, that advising webservices as bad is
> > wrong. :)
>
> Not quite. I'm saying that it's wrong to advise that webservices are
> *always* bad. Sometimes they're bad. Sometimes they're not.
Ok, however I thought I made an exception already for the 'xml
consuming clients' situation :)
> All of the points you bring up against them are valid in many
scenarios.
> I just don't think they are valid in *all* scenarios. The
> only thing I'm disagreeing with here is your original claim
> that web services are always the wrong way to connect two
> .NET systems together.
> I think they are often, but not always the wrong way.
> Sometimes they are they right way.
I think we weigh several aspects with different priorities so
our POV on this is different because of that. :)
> > However because webservices use xml to communicate, it has
> > limitations, remoting doesn't have.
>
> Agreed. However, it's also true that because remoting uses
> the .NET type system as the basis for its communications, it
> has some limitations that web services don't have. There are
> two limitations, one of which you have mentioned yourself -
> remoting isn't viable for cross platform work. It's the
> other limitation you seem to be ignoring, or are unaware
> of: sharing types makes it hard for systems to evolve independently.
> With .NET remoting you're always sharing some types, even if
> you've narrowed it down to a set of interfaces.
but that's not that of a problem, as .NET also has a wonderful
assembly downloading system, you can use to keep client / server in sync
(and which is meant to keep clients up to date)
> > You don't know how many times I get questions about people who want
to
> > use the rich objects of my O/R mapper in a webservice scenario.
>
> Suppose you use remoting to enable this scenario. For the
> first release of the system, everything looks great. But
> what happens when a new release of your rich ORM objects
> becomes available? (I'm assuming it's a technology that you
> are actively supporting, so there will, inevitably, be
> updates with enhancements, and bug fixes.)
... the client should download the latest version from the
remoted server automatically. If interfaces are kept the same, this
won't be a problem. It can be a problem in some situations, yes. However
that's related to having a distributed system. And webservices are out
of the question in that situation anyway.
> If I, as the author of the server, want to upgrade to your
> latest and greatest set of ORM tools, what happens to the
> client software? They're still using the old versions of the
> ORM tools. So I can't upgrade on the server without also
> simultaneously upgrading the client software.
true, but isn't that related to the fact that you have the same
types at both sides of the wire? If that's required, you have to
propagate types to both sides and keep the assemblies in sync. If you
just want to send simple classes with ints and strings over the wire,
you indeed can use webservices, I now know that, but it's the rich
objects more developers are interested in because these make life
easier. I don't see why a technology can be an advantage if I have to
drop rich object propagation to both sides because the communication
protocol (which is abstract btw, it's invisible) can't handle it.
[...]
> But consider the case where there isn't just one client, but
> instead there are 1000 desktop machines. The cost of
> synchronizing your updates just became more significant. Of
> course things like the AppUpdater and href deployment make
> this easier than it used to be. But there's yet another
> scenario where this doesn't help so much:
it's not in all cases efficient, true. However not being able to
use it or 'it is a bit hard', what do you choose? Isn't there just 1
choice?
You see, I'm not going back to the stone-age, I want to use rich
objects in all tiers of my application so I can leave a lot of logic to
these objects and focus on the higher order BL. If people want to spend
30, 40% of their project times on working with bare-bone objects just
because webservices can't pass accross richer objects, they may do that,
I'm not stopping them, but we're in 2004 now, and I don't see why it is
an advantage to go back to the technology level of 1994.
> What if my service turned out to be really useful, and there
> are 15 different applications throughout the company all
> using it? Now, when the new release of your ORM toolkit (or
> whatever types it is that I'm
> sharing) comes out, not only do I need to synchronize the release of
> *15* different applications (possibly deployed on thousands
> of machines), I actually need to have those 15 updates ready.
It's the service which provides an interface, an API, not the
client. So you need 1 update, not 15. If extra functionality was added,
you can also opt for a new interface, which under the hood re-uses code
from the old one, but offers new functionality in a new version of the
interface, so you can upgrade clients at your own pace. Upgrades aren't
popping up out of no-where. If someone decides to upgrade to a higher
version, this should be done with a reason. If that reason isn't big
enough to upgrade also the client code, perhaps the upgrade isn't that
necessary.
> My server-side change might be all ready to go, but I can't
> roll it out until all 15 client applications have suitable
> updates available. And even in the simple 'no recompile
> necessary' case where we just need to push new DLLs and a
> suitable config file, this has become a non-trivial effort -
> someone needs to do the necessary regression testing to make
> sure that these updates are going to work.
that's always the case, Ian, also with webservices, come on!
> If only I had chosen a remoting solution that didn't rely on
> both ends of the connection sharing type information, I
> wouldn't be in this mess - I could update the server as often
> as necessary without incurring all this extra cost.
that's not true, a webservice can fail to supply essential info
in a newer version, a client requires to work correctly -> you need to
update the client as well.
But this is not a pissing contest. All I said was: I find
webservices not required in 100% of the .NET - .NET situations only in
the xml-consuming situations. Because all other situations are object <-
transport protocol -> object systems, which will be developed better if
the objects being passed are richer than simple objects in a lot of
cases. Of course others may (and will :))think differently, you made
some excellent points which I find not that important, but others will
find these important and will make decisions based on YOUR points and
not mine, which is great, they have heard from both ends and can decide
who's right in their eyes.
> What it boils down to is not really XML vs anything else.
> It's about tight coupling vs. loose coupling. The thing
> you're complaining about - the inability of web services to
> pass around arbitrary graphs of objects of arbitrary types -
> turns out to work to your advantage here. You are prevented
> from doing all those things which are going to come back and
> bite you when you need to update the server. The lack of
> sharing of types is a positive feature *if* you need to be
> able to update the server independently of the client. (If
> you don't need to do that, then yes, it's a cumbersome
> restriction, and you should use .NET remoting
> instead.)
But I have to pay the price of not having rich objects in the
client. Why on earth should I want to pay that price? :) If the
protocol, which is abstract and hidden, would be more flexible, I would
be able to plug in my own xmlserializer which can produce the xml which
has cyclic references and richer type information. This is solved in
whidbey, so I'm waiting for that eagerly :)
> The XMLness is, strictly speaking, irrelevant to getting this
> So all I'm saying is that there's a tradeoff. You have to
> ask what's more valuable to you: the richness and performance
> of .NET remoting, or the loose coupling offered by web
> services? (Or, (3) write your own binary protocol...)
correct. I personally think the price for loosely coupled
client/service is almost always too high (in .net <-> .net land),
others, like you, think differently, and perhaps you're right and I'm
wrong, but I personally think that 'right' and 'wrong' are based on
priorities which are depending on the situation you're in.
> You say that you need to understand the limitations of web
> services before using them. I agree. But I also think the
> same is true of .NET remoting. Its limitations are often
> even less obvious than web services, because you can go
> through a complete release cycle without hitting them. If
> you don't go in with your eyes open, you only discover the
> potentially severe consequences of using .NET remoting mid
> way into the next release cycle, when it's far too late to
> change your mind.
I agree on this. I'd go even further to say that you have to
understand all limitations of distributed computing in general. Too many
people think it's a thing that comes for free, while it comes with a
high price tag.
FB
===================================
This list is hosted by DevelopMentor� http://www.develop.com
Some .NET courses you may be interested in:
NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls
View archives and manage your subscription(s) at http://discuss.develop.com