Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temp subscriptions #237

Open
imaginator opened this issue Sep 23, 2014 · 3 comments
Open

Temp subscriptions #237

imaginator opened this issue Sep 23, 2014 · 3 comments

Comments

@imaginator
Copy link
Member

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?

@lloydwatkin
Copy link
Member

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

@jkarneges
Copy link

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.

@Schnouki
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants