My takes from System Design Interview by Alex Xu

System Design Interview by Alex Xu

Since 2015, I am attending interviews as an interviewer for recruiting new talents, for the selection of new partner companies etc. And since 2019 I am conducting interviews for my current company. The topics I interview for are usually General Tech and Culture Fit. I enjoy also system design and thought I can also help our company by taking over a few System Design Interviews hence I started to prepare myself for the next step. I saw “System Desing Interview: An Insider’s Guide” by Alex Xu is suggested for interviewees to prepare for upcoming challenges so I thought I should give it a shot to sharpen my skills and understanding of the system design domain.

The book starts with the basics like designing for scaling, back of the envelope calculations then suggests a framework for system design and provides 12 different system design examples. I took some notes and also recorded some resources to read further.

Let’s look into the suggested framework for system design. It’s a four-step framework and actually, I found it quite useful to have such a structure.

  1. Understand the problem and establish design scope
  2. Propose a high-level design and get buy-in
  3. Design deep dive
  4. Wrap-up

Time allocation suggested by the author per step is

  1. 3 – 10 minutes
  2. 10 – 15 minutes
  3. 10 – 25 minutes
  4. 3 – 5 minutes

This time allocation would allow a candidate to complete a design in around 50 minutes and would provide some additional time for Q&A in a 60 minutes interview. From my perspective suggested framework and time allocations would work in an interview setup.

Let me summarize each step with one paragraph, then I can provide my thoughts, notes and feedback about the book.

Understand the problem and establish design scope

Nobody would expect you to design the new Facebook or Netflix in the short time of an interview. So asking clarifying questions, setting up the boundaries of design and noting down the assumptions are the way to start the design. All those steps should be discussed with the interviewer, get their ideas about the important parts of the system to design and get their approval on the assumptions.

Propose a high-level design and get buy-in

This is the step where the interviewee should lay the foundations of the system and provide a blueprint with the collaboration of the interviewer. Doing some back of the envelope calculations and depending on those calculations system size and components should appear on the design. This step should not include details like data format yet but should have a storage layer for example.

Design deep dive

This is the time to think about handling the load, choosing the correct data store, scaling the API servers etc. Depending on the discussion with the interviewer, you should focus on a few key areas and deliver a detailed design and even a few implementation details if required.

Wrap up

In this last step, you should go the extra mile and tell about the flaws in your design and how it may be improved, what can be expected to change in the business in the future and how the design can evolve to cope with those changes.

My notes and thoughts about the book

  • There are some mistakes or not so best-practices in the book e.g.
    • Author claims NoSQL should be chosen to store massive amount of data, this is open for discussion. A technology selection should not be justified only by data size but also use cases and requirements.
    • In one of the API design sections, author does not follow the REST best practices and uses verb in the URL
    • Author claims a scale-up would not help with the load, in my experience it helps.
  • Back of the envelope numbers are great shortcuts during the design time.
  • There is an unfortunate use of magic number in the book while calculating peak system load. There is no explanation of why we use this factor to multiply our assumption.
  • 12 different system design examples backed by real life resources are really handy and informative.
  • There are some missing information, for example author says “token bucket is memory efficient” but does not explain why and how. Or while discussing quorum of a distributed system author overlooks possibility of a Byzantine Fault.
  • Reference materials are useful, almost every section I noted down some of the reference materials to read further.
  • In some designs there are security flaws which may cause data leak, which have been overseen. Though this can be defended as security is not in the scope and time is short. Still I believe security should start in the design phase.
  • Also in some designs sections, author does not follow the framework they suggested.

All in all, I got some fresh ideas and a good framework for system design interviews from the book. I would consider recommending this book to mid-level engineers who are looking for different aspects of system design and would use a few real-life examples. For me, a 10+ year engineer, the advantages of reading this book was limited.

Thanks to Alex Xu for putting all the effort and collecting those examples in a well-structured format. And thank you for reading this blog post, feel free to comment or share this post if you find it useful.

Coming Back…

It has been more than 5 years since my last blog post in here.

A few years ago I moved my writing habits into another website, which was medium.com. Now I decided to come back to my own web site to post my thoughts.

I can not promise about the intervals for new posts, it can be bi-weekly or monthly. But it will be about my personal career growth including but not limited to technical thoughts and demos, learnings about management, book reviews and maybe some whisky tasting notes. (People need their hobbies ☺)

Let’s start slow today and close this “Welcome back home” post. See you in the future posts and feel free to comment and share.

Featured Image Photo by Danielle MacInnes on Unsplash

Monthly Challenges : June ’15 Weight Loss and Standing Desk

Hello all,

I had two challenges for June and luckily I completed both of them.

1. Lose 3 kg.s in a month.

This one was easy, I will not get into details. I was 87.6 kg.s, I cut off eating junk food, I began to count my steps and put a target of 10.000 steps daily. And at the end I was 83.8 kg.s. I’ve reached and passed my target.

2. Work on Standing Desk

This was the real challenge. Actually,  when I am working at home, I am already using my DIY standing desk,  but I am working at most two hours at home. So it is not challenging.

Standing desk in the office has at least two challenges. Which are a) convincing manager and colleagues, b) really standing for 8 hours straight.

For the first part, luckily we were moving to a new office, I had the most isolated part for myself. So I will not get too much attention 🙂 And my manager is an open-minded man, he is also very friendly (once we were colleagues). Convincing manager was not that hard. It took more time for my colleagues to get used to me 🙂

Second part was hard sometimes. When you google ‘standing desk’ and read some blog posts about them. You will see some tips, which come true when I experience it. First of all just standing and working like that is not possible. I often transfer my weight from one leg to another, take some small walks in office, have some small sitting pauses when I am taking notes or a friend ask for some help.

