Skip to content

Temp subscriptions #237

Open
Open

Description

@imaginator

Sitting here with @jkarneges and talking about fanout and temporary subscriptions.

The node server had temp subscriptions to show realtime updates to non-auth'd users (webpage continuously updating). Incidentally it's also what Fanout uses for scaling requests.

What's involved in getting this functionality back?

Activity

  1. lloydwatkin commented on Sep 24, 2014

    @lloydwatkin
    Member

    I'm not sure any of the current contributors worked on temporary subscriptions, so no idea. Do you know how they worked?

  2. jkarneges commented on Sep 24, 2014

    @jkarneges

    Clients send directed presence to the pubsub service, and then include the pubsub#expire option when subscribing to a node. Details here:
    http://xmpp.org/extensions/xep-0060.html#impl-tempsub

    By the way, temporary subscriptions are useful even for authed users. They can be used to receive updates from a channel without an explicit "follow". The webclient supported this. Users could browse to any channel and see realtime updates, whether logged in or not, without having to follow first.

  3. Schnouki commented on Sep 24, 2014

    @Schnouki
    Member

    Pretty much as described in XEP-0060:

    • subscription with pubsub#expire set to presence were saved in the DB with the "temporary" flag set to TRUE
    • temporary subscriptions were not shown anywhere: they did not appear in subscriptions listing results, were not notified to federated services, etc.
    • temporary subscriptions were removed on server startup or when getting an unavailable presence from the subscriber

    The trickiest part was to get federated servers to notify the current servers of changed in a remote channel where the only local subscriber has a temporary subscription. I don't remember how I did that; perhaps it's a corner case that can be ignored to begin with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions