Check out the JS library at — https://www.npmjs.com/package/quick_tree
Quick Tree is a JS library that can help you build an M-ary Tree and perform operations on it.
While working on an optimization effort for a legacy project, I struggled to find a JS library which was general and fast enough that could model a tree, so I wrote this small library as part of those enhancements.
Using this library, you can model a file system, traced hierarchical tasks, and all the binary tree applications.
Do note that the tree can be highly unbalanced, and we don’t want to change its structure because of hierarchical relations between the nodes. …
You should start Reading and Connect the dots
A few months back I came across a video where Bill Gates talked about how the next big threat humanity faces, will be an epidemic — a disease rather than a nuclear war.
Fast forward by 5 years — we face Covid-19.
How could he have known about this?
The fact that they know, makes them a visionary. Their vision not only helps them infer about political, healthcare, or the next challenge humanity will face, but also helped them in making their extraordinary careers and leave a mark on the history. …
Problem — We want to visualize a directory structure of a remote storage(Blob Storage S3) and provide a search feature too.
In an S3 bucket we store files under a unique ID of a cluster. Each cluster folder can have the same set of files with different content and users generally know the cluster whose files they want to view. (The files can be services logs, configurations, etc.)
So the structure of the bucket is represented as -
tbucket_name / cluster_id / files-*
Hence, here is what the data in the system for a cluster looks like
We started by designing the pipeline by assuming 5k~10k nodes (files) in the system. …