[MGNLGROOVY-132] Running groovy script should not block the UI Created: 15/Jan/15 Updated: 09/Feb/17 Resolved: 12/Aug/16 |
|
| Status: | Closed |
| Project: | Magnolia Groovy Module |
| Component/s: | None |
| Affects Version/s: | 2.3.2 |
| Fix Version/s: | 2.4.6, 2.5 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Christoph Meier | Assignee: | Federico Grilli |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | support | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 2.75d | ||
| Original Estimate: | Not Specified | ||
| Environment: |
M5.3.7-SNAPSHOT |
||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||
| Date of First Response: | |||||||||||||
| Sprint: | Basel 56 | ||||||||||||
| Story Points: | 13 | ||||||||||||
| Description |
|
When running a groovy script from the editor (launched with "RUN" button), it blocks the UI until the script has finished/terminated. It would be nice to have the possibility use other apps (whatever) during the script runs. Interesting read before tackling this issue https://vaadin.com/wiki/-/wiki/Main/Using+server+initiated+events |
| Comments |
| Comment by Federico Grilli [ 04/Aug/16 ] |
|
What I did in the related branch is an attempt at solving the problem with Vaadin's polling mechanism and Java concurrency's Future object. As mentioned by apchelintcev best solution for 5.5 would be using Vaadin's push capabilities which entail using Servlet 3.0, if I'm not mistaken. At any rate, what I did solves the issue of having a blocked UI during long running scripts. Af far as I can see, the main downside of my solution is that polling in Vaadin affects the whole UI, meaning that if there's more than one component using polling at the same time that could end up with undesired effects, e.g. one component could set a different polling interval or stopping polling altogether while another component still isn't done with its job. As far as I know, atm, only the UploadProgressBar component is using polling. |