DEV Community


Posted on • Updated on

Where to Start on System Design Questions

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)

Discussion (3)

shiftyp profile image
Ryan Lynch (he/him) • Edited on

I think all the ideas you bring up re: "How to Build Slack" are good, the real world Slack has all sorts of features you could opine on like platforms and presence. In an interview though I would focus my thinking to "How to Build the Slack MVP" and really dig into what I could describe in a sort of complete way to deliver the core value proposition. Maybe spend some time at the outset nailing down what features are in that scope with the interviewers. As developers we can build almost anything we can imagine with time, and it shows experience I think to scope that imagination to some real world goals and constraints.

nhidtran profile image
nhidtran Author

that helps a lot! You’re definitely right that in terms of interviewing or just brainstorming on your personal time maybe just focusing and going in depth in particular feature is a good idea

shiftyp profile image
Ryan Lynch (he/him)

If you really go in depth, you could fill a whole interview talking about one feature and still impress people. I think the key to that though is deciding that scope with the interviewers through a dialog, and that dialog is its own skill too and shows your interpersonal and planning abilities. Definitely take the time to ask a couple of questions to narrow down what the need is before putting a marker to the whiteboard. Tell your friend best of luck!