A friend of mine is starting interviewing and has built massive applications and complex systems. The idea of interviewing can be quite overwhelming and something that someone does on a daily basis is going to feel a 1000x more stressful, if you're interviewing or being judged in front of a white board. So if you were given a design problem and you had no idea how to start, how would you anchor yourself? What questions would you start off with. For me, I would ask for clarification on what it does or writing down business reqs --> database --> deciding on an api (rest or graph) --> edge cases to solve for the business requirements. I haven't done many system design questions but food for thought more so for me.
- How do you start a system design problem (example: How would you build spotify/ Design a system for a plane and the air controller communicate)
- How in depth should you go
My initial thoughts if I had to answer this in the interview
- What does slack do? - chat app for teams How does the data seemed to be organized? - a user is a part of a slack/team org. That org can have many users. The org can have public and private channels. Users can having private conversations. --> you'll probably want to have the data in mysql clusters since the channels/users are very relational. (Begin drawing the schema on the whiteboard) --> some document based store/db to store all of the messages in JSON format (Begin writing what the schema would look like)
- Random things - you'll need to figure out sockets since you can see what members are active/inactive. And then see "Allison is typing...."
- Slack also allows video and call chatting [... no idea how to implement :rip ]
- It'll probably be a react web app first. Since slack started there. Maybe have an electron and react-native mobile version after
- Why I would need and where to use caching? - in the Search mechanism
Given the above if you were given "Design Slack" design question, what cases would you consider? Would you go about "This is how I would design the front-end", "This is how I would design the back-end/API", "This is how websockets are used". And what edge cases am I missing from my initial initial thoughts. How far do you get into the architecture. Tips?? This is for curiosity sake and to improve thinking about design. Am I totally off based in my initial thoughts.....
(will follow-up with a post of actually designing it or attempting to)