open-rmf/rmf-web

Auto-refresh task queue table every 5 seconds (perhaps?)

aaronchongth opened this issue · 3 comments

Feature request

Description

Related to issue #629, and PR #697.


Current behavior

The current task queue table will not automatically be populated with new tasks or updated, unless the refresh button is pressed.


After #697

Task queue table will be updated via the app context, when a new task is created. But task queue table will remain stagnant if no new tasks are created, and refresh is not manually clicked.


Desired behavior

Task queue table will periodically be updated. Realtime updates are not necessary, every 5 seconds or so would be sufficient.


Implementation considerations

  • To use the app context's update call if possible
  • Dialogs and interactions with the task queue datagrid table will be interrupted every time the table is updated, making interactions like setting filters difficult, as users will need to quickly adjust settings within that 5 seconds. We should either 1) make table updates not disrupt user interactions, or 2) when users are interacting with the table, stop automatic updates

The task table needs to hit the database on every refresh, auto refresh will increase the server load drastically.

Since we are performing a full refresh after #697 once tasks are submitted, how about only refreshing or fetching tasks that are queued up or underway? Instead of a full refresh with all the completed, cancelled or aborted.

Since we are performing a full refresh after #697 once tasks are submitted, how about only refreshing or fetching tasks that are queued up or underway? Instead of a full refresh with all the completed, cancelled or aborted.

For updating the status of tasks that are currently displayed, it should be possible to use the websocket api. What won't work with websockets is fetching (+sorting, paging etc) new list of tasks.