Shoes are really important when you stand all day long. Hard soled shoes will make your day a nightmare, some people use yoga mats to soften the floor. I choose more soft soled shoes. This way my feet don’t cry for help.

I also built my standing desk in office, so it is a DIY standing desk like the one at home. This have some pros, like I have two spare shelves to put my notebooks, pens etc.

My DIY Standing Desk
My DIY Standing Desk

Now, I am happy with the result.

Have a look at also my post on LinkedIn about standing desk : https://www.linkedin.com/today/author/130746977
Leave comments, keep in touch.

New Series : Monthly Challenges

Hello all,

I am going to kick off new blog post series. By this way, I believe I will also keep the blog updated. The series are about Monthly Challenges, I’ve already completed my first challenge and its post is coming today.

I will not reveal monthly challenges until the month ends. Every challenge will start on first monday of the month and will end on last day of the month. So I may have a few days between two challenges to rest. 🙂

I got the idea from this blog post (Turkish), and he wrote that he was inspired by Matt Cutts.

Challenge posts list (will be updated every month) :

June ’15 Challenge : http://www.canburaktumer.com/blog/monthly-challenges-june-15-weight-loss-and-standing-desk/
July ’15 Challenge : http://www.canburaktumer.com/blog/monthly-challenges-july-15/

Android : MAKEIT Rehber Project

Hello,

Last night I developed a new Android application for inhouse use of my company. Since we are a small company which aims to get bigger, our population keeps growing. This brings some problems with it. For example, some older employees don’t know about newcomers and their contact information.

One day I needed to call a new employee and I realised I don’t have her contact information. And before that point I was not aware of situation. Then I decided to make a phonebook that reads information from a shared file on internet, which our HR will update when somebody joins or leaves the company. So every employee would have every other’s contact information.

This is how MAKEIT Rehber was born. – Rehber means phonebook in Turkish. – Yesterday night I developed the first version of application, where the contact info was hardcoded, then added reading a remote file, then I added sending SMS or Whatsapp messages directly and lastly I added my own open source library : tellal to send notifications through MAKEIT Rehber. This notifications can be just new version notifications or something about company.

There is still some development to do. But it has more than enough abilities now.

Below you can find a screenshot.

MAKEIT Rehber
MAKEIT Rehber

 

Thanks for reading, please do not hesitate to ask your questions or comment on my posts in the comment area you can find below.

Have a nice day.

ODI 12c: TROUG BI/DW SIG 2014

Hello all,

On 3rd April 2014 TROUG is organizing BI/DW SIG Day at İTÜ Arı3 Teknokent. You can have detailed information on : http://www.troug.org/?p=684 and you can register for the event on eventbrite : https://www.eventbrite.com/e/troug-bidw-sig-meeting-tickets-10986690487

I willl be there as a speaker, my session will be about Requirements, Installation and New Features of ODI 12c, hope to see you there.

My presentation will be up in this post on 3rd evening. 
You can reach presentation by this link.

Mark your calendars, register for event and have a nice day.

Android : Tellal Project

So finally I finished a usable open source library project. I can say a milestone achieved. This was one of my dreams to contribute to open source world, tonight I completed Tellal Libary.

But what is it?
– It is a library for Android to show in-app messages to users.

Why do I need that?
– I needed this spec. when I did not able to update one of my apps, and put new version as a new app. And I was not able to tell my users this change. Then I decided to build a notification library to import in all my mobile apps.

How do it work?
– Pretty simple. While coding you hardcode a URL into TellalConfig class. It checks this URL to find notification file which has information formatted as JSON and is a simple text file. Then shows it on screen. In notification file you need to specify a title, a message and a button text.

Where can I get it?
– It is on github. Try this link to reach codes and library jar file. https://github.com/Canburakt/tellal

How can I use it?
– Just add the jar file to your project, set TellalConfig.sourceURL and execute Tellal object. You can find an example project on github.

It is not complete yet, but it is working. I will work on it, develop it. New versions will come as tellal_vYYYYMMDD.jar so you can always have final and previous version on github. There was a mistake I had in my demo project while I am working on it. Java couldn’t find class definitions, I solved it by editing Project->Properties->Java Bıild Path->Order and Export you can see its state below :

Project Properies
Project Properies

 

I also put a screenshot of my demo project so you can see the result :

Screenshot
Screenshot

Pleas do not hesitate to ask your questions on comment section below, and to contribute this project on github.

Thanks for reading.

 

After a series of workshops

Introduction to SQL Session
Introduction to SQL Session

We had a series of workshops in Istanbul Hackerspace about SQL and PL/SQL. Sessions are held by me, and there were three sessions, each focuses on another topic.

 

 

Our road map was:

  •  Introduction to SQL
  •  Introduction to PL/SQL
  •  Introduction to PL/SQL tuning & Oracle catalog tables.

You can find the material I’ve prepared for these workshops on http://www.canburaktumer.com/istanbulhs For me, these session were useful and succesful. I did not break the Istanbul Hackerspace tradition and had a decreasing number of participants. First day we had six participants, second day we had three participants and finally last day it was only me.

By the way, I also would like to introduce about hackerspace concept and Istanbul HS. Hackerspaces are world wide “free project ateliers”. They are basically producing projects with electronics and software. You can see a full list of hackerspaces on hackerspaces.org There are two hackerspaces in Istanbul, one in Anatolian side and one in European side. I am a volunteer in the Anatolian side, we are running an Android application project now, and we are having workshops. You can find more info on istanbulhs.org in Turkish.

That’s all for today, keep following because ODI posts will continue to come.