Skip to content
New issue

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

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

Already on GitHub? # to your account

Reload config and reconnect clients on server restart #73

Closed
plouc opened this issue Apr 5, 2016 · 9 comments
Closed

Reload config and reconnect clients on server restart #73

plouc opened this issue Apr 5, 2016 · 9 comments

Comments

@plouc
Copy link
Owner

plouc commented Apr 5, 2016

No description provided.

@tomav
Copy link
Contributor

tomav commented Apr 6, 2016

I'm running my dashboard in a docker container.
When a change is done to configuration, a new image is built and deployed.
This mean that the server restarts but doesn't know that some clients were connected, so there's no data polling, and no update on connected clients.

When using a dashboard on a TV (without easy access to keyboard/mouse), it's a big problem.
Each client has to refresh the page to get futures updates (new widget added if conf changed, and also existing widget updates is a build status changed).

The purpose of this issue is to fix this behaviour?

@plouc
Copy link
Owner Author

plouc commented Apr 7, 2016

@tomav, yes it is, but there's another problem with disconnected clients.

This one isn't easy to solve because I made the (questionable) choice of having a javascript based config file, so it's loaded as a simple module (using require) which cache it, I've fixed it for styles generation when you change the theme (see https://github.com/plouc/mozaik/blob/master/gulp/tasks/styles.js#L17), but I'm not very found of this hack. Switching to json could ease it, but it won't be BC.

I've thought of another approach, abstracting the config so you could have for example a json based config, or having it stored in RethinkDB or whatever, but I think it'll require a lot of work.

I'll think more seriously about it, I agree it's a big issue when you use it on TV (which is one of the purpose of this tool :/).

@plouc plouc changed the title Auto-reload config on change Reload config and reconnect clients on server restart Apr 10, 2016
@plouc
Copy link
Owner Author

plouc commented Apr 11, 2016

@tomav, there's a WIP which should fix your problem, now you'll have a notification when the ws connection is broken, then the frontend will attempt to reconnect it 10 times each 15 seconds, see #77.

@tomav
Copy link
Contributor

tomav commented Apr 11, 2016

Great!

@plouc plouc self-assigned this Apr 11, 2016
@plouc
Copy link
Owner Author

plouc commented Apr 11, 2016

@tomav available in mozaik@1.4.0

@plouc plouc closed this as completed Apr 11, 2016
@tomav
Copy link
Contributor

tomav commented Apr 11, 2016

Upgrading! Thank.

@plouc
Copy link
Owner Author

plouc commented Apr 12, 2016

@tomav 1.4.1, there's a bug in 1.4.0

@tomav
Copy link
Contributor

tomav commented Apr 12, 2016

Ok.

@tomav
Copy link
Contributor

tomav commented Apr 12, 2016

Works great! 👍

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants