remoting events vs asynchronous (one way) calls

  • Thread starter Thread starter wobbles
  • Start date Start date
W

wobbles

Hi Everyone (Happy New Year!),

If I have clients that want to tell the server that something has
happened, what would be the difference between "remoting events" and
using an asynchronous (one way) call?

If I use an event, my server would use that event to "DoSomething" on
the server.
Similarly if I used an Async one way call, that would invoke a
server-side method that would also "DoSomething".

I've just been reading up on remoting events (Advanced .Net Remoting -
Ingo Rammer) and not only does it seem more complicated, but I don't
really see the difference between these two.
What am I missing?

If someone could tell me the differences (or pros and cons) of each
method that would be really useful.
I'm finding remoting to be a bit of a struggle at the moment.
 
wobbles,

If you want to tell the server something has happened, then using a
method call (optionally one-way or not), would be the best idea. The reason
for this is that if you want to have a server connected to a client through
an event, then the client has to open another channel for the server to
connect to it (the client is basically remoting itself to the server), and
that is just more overhead all around.

If anything, your method calls are events that you are firing to the
server (more or less). I think that remoting events should occur when the
server needs to tell the client something when the client does not ask. For
all other cases, the server listens and responds when the client talks
(through method calls, setting properties, etc, etc).

Hope this helps.
 
wobbles,

If you want to tell the server something has happened, then using a
method call (optionally one-way or not), would be the best idea. The reason
for this is that if you want to have a server connected to a client through
an event, then the client has to open another channel for the server to
connect to it (the client is basically remoting itself to the server), and
that is just more overhead all around.

If anything, your method calls are events that you are firing to the
server (more or less). I think that remoting events should occur when the
server needs to tell the client something when the client does not ask. For
all other cases, the server listens and responds when the client talks
(through method calls, setting properties, etc, etc).

Hope this helps.

Hi Nicholas,

That makes a lot of sense + I hadn't thought of it that way before.
That helps a lot and was exactly the sort of answer I was looking for.

Brilliant!

Thanks,
wobbles
 
Back
Top