>At the moment, the lifetime of remote event and delegate handlers isn't bound
>to the session lifetime. This is also a security issue.
>A client can receive callbacks, even if it is logged off already.
It seems to be easy to fix.
I can add SessionID to DynamicEventWireBase and check SessionManager.ExistSession
before actual invocation. If the session doesn't exist, event handler is removed.
>temporary disconnected clients have time to reconnect until the session expires.
>But behavior of ZyanDispatcher then must be changed. It shouldn't remove handlers
>of unresponding clients, because there is a chance that they may reconnect.
That's not exactly what was in my mind.
I was thinking of re-subscription (client calls AddEventHandler again for every
event handler upon reconnection). Although it probably doesn't look nice :)
>An additional solution may be using the heartbeat signals (only possible if when
>polling is activated). ZyanDispatcher can suspend unresponding handlers and resume them,
>if their session gets a hearbeat. This prevents the dispatcher from dumb and
>expensive connection attempts.
That's a good idea!
We can resume suspended handlers on remote calls as well.
If the session gets either a heartbeat or remote call, then handler is re-activated.
>ZyanComponentHost may express callback errors in a special event to notify the
>server environment that handler X for event Y in session Z couldn't called successfully.
>In case of the suspend/resume solution, resuming an handler can also be expressed in this way.
Diagnostic events are always a good idea :)