recommendations for server-side data
Is this meant to be used for entirely client side applications? I was wondering if I can use this frontend component for building a viewer for big data, that I need for my internal team. My data could have hundreds of millions of rows over hundreds of columns. I was wondering if we have any opinions about holding only the required data in state, while hydrating and removing the data as the user scrolls.
Virtualization is missing, but I'm happy to open a PR with virtualization if this library is intended to go in that direction.
Let me know if the query doesn't make sense.
Hey! That is a great question. The answer currently as I understand the project is - it depends. If you only want to show and edit data the library would be suitable for you and with some modifications (like virtualization/pagination of sorts) it can be made. If you need to use formulas I currently don't have a solution in mind and as this is 1 of the two primary use cases of the component the answer is not definitive YES. That being said, if it doesn't hurt performance (currently the spreadsheet can hold 10K+ cells without a lot of memory) I'm open for adding virtualization. Hope this helps!
Got it! Thanks for the quick response. Honestly, I do care about formulas, but I have been doing them on my backend, since the aggregations are over big data. What I have achieved so far with my custom implementation is:
- Backend and frontend have an open WS connection
- Frontend sends an update to the backend
- Frontend optimistically updates the sheet with with the raw text (the formula) and a style that signals "loading".
- Backend computes the formula and sends an event to the frontend
- Frontend updates it
Doing controlled edits with this can help me achieve exactly this with react-spreadsheet. My only hurdle is the infinity pagination and be able to clear data from the memory, because, while this library is pretty performant, I don't feel comfortable with keeping a million cells in memory for no reason.
Essentially, I only want to use this as a canvas for exploring the data on my backend.
One possible solution is to isolate the engine from the spreadsheet in a way that will enable it to put the engine in a remote server and let the communication be over the wire. I'm not sure how performant such a solution would be. For now I think this is a bit out of scope for this particular library but if it's a simple enough change I'm open for PRs.