Skip to content

recommendations for server-side data #398

Description

@wawhal

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.

Activity

  1. iddan commented on Jun 29, 2024

    @iddan
    Owner

    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!

  2. wawhal commented on Jun 29, 2024

    @wawhal
    Author

    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:

    1. Backend and frontend have an open WS connection
    2. Frontend sends an update to the backend
    3. Frontend optimistically updates the sheet with with the raw text (the formula) and a style that signals "loading".
    4. Backend computes the formula and sends an event to the frontend
    5. 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.

  3. iddan commented on Jul 7, 2024

    @iddan
    Owner

    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.

  4. Repository owner locked and limited conversation to collaborators on Jul 7, 2024
  5. converted this issue into a discussion #402 on Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions