Option 1: Ruby request data on demand. (Current design.) But data is then lost when the window is closed. It might be difficult to ensure all data is synced when the event that the window is closing is called.
Options 2: Always sync data when it changes on the JS side. Possible problems: performance. And one should be careful that updates from the Ruby side doesn't trigger a callback loop.
Option 1: Ruby request data on demand. (Current design.) But data is then lost when the window is closed. It might be difficult to ensure all data is synced when the event that the window is closing is called.
Options 2: Always sync data when it changes on the JS side. Possible problems: performance. And one should be careful that updates from the Ruby side doesn't trigger a callback loop.