0

Situation:

A Pyro4 server gives a Pyro4 client a Pyro4 proxy.

I want to detect whether the client is still indeed using this proxy, so that the server can give the proxy to other clients.

My idea at the moment is to have the server periodically ping the client. To do this, the client itself need to host a Pyro Daemon, and give the server a Pyro4 proxy so that the Server can use this proxy to ping clients.

Is there a cleaner way to do this?

Adrian Muljadi
  • 168
  • 1
  • 15

1 Answers1

0

I'd let the client report back to the server as soon as it no longer needs the proxy. I.e. don't overcomplicate your server with dependencies/knowledge about the clients.

Irmen de Jong
  • 2,739
  • 1
  • 14
  • 26
  • Thank you for the reply. What about for cases when the client dies while still holding the proxy? Is there a way to guard against that? – Adrian Muljadi Feb 20 '16 at 13:14
  • not really, although you will notice as soon as someone (your server?) is trying to call a method on the proxy. It will raise a communication exception. – Irmen de Jong Feb 20 '16 at 14:08