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

ra-realtime alternative #4044

Closed
esistgut opened this issue Nov 25, 2019 · 4 comments
Closed

ra-realtime alternative #4044

esistgut opened this issue Nov 25, 2019 · 4 comments

Comments

@esistgut
Copy link
Contributor

esistgut commented Nov 25, 2019

react-admin 2 had the ra-realtime package for realtime updates, this has been deprecated and removed #3908

@fzaninotto commented about an alternative right way to do this using a global EventListener, can we get an example?

@fzaninotto
Copy link
Member

Realtime support wasn't ready for prime time in v3. Until it is, please ask the community for help. And if you want to speed up the reimplementation of ra-realtime by supporting us financially, please get in touch.

@bayareacoder
Copy link

bayareacoder commented Aug 5, 2020

@fzaninotto Can you elaborate why ra-realtime wasn't ready for prime-time?
We modified the older code from v2 to work with v3's object-based data provider and it seems to work using the realtime saga approach. Planning to use it for a real-time dashboard page fed via web sockets.
What is the reason you would move to a 'global EventListener and to interact with it from the dataProvider' approach instead? Thanks.

@djhi
Copy link
Collaborator

djhi commented Aug 5, 2020

Can you elaborate why ra-realtime wasn't ready for prime-time?

We just did not have the time to migrate it.

What is the reason you would move to a 'global EventListener and to interact with it from the dataProvider' approach instead? Thanks.

Because react and redux have evolved, we are moving away from redux-saga and using hooks instead.

We modified the older code from v2 to work with v3's object-based data provider and it seems to work using the realtime saga approach. Planning to use it for a real-time dashboard page fed via web sockets.

Nice :)

@bayareacoder
Copy link

bayareacoder commented Aug 5, 2020

Thanks for reply. The more fundamental issue I think is the lack of granularity of rendering the data updates. If you have a List view and only 1 cell in 1 record updates, it's still going to update the whole list, and will do that every time with every update (since basically ra-realtime creates a new FETCH_LIST action from a data update). Any suggestion how we could go about improving that in react-admin to update only changed records, or only changed cells within those records in a Li? Obviously we could throttle the updates of the whole page by changing the 'realtimeObserverChannel' in ra-realtime to act in less than realtime but that defeats the purpose.
Or I guess we rely on the virtual DOM diff here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants