[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Bob Rundle

8/24/2004 12:11:00 PM

I saw a note in this news group awhile back concerning the delivery of
remote events. The gist of the note was that you do not want to use the
standard event handling mechanism for remoting events because when one event
delivery fails, the remaining event handlers will not be called.

I was wrassling a bunch of snakes at the time and could not follow up on
that note. Could someone please give me a reference for this issue?

Regards,
Bob Rundle


4 Answers

Ken Kolda

8/24/2004 3:19:00 PM

0

This article touches on the subject and demonstrates how to use the
GetInvocationList() method on a delegate:

http://www.dotnetjunkies.com/Tutorial/BFB598D4-0CC8-4392-893D-30252E2...

Basically, you want to make sure that if you use events that you're careful
to make sure that if a client disconnects that this is handled gracefully
when your event is raised.

Ken


"Bob Rundle" <rundle@rundle.com> wrote in message
news:uRhocNdiEHA.556@tk2msftngp13.phx.gbl...
> I saw a note in this news group awhile back concerning the delivery of
> remote events. The gist of the note was that you do not want to use the
> standard event handling mechanism for remoting events because when one
event
> delivery fails, the remaining event handlers will not be called.
>
> I was wrassling a bunch of snakes at the time and could not follow up on
> that note. Could someone please give me a reference for this issue?
>
> Regards,
> Bob Rundle
>
>


Bob Rundle

8/24/2004 3:52:00 PM

0

Thanks Ken. However the reference I remember seeing used some type of async
delivery of the event. This is also important in my situation because some
of the remote event handlers may take some time to execute.

Bob Rundle


"Ken Kolda" <ken.kolda@elliemae-nospamplease.com> wrote in message
news:ukrhV3eiEHA.2908@TK2MSFTNGP10.phx.gbl...
> This article touches on the subject and demonstrates how to use the
> GetInvocationList() method on a delegate:
>
>
http://www.dotnetjunkies.com/Tutorial/BFB598D4-0CC8-4392-893D-30252E2...
>
> Basically, you want to make sure that if you use events that you're
careful
> to make sure that if a client disconnects that this is handled gracefully
> when your event is raised.
>
> Ken
>
>
> "Bob Rundle" <rundle@rundle.com> wrote in message
> news:uRhocNdiEHA.556@tk2msftngp13.phx.gbl...
> > I saw a note in this news group awhile back concerning the delivery of
> > remote events. The gist of the note was that you do not want to use the
> > standard event handling mechanism for remoting events because when one
> event
> > delivery fails, the remaining event handlers will not be called.
> >
> > I was wrassling a bunch of snakes at the time and could not follow up on
> > that note. Could someone please give me a reference for this issue?
> >
> > Regards,
> > Bob Rundle
> >
> >
>
>


Ken Kolda

8/24/2004 4:21:00 PM

0

If you want to do this asynchronously, then you have a couple of choices.
The first is to decorate your event handlers with the OneWay attribute. This
will allow the server to invoke the remote method without waiting for a
reponse. However, you will not know when the method completed or if it
completed successfully (since exceptions will not propogate to the server
code). Here's an article that discusses using the OneWay attribute in
remoting:

http://msdn.microsoft.com/library/en-us/dnpag/html/scalenetc...

The other choice is to use the BeginInvoke() method on the event handler
delegates to perform the call asynchronously. In this case, you should
ensure that you call EndInvoke() at some point for each delegate -- this
will also allow you to catch any exception that may occur (including client
disconnects). One catch with this technique is that, if you have a lot of
clients, you could flood your thread pool with requests to the clients and
cause a deadlock on your server (i.e. it can't receive any new incoming
requests).

Ken



"Bob Rundle" <rundle@rundle.com> wrote in message
news:u68LbJfiEHA.3264@tk2msftngp13.phx.gbl...
> Thanks Ken. However the reference I remember seeing used some type of
async
> delivery of the event. This is also important in my situation because
some
> of the remote event handlers may take some time to execute.
>
> Bob Rundle
>
>
> "Ken Kolda" <ken.kolda@elliemae-nospamplease.com> wrote in message
> news:ukrhV3eiEHA.2908@TK2MSFTNGP10.phx.gbl...
> > This article touches on the subject and demonstrates how to use the
> > GetInvocationList() method on a delegate:
> >
> >
>
http://www.dotnetjunkies.com/Tutorial/BFB598D4-0CC8-4392-893D-30252E2...
> >
> > Basically, you want to make sure that if you use events that you're
> careful
> > to make sure that if a client disconnects that this is handled
gracefully
> > when your event is raised.
> >
> > Ken
> >
> >
> > "Bob Rundle" <rundle@rundle.com> wrote in message
> > news:uRhocNdiEHA.556@tk2msftngp13.phx.gbl...
> > > I saw a note in this news group awhile back concerning the delivery of
> > > remote events. The gist of the note was that you do not want to use
the
> > > standard event handling mechanism for remoting events because when one
> > event
> > > delivery fails, the remaining event handlers will not be called.
> > >
> > > I was wrassling a bunch of snakes at the time and could not follow up
on
> > > that note. Could someone please give me a reference for this issue?
> > >
> > > Regards,
> > > Bob Rundle
> > >
> > >
> >
> >
>
>


Bob Rundle

8/24/2004 5:09:00 PM

0

Thanks Ken. That's exactly what I was looking for.

Bob Rundle

"Ken Kolda" <ken.kolda@elliemae-nospamplease.com> wrote in message
news:OoNzxZfiEHA.3664@TK2MSFTNGP12.phx.gbl...
> If you want to do this asynchronously, then you have a couple of choices.
> The first is to decorate your event handlers with the OneWay attribute.
This
> will allow the server to invoke the remote method without waiting for a
> reponse. However, you will not know when the method completed or if it
> completed successfully (since exceptions will not propogate to the server
> code). Here's an article that discusses using the OneWay attribute in
> remoting:
>
> http://msdn.microsoft.com/library/en-us/dnpag/html/scalenetc...
>
> The other choice is to use the BeginInvoke() method on the event handler
> delegates to perform the call asynchronously. In this case, you should
> ensure that you call EndInvoke() at some point for each delegate -- this
> will also allow you to catch any exception that may occur (including
client
> disconnects). One catch with this technique is that, if you have a lot of
> clients, you could flood your thread pool with requests to the clients and
> cause a deadlock on your server (i.e. it can't receive any new incoming
> requests).
>
> Ken
>
>
>
> "Bob Rundle" <rundle@rundle.com> wrote in message
> news:u68LbJfiEHA.3264@tk2msftngp13.phx.gbl...
> > Thanks Ken. However the reference I remember seeing used some type of
> async
> > delivery of the event. This is also important in my situation because
> some
> > of the remote event handlers may take some time to execute.
> >
> > Bob Rundle
> >
> >
> > "Ken Kolda" <ken.kolda@elliemae-nospamplease.com> wrote in message
> > news:ukrhV3eiEHA.2908@TK2MSFTNGP10.phx.gbl...
> > > This article touches on the subject and demonstrates how to use the
> > > GetInvocationList() method on a delegate:
> > >
> > >
> >
>
http://www.dotnetjunkies.com/Tutorial/BFB598D4-0CC8-4392-893D-30252E2...
> > >
> > > Basically, you want to make sure that if you use events that you're
> > careful
> > > to make sure that if a client disconnects that this is handled
> gracefully
> > > when your event is raised.
> > >
> > > Ken
> > >
> > >
> > > "Bob Rundle" <rundle@rundle.com> wrote in message
> > > news:uRhocNdiEHA.556@tk2msftngp13.phx.gbl...
> > > > I saw a note in this news group awhile back concerning the delivery
of
> > > > remote events. The gist of the note was that you do not want to use
> the
> > > > standard event handling mechanism for remoting events because when
one
> > > event
> > > > delivery fails, the remaining event handlers will not be called.
> > > >
> > > > I was wrassling a bunch of snakes at the time and could not follow
up
> on
> > > > that note. Could someone please give me a reference for this issue?
> > > >
> > > > Regards,
> > > > Bob Rundle
> > > >
> > > >
> > >
> > >
> >
> >
>
>