Is LiveView a good fit for a family-tree type of an application?

Hi,

I’m evaluating whether or not Phoenix LiveView will be a good type of technology to render a family tree? The problem is that the positions of the nodes in the family tree are dependent upon the positions of other nodes. The position of nodes will often have to shift frequently in order to produce the final result.

For a simple tree like this:

GrandparentAA, GrandparentAB      GrandparentBA, GrandparentBB
           ParentA                           ParentB
                             Child

ParentA is placed in between of GrandparentAA and GrandparentAB. Then the same process is repeated for ParentB. Then the Child node is placed in-between ParentA and ParentB (by moving the whole ParentB subtree to the right). The more nodes are present, the higher is the need to shift the positions of the nodes on the right to the right. The shift itself is a cheap operation (a simple addition), but because of the recursive nature, the number of additions may add up…

This might become resource-intensive when tens of thousands of nodes are present within a tree.

Since with Phoenix LiveView the calculations are done on the server, I was wondering if using something like React to perform the calculations on the client would be a better choice (in terms of scaling, to offset the calculations to the client)? The application should scale to tens of thousands of concurrent users.

Thanks!

1 Like

You can look at how live dashboard renders the supervision tree of applications.

4 Likes