Archived

This forum has been archived. Please start a new discussion on GitHub.

solving a general problem using IceStorm

Is there a way to apply a user-defined "filter" so that every message published to an IceStorm publisher doesn't get automatically sent to every subscriber?

For example, in an online game, you would want subscribers that are "near" the source of the message to get all messages, subscribers farther away would receive messages less frequently, or not at all.

For a second question:
Reading the documentation, IceStorm only kicks subscribers if it gets a connection error. What would be the best way to make sure exceptions like ObjectNotExist, which aren't connection errors, so wouldn't be picked up by a oneway call, would remove a subscriber? Would this require making a seperate thread that ping()s subscribers in the background?

Comments

  • matthew
    matthew NL, Canada
    andhow wrote:
    Is there a way to apply a user-defined "filter" so that every message published to an IceStorm publisher doesn't get automatically sent to every subscriber?

    For example, in an online game, you would want subscribers that are "near" the source of the message to get all messages, subscribers farther away would receive messages less frequently, or not at all.

    There are no user-defined filters in IceStorm. You could possibly solve this problem by using an IceStorm topology. ie: creating a federation of IceStorm topics. See the Ice manual for more information on Federation.

    If you really need support for user-defined filters and have a commercial need please contact us at info@zeroc.com.
    andhow wrote:
    For a second question:
    Reading the documentation, IceStorm only kicks subscribers if it gets a connection error. What would be the best way to make sure exceptions like ObjectNotExist, which aren't connection errors, so wouldn't be picked up by a oneway call, would remove a subscriber? Would this require making a seperate thread that ping()s subscribers in the background?

    That sounds pretty expensive as a general purpose solution. Depending how your application is structured this problem may not exist in reality. An upcoming version of IceStorm will offer support for sending the IceStorm messages as twoway invocations which will help aleviate this problem if it really is an issue for you.

    Regards, Matthew