Home Help Center

Object Replication?

Great product!

One question...

Object replication and federated servers are only mentioned briefly on page 56 of the manual/book. The IceStorm section discusses federated topics but I'm assuming it's different. Did I miss something or is this something we have to implement ourselves and not a configuration setting?

Thanks

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Re: Object Replication?
    Originally posted by rstolle
    Great product!
    Thanks!
    One question...

    Object replication and federated servers are only mentioned briefly on page 56 of the manual/book. The IceStorm section discusses federated topics but I'm assuming it's different. Did I miss something or is this something we have to implement ourselves and not a configuration setting?
    The only form of replication currently supported by Ice involves the use of multiple endpoints in a proxy. For example:

    ReplicatedObject:tcp -h host1 -p 10000:tcp -h host2 -p 10000

    When a connection is established using such a proxy, Ice selects one of the endpoints at random, and tries each one in the case of an error. It is up to you to ensure your servers are configured appropriately.

    Ice currently does not support replication using indirect binding (see the IcePack chapter), but that is something we will probably add.

    Take care,
    - Mark
  • rstollerstolle Member
    Re: Re: Object Replication?
    Originally posted by mes
    Thanks!

    The only form of replication currently supported by Ice involves the use of multiple endpoints in a proxy. For example:

    ReplicatedObject:tcp -h host1 -p 10000:tcp -h host2 -p 10000

    When a connection is established using such a proxy, Ice selects one of the endpoints at random, and tries each one in the case of an error. It is up to you to ensure your servers are configured appropriately.

    Ice currently does not support replication using indirect binding (see the IcePack chapter), but that is something we will probably add.

    Take care,
    - Mark

    I have a testing environment setup with a registry, 2 nodes (node1, node2) all on the same machine. Both nodes are running an IceBox with HelloServiceI as a service. When I deploy the application to all the nodes, node2 comes back with an ObjectExistsException on the 'Hello' object. From what you just told me I should get this error. I was thinking I could register the same object twice but at different endpoints and let the locator do the rest. :)

    So if I want to use the flexibility of IceBox services and have the same implementation across multiple services/servers to share the load, I'll just have to run each service's object with a different name like "::Hello1", "::Hello2", etc. I could then have a well known HelloManager object that returns a proxy to "::Hello1-n" at random.

    I hope that makes sense I still learning the terminology.

    Thanks

    -Ryan
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Re: Re: Re: Object Replication?
    Originally posted by rstolle
    I have a testing environment setup with a registry, 2 nodes (node1, node2) all on the same machine. Both nodes are running an IceBox with HelloServiceI as a service. When I deploy the application to all the nodes, node2 comes back with an ObjectExistsException on the 'Hello' object. From what you just told me I should get this error. I was thinking I could register the same object twice but at different endpoints and let the locator do the rest. :)
    Right, that's not currently possible.
    So if I want to use the flexibility of IceBox services and have the same implementation across multiple services/servers to share the load, I'll just have to run each service's object with a different name like "::Hello1", "::Hello2", etc. I could then have a well known HelloManager object that returns a proxy to "::Hello1-n" at random.
    Yes, that's a reasonable approach given the current functionality. Unfortunately, you lose the automatic retry/failover behavior in this situation, because each replicated server is represented by a different proxy, whereas in the sample proxy I mentioned above each server is an endpoint in a single proxy. Of course, it's not easy to create one of these proxies when you're using IcePack, since servers are likely using transient ports.

    What we would like to do in a future release is add the capability to IcePack to support replication. For example, it might be possible to configure a replicated object adapter, in which case the endpoints for all of the replicated adapters with the same name are combined by the locator.

    Take care,
    - Mark
Sign In or Register to comment.