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

Automatically refresh external preview #1741

Closed
szolo opened this issue Apr 26, 2018 · 2 comments
Closed

Automatically refresh external preview #1741

szolo opened this issue Apr 26, 2018 · 2 comments
Assignees
Milestone

Comments

@szolo
Copy link
Contributor

szolo commented Apr 26, 2018

The external preview for Platform designs should be automatically refreshed when the model changes.

Notes

  • Probably needs some kind of javascript to connect with server
  • Possible options include LiveReload, web sockets push, polling.
  • Test Atmosphere
@ripla ripla changed the title External preview is not updated Automatically refresh external preview Apr 30, 2018
@ripla ripla added the backlog label Jun 5, 2018
@Legioth
Copy link
Member

Legioth commented Jun 5, 2018

I would recommend using plain websockets here, or maybe looking in to SSE (polyfilled for M$ browsers) as an alternative. Websockets require a little bit more client-side code than SSE (~10 lines of code vs ~5), but are instead slightly more straightforward on the server (especially if you want to do it "properly" with async servlets, though that might not be needed in this case).

LiveReload might also be an option if a servlet-based option is available (based on a very quick google search, the main Java implementation is based on Netty).

I don't think Atmosphere will be over very much help here based on the assumption that you won't need e.g. automatic fallback to another protocol. This is mostly needed in cases where there's e.g. a broken HTTP proxy in between that eats websockets, which I assume won't be a problem in this case?

@ripla
Copy link
Contributor

ripla commented Jun 6, 2018

Yeah, the use case is that most of the time it's just a localhost connection. In some cases it might be in the same local network. Websockets and SSE sound good.

@szolo szolo self-assigned this Jul 2, 2018
@szolo szolo assigned mjvesa and qtdzz and unassigned mjvesa Jul 17, 2018
@szolo szolo added this to the 3.0.6 milestone Jul 25, 2018
@szolo szolo closed this as completed Jul 25, 2018
@ripla ripla removed the backlog label Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants