Home Help Center

Remote termination of a server

KeithPKeithP Member Keith PalihakkaraOrganization: Winton Capital ManagementProject: Trading System

Taking the simple client / server ICE example, if the client obtains a proxy, calls a method on that proxy that times out, is it possible for the client to remotely terminate that server given that it has its proxy details?

I have seen in the documentation that I can obtain administrative sessions, but I have not been able to see how this can be used to terminate the unresponsive server?



  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Keith,

    You can stop or kill a server with the IceGrid::Admin interface (you can obtain a proxy on this interface with an administrative session).

    However, there's no facilities to figure out which server an Ice object pointed by a given proxy belongs to. In some cases, it's not possible to figure this out. For example, a proxy can point to a replicated Ice object hosted by multiple servers if you use replica groups.

    If you don't use replication, you could extract the server ID from the adapter ID of the proxy (the default adapter ID is <server id>.<adapter name> and can be set to any other value, see here for more information).

    That being said, I suspect doing this in the client might not be the best solution. Did you consider instead to implement a special service that takes care of monitoring servers health and take appropriate action if it detects a server that doesn't response in a timely manner? This way, your clients don't have to worry about this.

  • KeithPKeithP Member Keith PalihakkaraOrganization: Winton Capital ManagementProject: Trading System
    Hi Benoit,

    In my actual application I'm using sessions and proxies, such that if the call times out I have the session / proxy details.

    I've managed to obtain an IceGrid::Admin session, I can see it has a command stopServer which accepts a string. Can you tell me what I need to provide as this string, also is there any documentation regarding the interface available on the IceGrid::Admin interface.

Sign In or Register to comment.