by gamegoblin · 2y ago · 0 comments
Working on this spreadsheet engine has been one of the most exciting, complex, and stimulating engineering experiences of my career.
Feel free to ask any technical questions about the product. We're really proud of what we've build and what's on the roadmap!
Tech stack:
Everything runs on AWS
Frontend: TypeScript + some Rust compiled to WASM, our own virtualized custom canvas magic
Backend: Rust, Apache Arrow
The biggest tech challenges... where to start.
1. As with any editor application, Undo/Redo is devilishly hard
2. A spreadsheet is modeled as a Directed Acyclic Graph where cells depend on other cells down to some root cells. There are a TON of fascinating graph theory algorithms you can bring to bear here. Some of the hardest problems I have ever worked on. My whiteboard looks like an insane person's with crazy arrows between cells and stuff.
3. Sometimes there really is no magic bullet and you just have to run benchmark, get flamegraph, chip away 3%, repeat, do that 100 times and you are very fast. Gotta grind.
What made you choose this tech stack? I'm especially wondering about Rust, was that something you had familiarity with before so just went with that? Did you evaluate a few different options and decided that would best fit this use-case?
(I have very minimal familiarity with Rust, I'm just wondering here.)
I interviewed at a spreadsheet company (for a frontend role) and they asked, "how would you go about determining what cells need a border when a user clicks an individual cell, clicks a cell and selects multiple cells, clicks a cell next to an already selected cell." Fascinating problem and we talked about solutions for a little bit.
Noticed that you can't unselect a cell once it's selected? I'm on a Mac with Chrome (latest, no updates available).
Repo steps: 1. Select a few cells (⌘ + click) or an individual cell 2. Try unselecting (⌘ + click) those same cells clicked in #1 3. Cell is not unselected
Great interview question. Tons of nuance to drawing borders on adjacent cells, how to handle varying thickness, etc. Once you start looking closely, you notice the pixel differences between how this gets handled by various spreadsheeting tools.
Thanks for the report! This one's already on my list actually (selection negation & unique selection deduping) -- look for a fix soon.
For storage and orchestration we use S3 and Dynamo.
Yes exactly, we use CRDTs for multiplayer stuff.