Home Help Center

Ordering of server activation in IceGrid

joshmoorejoshmoore GermanyMember Josh MooreOrganization: Glencoe Software, Inc.Project: OME, http://openmicroscopy.org
Is there any way to order server activation in IceGrid? Specifically, I have two servers which are activation="always", but on startup, they update a shared resource. I'm worried about race conditions.

The options I see are (A) implement some form of resource locking external to Ice (B) control the activation ordering (C) mark one server as "on-demand" and load it from the other one. (C) seems to be the easiest implementable solution at the moment, but it would certainly be nice if this functionality were available in the descriptor directly.

Thanks,
~J.

Comments

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

    No, there's no way to order server activation in IceGrid.

    If the shared resource is updated before the object adapter of each server is activated, you could also for example ping an object from server A (with ice_ping()) before updating the shared resource in server B. The server B would therefore update the resource only once A is activated and has updated the shared resource.

    Cheers,
    Benoit.
  • joshmoorejoshmoore GermanyMember Josh MooreOrganization: Glencoe Software, Inc.Project: OME, http://openmicroscopy.org
    Thanks, Benoit.

    I've decided to use a file-locking mechanism in python as a workaround. The number of possible states for each server enabled|disabled X active|inactive|deactivating|... was prohibitive.

    If possible, consider this a feature request, but for our case, it's very solvable outside of Ice.

    Best wishes,
    ~J.
Sign In or Register to comment.