We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Client-side refresh issues with data server

Answered
Luke Palmer asked on June 9, 2022

Hello,
Our goal is to use Flexmonster data server with data that periodically changes and to refresh the client after such a change.
It would be helpful if the data server could signal the client to reload upon a data change. Is this possible?  I do not see a way.
 
As a workaround, we have tried making the client blindly refresh on a fixed interval. This usually, but not always, works. Sometimes the client receives a modal dialog box that says:
Error
Custom data source api: error on <URL>/members
Index with name "<name>" is currently loading. Please try again later.
 
This error message results in a poor user experience, because aside from the error, trying again following the error resets the state of the client. That is: suppose the user has filtered, pivoted, drilled down, etc. If the refresh works, the same view is updated in-place. If the refresh fails, the client state appears to reset and the user loses what they were doing.
We'd love a hand with this. Triggering the client to refresh when data is ready is the best solution, but workarounds to the state reset problem would also help.
Thanks! 

4 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster June 10, 2022

Hello, Luke!

Thank you for reaching out to us.

Currently, Flexmonster Data Server does not provide a ready-to-use way to signal Flexmonster to reload on index refresh. However, it is possible to extend the base functionality and implement such a feature by using Flexmonster Data Server as a DLL. Still, if we understand correctly, the main issue in your case is the error pop-up that appears when Flexmonster requests an index that is currently being refreshed.

This error message indicates that the index refresh has not been completed on the side of Flexmonster Data Server. In this case, the index is already deleted before the refresh, but new data is still not loaded. To prevent such issues, more recent versions of Flexmonster Data Server (starting from v.2.9.15) have the "Keep data on refresh" setting. While enabled, this setting allows storing the old dataset in RAM while refreshing the index. In its turn, this update should help resolve the issue you are facing.

If you are using older versions of Flexmonster and FDS, we recommend updating them to the latest versions.
Check out our updating manual for guidance.

Also, we would like to mention that the data reload can be done with the updateData API call. It allows refreshing the data without losing other report settings. Please check an example of this method's usage: https://jsfiddle.net/flexmonster/xf5rn80j/.

Please let us know if updating Flexmonster Data Server and Flexmonster helped you.

Best Regards,
Maksym

Public
Maksym Diachenko Maksym Diachenko Flexmonster June 21, 2022

Hello, Luke!

Our team is wondering if you had time to test the suggested approach to solve the loading issues.
Please let us know if it was helpful.

Best Regards,
Maksym

Public
Luke Palmer June 21, 2022

This was helpful, thank you!
For the future, we'd be interested in a feature where the client automatically reloads when the data server has new data avaialble. The DLL method won't work for us because we don't use Windows / .NET.

Public
Maksym Diachenko Maksym Diachenko Flexmonster June 22, 2022

Hi, Luke!

Thank you for your feedback.

We are glad to hear that using the "Keep data on refresh" setting helped you.
Automatic data reload after index refresh can be a convenient feature for Flexmonster Data Server. For this reason, we have added this feature to the customer's wishlist. Our team will contact you in case of any updates on the matter.

Feel free to write us in case of any questions.

Best Regards,
Maksym

Please login or Register to Submit Answer