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

Allow reactivelly informing the app of changes to the account #1855

Open
mitar opened this issue Apr 15, 2016 · 7 comments
Open

Allow reactivelly informing the app of changes to the account #1855

mitar opened this issue Apr 15, 2016 · 7 comments
Labels
app-platform App/Sandstorm integration features

Comments

@mitar
Copy link
Contributor

mitar commented Apr 15, 2016

For example, Sandstorm account could have handle changed. This will be send next time with next request to the app, I presume. But in Meteor, one does not really send new requests because apps are single-page apps. So some reactive way of informing the app of the change would be great. So that app can immediately respond to the handle change.

@zarvox
Copy link
Collaborator

zarvox commented Apr 15, 2016

We've discussed wanting to provide grains with some API they can use to subscribe to change notifications about things like grain title ( #1629 ) or user permissions ( #1709 ). I imagine other profile information like preferred-handle change would be worth supporting in whatever we implement there.

@kentonv
Copy link
Member

kentonv commented Apr 15, 2016

I think what we want to do here is restart all sessions when session parameters change. We already do this in the case of permissions changing.

@mitar
Copy link
Contributor Author

mitar commented Apr 15, 2016

I think what we want to do here is restart all sessions when session parameters change. We already do this in the case of permissions changing.

Based on some bad experience with Meteor hot-reloading, I think apps should have some control in saying when this session restarting should take place and how. Otherwise users might loose their work if you reload underneath them.

So maybe a better API would be to have some way that Sandstorm informs the app of its intent to restart the session and then app decides when to do that (by reloading or something). Then this could all be done with the same API.

(Of course, changing things like title of the grain should probably not reload the session.)

@kentonv
Copy link
Member

kentonv commented Apr 21, 2016

@mitar I'm not proposing reloading the page. I'm proposing restarting the backend session, which is a specific thing in Sandstorm infrastructure. The effect from your point of view is that the WebSocket will be reset. Meteor will automatically reconnect, but when it does, accounts-sandstorm will notice the changed user info. This is all invisible to the user.

@mitar
Copy link
Contributor Author

mitar commented Apr 21, 2016

Ah, so it is more like instance restart or migration of the user to a new instance. This sounds cool.

@paulproteus
Copy link
Collaborator

@kentonv does a session restart result in a new ephemeral hostname for the app? Just trying to make sure I understand the above.

@kentonv
Copy link
Member

kentonv commented May 15, 2016

@paulproteus No, it does not.

@ocdtrekkie ocdtrekkie added the app-platform App/Sandstorm integration features label Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app-platform App/Sandstorm integration features
Projects
None yet
Development

No branches or pull requests

5 participants