SlideShare a Scribd company logo
1 of 64
Download to read offline
1
Oleksii Levzhynskyi
Tech Lead, Grammarly
The goal
● familiarize everyone with the system design interview
● share tips and intent of such an interview
● show that it’s not a rocket since ;)
3
2. What is a System design interview?
Agenda
4
1. What are the typical interview types?
3. Example
4. Summary & Tips
4
Chapter 1.
What are the typical interview
types?
5
We’re hiring, everyone is hiring…
● hire the right people for the right positions
● meet the candidate with the company during the
interview
● hire for the long term
6
● what kinds of interviews will there be?
● should I prepare anything for interviews?
Ask about interviews in advance?
7
Tech/Manager screen
Focus area (Front-End skills)
Computer science (coding)
System design for Front-End engineers
The typical interviews
Non-tech interviews
8
Chapter 2.
What is a System design
interview for Front-End
engineers?
9
10
●the architecture of the client
application
●stage management
●API (communication with back-end)
●error handling
●accessibility, performance, i18n
The difference with the system design interview for back-end
Front-end Back-End
- scalability (multi-reagan, db sharding)
- reliability
- API
- performance (the speed of the response/processing)
- processing cost
11
Black box
12
● Problem-solving
○to see the bigger picture and then dig into smaller pieces
○to ask the right questions
○to spot the corner-cases
● Autonomy
○Ability to drive a solution to completion
● Tech Knowledge
○the actual understanding of design patterns and principles
○the understanding of the sense of front-end
12
What to pay attention to
Chapter 3.
The typical task (On Twitter
example)
13
0. Initial intro and the question ~ 5 min
1. Requirements gathering ~ 5 min
2. The design phase ~ 25-30
3. The polishing phase, deep dive, etc ~ 20 min
The typical stages of a
System Design interview
14
Disclaimer
15
The proposed solution is biased and may not fit any other task. Use as a guideline is not the
only possible way of solving a System Design interview.
16
Open-ended task:
Make a design for
Twitter!
Requirements: what should the system do
17
●Should we think about authorization flows?
○No, assume it’s already implemented.
●What is the first thing that user will see?
○Feed with the latest tweets and form to create a new tweet
●What other functionality should be implemented?
○Use should be able to see replies for single tweet
Requirements: what should the system do
18
●Should we show tweet with a replies in a pop-up or separate page?
○It doesn’t matter. What do you think?
●What is the content of the tweet?
○Let’s keep it simple - only text
●Do we need any validation for tweets?
○max 280 symbols
●How much data should be shown to the user?
○50 tweets/replies per page
●Should we allow to load additional tweets/replies?
○50 per request
Requirements: data/performance contarains
19
●Do we need to update the feed in real time?
○Not, it’s ok to update data with some meaningful interval (10s or so)
●Should we implement client caching or “offline” mode?
○No, but implement the “draft” mode for tweet form
Requirements: data/performance contarains
20
Requirements: data/performance contarains
21
●Should we account for fault tolerance, a11y, i18n?
○Fault tolerance and a11y, but think about high-level architecture first
●Should I use any specific framework to build a client?
○Of your choice
Non-functional requirements:
●Use pagination/infinite scroll to speed up
the page load
●Data should be updated periodically
(every 10s), don’t need to update it in
real-time
●Think about fault tolerance
●The system should be accessible
Functional requirements:
●User should be able to see feed
●User should be able to add new tweet
●User should be able to see tweets and
replies on a separate page
●Pagination for tweets/replies
1. Requirements
22
23
1. High-level diagram
2. Data model
3. API
2. The design phase
24
Whiteboard is a key instrument
Very high-level diagram
Client API Layer Server
26
26
: Would you like me to start from a client?
Very high-level diagram
Client API Layer Server
27
27
Focus on the bigger picture first
Then dig into details!
28
View layer
29
View layer
“Controller”
30
Bias detected! Should I use “controller”?
31
The goal is to show that the view will not be mixed with business and application logic.
“Controller”
MV*
View layer
“Controller” Client State
32
View layer
“Controller” Client State
Server
33
View layer
“Controller”
Feed Single tweet
Client State
New tweet
Server
34
View layer
Feed “Controller”
Feed Single post
Client State
New tweet
Tweet “Controller”
Server
35
36
View layer
Feed “Controller”
Feed Single tweet
Client State
New tweet
Tweet “Controller”
Server
37
View layer
Feeds “Controller”
Feed Single post
Client State
New post
Tweet “Controller”
Server
Application “Controller”
38
View layer
Feeds “Controller”
Feed Single post
Client State
New post
Tweet “Controller”
Server
Application “Controller”
39
: Am I missing anything?
40
{
user: { id: string, username: string, avatarURL: string }
}
Data model
41
{
user: { id: string, username: string, avatarURL: string }
feed: {
items: Array<{ id: string, content: string, likes: number }>,
}
}
Data model: Feed pagination?
42
{
user: { id: string, username: string, avatarURL: string }
feed: {
items: Array<{ id: string, content: string, likes: number }>,
lastItemTimestampt: number
},
}
Data model: Feed pagination
43
Data model: New tweet + validation
44
{
user: { id: string, username: string, avatarURL: string }
feed: {
items: Array<{ id: string, content: string, likes: number }>,
lastItemTimestamp: number
},
tweet: { content: string, status: ‘draft’ | ‘posting’ | ‘validationError’ }
}
: Am I on the right track?
45
View layer
Feeds “Controller”
Feed Single post
Client State
New post
Tweet “Controller”
Server
Application “Controller”
46
{
user: User
feed: Feed
tweet: NewTweet
}
2. API
WS vs HTTP
47
2. API
Client Server
48
2. API
Client Server
←
Array<Tweet>
→ /feed; GET; { lastItemTimestamp?: number, count: number }
49
2. API
Client Server
← Array<Tweet>
→ /feed; GET; { lastItemTimestamp?: number, count: number }
← { id: number, content: string, repliesCount: number, replies: Array<Reply>
}
→ /tweet; GET; { id: number}
50
2. API
Client Server
← Array<Tweet>
→ /feed; GET; { lastItemTimestamp?: number, count: number }
← { id: number, content: string, repliesCount: number, replies: Array<Reply>
}
→ /tweet; GET; { id: number}
51
→ /replies; GET; { tweetId: number, lastItemTimestamp: number }
← Array<Replies>
2. API
Client Server
→ /tweet; POST; { content: string }
← Array<Tweet>
→ /feed; GET; { lastItemTimestamp?: number, count: number }
← { id: number, content: string, repliesCount: number, replies: Array<Reply>
}
→ /tweet; GET; { id: number}
← Tweet
52
→ /replies; GET; { tweetId: number, lastItemTimestamp: number }
← Array<Replies>
: Does it make sense?
53
2. Focus on the important areas of the product
1. Would you like me to focus on some specific
area?
3. Focus on your strengths
3. Deep dive
54
●Error page for cases when tweet cannot be found, 500 from server or
●Retries policies
●“Notification” to say that something goes wrong
Deep dive: Error handling
55
●Error page for cases when tweet cannot be found, 500 from server or
●Retries policies
●“Notification” to say that something goes wrong
●Service to observe the offline/online mode
Deep dive: Error handling
56
Feeds Controller Tweet Controller
Back end
Application controller
Connection Checker Middleware
Deep dive: a11y
57
What area of accessibility would we like to cover?
● Keyboard accessible:
○ Tab order
○ Semantic elements
● Visually accessible:
○ Contrast, accessible fonts, no color-coding, etc
○ proper aria-labels
● Advanced: Screen reader support
● Testing
○ Unit tests with lighthouse + axe tools for automation testing
○ Manual tests for a11y scenarios
● Company-level base component library with a11y
● Company-wide processes:
○ a11y training for the team members
○ a11y-related page
● ….
Deep dive: a11y
58
: would you like me to focus on
something else?
: we’re done. Thank you!
59
View layer
Feeds “Controller”
Feed Single post
Client State
New post
Tweet “Controller”
Back end
Application “Controller”
60
{
user: User
feed: Feed
tweet: NewTweet
}
Error Page
Summary & Tips
61
61
●Spend time on requirements gathering.
●You're driving an interview and explaining every step.
●Don't rush if you know the solution. Or better, always build from scratch.
●Continuously check the status with the interviewer and the requirements.
●Don't overcomplicate things. Start high-level and drill-down.
●Check the time. It's better to skip some unclear areas rather than spend the whole
interview solving them.
●If you're stuck, ask for a tip.
●Focus on your strengths.
Resources
●What are Functional and Non-Functional Requirements and How to Document These
●How to design a Facebook in 30-minutes or Acing System Design Interview
●Frontend system design interviews - the definitive guide
62
62
How to Build a Productive Team
Grammarly stands
with Ukraine.
We invite you to do the same.
Here are some ways you
can help:
Thank you
64

More Related Content

Similar to "Grokking System Design interview for Front-end engineer", Oleksii Levzhynskyi

"I didn't know Marketo could do that!" Do more with Custom Development
"I didn't know Marketo could do that!" Do more with Custom Development"I didn't know Marketo could do that!" Do more with Custom Development
"I didn't know Marketo could do that!" Do more with Custom DevelopmentDigital Pi - A Merkle Company
 
Tutorial: extending the zend server ui and web api
Tutorial: extending the zend server ui and web apiTutorial: extending the zend server ui and web api
Tutorial: extending the zend server ui and web apiYonni Mendes
 
MockServer-driven testing
MockServer-driven testingMockServer-driven testing
MockServer-driven testingTestableapple
 
The working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийThe working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийSigma Software
 
The working architecture of node js applications open tech week javascript ...
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...Viktor Turskyi
 
Denver MuleSoft Meetup: Approve this! (or reject this!) with MuleSoft and Slack
Denver MuleSoft Meetup: Approve this! (or reject this!) with MuleSoft and SlackDenver MuleSoft Meetup: Approve this! (or reject this!) with MuleSoft and Slack
Denver MuleSoft Meetup: Approve this! (or reject this!) with MuleSoft and SlackBig Compass
 
Debarrassez-vous de la dette technique dans votre organisation avec OrgCheck
Debarrassez-vous de la dette technique dans votre organisation avec OrgCheckDebarrassez-vous de la dette technique dans votre organisation avec OrgCheck
Debarrassez-vous de la dette technique dans votre organisation avec OrgCheckThierry TROUIN ☁
 
Jeremiah Yancy | Skills and techniques of the Systems Analyst
Jeremiah Yancy | Skills and techniques of the Systems AnalystJeremiah Yancy | Skills and techniques of the Systems Analyst
Jeremiah Yancy | Skills and techniques of the Systems AnalystJeremiah Yancy
 
Continuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentContinuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentDynatrace
 
On component interface
On component interfaceOn component interface
On component interfaceLaurence Chen
 
[Meetup] a successful migration from elastic search to clickhouse
[Meetup] a successful migration from elastic search to clickhouse[Meetup] a successful migration from elastic search to clickhouse
[Meetup] a successful migration from elastic search to clickhouseVianney FOUCAULT
 
CookpadTechConf2018-(Mobile)TestAutomation
CookpadTechConf2018-(Mobile)TestAutomationCookpadTechConf2018-(Mobile)TestAutomation
CookpadTechConf2018-(Mobile)TestAutomationKazuaki Matsuo
 
Slides for Automation Testing or End to End testing
Slides for Automation Testing or End to End testingSlides for Automation Testing or End to End testing
Slides for Automation Testing or End to End testingSwapnilNarayan
 
Web based online shopping system Presentation slide
Web based online shopping system Presentation  slideWeb based online shopping system Presentation  slide
Web based online shopping system Presentation slideRakibul Hasan Pranto
 
Understanding and Executing on API Developer Experience
Understanding and Executing on API Developer ExperienceUnderstanding and Executing on API Developer Experience
Understanding and Executing on API Developer ExperienceKeshav Vasudevan
 

Similar to "Grokking System Design interview for Front-end engineer", Oleksii Levzhynskyi (20)

"I didn't know Marketo could do that!" Do more with Custom Development
"I didn't know Marketo could do that!" Do more with Custom Development"I didn't know Marketo could do that!" Do more with Custom Development
"I didn't know Marketo could do that!" Do more with Custom Development
 
Tutorial: extending the zend server ui and web api
Tutorial: extending the zend server ui and web apiTutorial: extending the zend server ui and web api
Tutorial: extending the zend server ui and web api
 
Cavaros
CavarosCavaros
Cavaros
 
MockServer-driven testing
MockServer-driven testingMockServer-driven testing
MockServer-driven testing
 
The working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийThe working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор Турский
 
The working architecture of node js applications open tech week javascript ...
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...
 
Denver MuleSoft Meetup: Approve this! (or reject this!) with MuleSoft and Slack
Denver MuleSoft Meetup: Approve this! (or reject this!) with MuleSoft and SlackDenver MuleSoft Meetup: Approve this! (or reject this!) with MuleSoft and Slack
Denver MuleSoft Meetup: Approve this! (or reject this!) with MuleSoft and Slack
 
Debarrassez-vous de la dette technique dans votre organisation avec OrgCheck
Debarrassez-vous de la dette technique dans votre organisation avec OrgCheckDebarrassez-vous de la dette technique dans votre organisation avec OrgCheck
Debarrassez-vous de la dette technique dans votre organisation avec OrgCheck
 
Jeremiah Yancy | Skills and techniques of the Systems Analyst
Jeremiah Yancy | Skills and techniques of the Systems AnalystJeremiah Yancy | Skills and techniques of the Systems Analyst
Jeremiah Yancy | Skills and techniques of the Systems Analyst
 
Continuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile DevelopmentContinuous Performance Testing and Monitoring in Agile Development
Continuous Performance Testing and Monitoring in Agile Development
 
On component interface
On component interfaceOn component interface
On component interface
 
[Meetup] a successful migration from elastic search to clickhouse
[Meetup] a successful migration from elastic search to clickhouse[Meetup] a successful migration from elastic search to clickhouse
[Meetup] a successful migration from elastic search to clickhouse
 
CookpadTechConf2018-(Mobile)TestAutomation
CookpadTechConf2018-(Mobile)TestAutomationCookpadTechConf2018-(Mobile)TestAutomation
CookpadTechConf2018-(Mobile)TestAutomation
 
Asp.net Developers portfolio and case study NicheTech
Asp.net Developers portfolio and case study NicheTechAsp.net Developers portfolio and case study NicheTech
Asp.net Developers portfolio and case study NicheTech
 
JAX 08 - Agile RCP
JAX 08 - Agile RCPJAX 08 - Agile RCP
JAX 08 - Agile RCP
 
clicks2conversations.pdf
clicks2conversations.pdfclicks2conversations.pdf
clicks2conversations.pdf
 
Slides for Automation Testing or End to End testing
Slides for Automation Testing or End to End testingSlides for Automation Testing or End to End testing
Slides for Automation Testing or End to End testing
 
Sprint 66
Sprint 66Sprint 66
Sprint 66
 
Web based online shopping system Presentation slide
Web based online shopping system Presentation  slideWeb based online shopping system Presentation  slide
Web based online shopping system Presentation slide
 
Understanding and Executing on API Developer Experience
Understanding and Executing on API Developer ExperienceUnderstanding and Executing on API Developer Experience
Understanding and Executing on API Developer Experience
 

More from Fwdays

"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y..."How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...Fwdays
 
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil TopchiiFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro Spodarets"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro SpodaretsFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua", Maksym KindritskyiFwdays
 
"Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl..."Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl...Fwdays
 
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T..."How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...Fwdays
 
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ..."The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...Fwdays
 
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu..."[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...Fwdays
 
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care..."[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...Fwdays
 
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"..."4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...Fwdays
 
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast..."Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...Fwdays
 
"Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others..."Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others...Fwdays
 
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?", Oleksandra MyronovaFwdays
 
"Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv..."Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv...Fwdays
 
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin..."How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...Fwdays
 

More from Fwdays (20)

"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y..."How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
 
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro Spodarets"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro Spodarets
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
 
"Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl..."Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl...
 
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T..."How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
 
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ..."The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
 
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu..."[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
 
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care..."[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
 
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"..."4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
 
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast..."Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
 
"Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others..."Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others...
 
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
 
"Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv..."Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv...
 
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin..."How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
 

Recently uploaded

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

"Grokking System Design interview for Front-end engineer", Oleksii Levzhynskyi

  • 1. 1
  • 3. The goal ● familiarize everyone with the system design interview ● share tips and intent of such an interview ● show that it’s not a rocket since ;) 3
  • 4. 2. What is a System design interview? Agenda 4 1. What are the typical interview types? 3. Example 4. Summary & Tips 4
  • 5. Chapter 1. What are the typical interview types? 5
  • 6. We’re hiring, everyone is hiring… ● hire the right people for the right positions ● meet the candidate with the company during the interview ● hire for the long term 6
  • 7. ● what kinds of interviews will there be? ● should I prepare anything for interviews? Ask about interviews in advance? 7
  • 8. Tech/Manager screen Focus area (Front-End skills) Computer science (coding) System design for Front-End engineers The typical interviews Non-tech interviews 8
  • 9. Chapter 2. What is a System design interview for Front-End engineers? 9
  • 10. 10
  • 11. ●the architecture of the client application ●stage management ●API (communication with back-end) ●error handling ●accessibility, performance, i18n The difference with the system design interview for back-end Front-end Back-End - scalability (multi-reagan, db sharding) - reliability - API - performance (the speed of the response/processing) - processing cost 11 Black box
  • 12. 12 ● Problem-solving ○to see the bigger picture and then dig into smaller pieces ○to ask the right questions ○to spot the corner-cases ● Autonomy ○Ability to drive a solution to completion ● Tech Knowledge ○the actual understanding of design patterns and principles ○the understanding of the sense of front-end 12 What to pay attention to
  • 13. Chapter 3. The typical task (On Twitter example) 13
  • 14. 0. Initial intro and the question ~ 5 min 1. Requirements gathering ~ 5 min 2. The design phase ~ 25-30 3. The polishing phase, deep dive, etc ~ 20 min The typical stages of a System Design interview 14
  • 15. Disclaimer 15 The proposed solution is biased and may not fit any other task. Use as a guideline is not the only possible way of solving a System Design interview.
  • 16. 16 Open-ended task: Make a design for Twitter!
  • 17. Requirements: what should the system do 17 ●Should we think about authorization flows? ○No, assume it’s already implemented. ●What is the first thing that user will see? ○Feed with the latest tweets and form to create a new tweet ●What other functionality should be implemented? ○Use should be able to see replies for single tweet
  • 18. Requirements: what should the system do 18 ●Should we show tweet with a replies in a pop-up or separate page? ○It doesn’t matter. What do you think? ●What is the content of the tweet? ○Let’s keep it simple - only text ●Do we need any validation for tweets? ○max 280 symbols
  • 19. ●How much data should be shown to the user? ○50 tweets/replies per page ●Should we allow to load additional tweets/replies? ○50 per request Requirements: data/performance contarains 19
  • 20. ●Do we need to update the feed in real time? ○Not, it’s ok to update data with some meaningful interval (10s or so) ●Should we implement client caching or “offline” mode? ○No, but implement the “draft” mode for tweet form Requirements: data/performance contarains 20
  • 21. Requirements: data/performance contarains 21 ●Should we account for fault tolerance, a11y, i18n? ○Fault tolerance and a11y, but think about high-level architecture first ●Should I use any specific framework to build a client? ○Of your choice
  • 22. Non-functional requirements: ●Use pagination/infinite scroll to speed up the page load ●Data should be updated periodically (every 10s), don’t need to update it in real-time ●Think about fault tolerance ●The system should be accessible Functional requirements: ●User should be able to see feed ●User should be able to add new tweet ●User should be able to see tweets and replies on a separate page ●Pagination for tweets/replies 1. Requirements 22
  • 23. 23
  • 24. 1. High-level diagram 2. Data model 3. API 2. The design phase 24
  • 25. Whiteboard is a key instrument
  • 26. Very high-level diagram Client API Layer Server 26 26
  • 27. : Would you like me to start from a client? Very high-level diagram Client API Layer Server 27 27
  • 28. Focus on the bigger picture first Then dig into details! 28
  • 31. Bias detected! Should I use “controller”? 31 The goal is to show that the view will not be mixed with business and application logic. “Controller” MV*
  • 34. View layer “Controller” Feed Single tweet Client State New tweet Server 34
  • 35. View layer Feed “Controller” Feed Single post Client State New tweet Tweet “Controller” Server 35
  • 36. 36
  • 37. View layer Feed “Controller” Feed Single tweet Client State New tweet Tweet “Controller” Server 37
  • 38. View layer Feeds “Controller” Feed Single post Client State New post Tweet “Controller” Server Application “Controller” 38
  • 39. View layer Feeds “Controller” Feed Single post Client State New post Tweet “Controller” Server Application “Controller” 39
  • 40. : Am I missing anything? 40
  • 41. { user: { id: string, username: string, avatarURL: string } } Data model 41
  • 42. { user: { id: string, username: string, avatarURL: string } feed: { items: Array<{ id: string, content: string, likes: number }>, } } Data model: Feed pagination? 42
  • 43. { user: { id: string, username: string, avatarURL: string } feed: { items: Array<{ id: string, content: string, likes: number }>, lastItemTimestampt: number }, } Data model: Feed pagination 43
  • 44. Data model: New tweet + validation 44 { user: { id: string, username: string, avatarURL: string } feed: { items: Array<{ id: string, content: string, likes: number }>, lastItemTimestamp: number }, tweet: { content: string, status: ‘draft’ | ‘posting’ | ‘validationError’ } }
  • 45. : Am I on the right track? 45
  • 46. View layer Feeds “Controller” Feed Single post Client State New post Tweet “Controller” Server Application “Controller” 46 { user: User feed: Feed tweet: NewTweet }
  • 47. 2. API WS vs HTTP 47
  • 49. 2. API Client Server ← Array<Tweet> → /feed; GET; { lastItemTimestamp?: number, count: number } 49
  • 50. 2. API Client Server ← Array<Tweet> → /feed; GET; { lastItemTimestamp?: number, count: number } ← { id: number, content: string, repliesCount: number, replies: Array<Reply> } → /tweet; GET; { id: number} 50
  • 51. 2. API Client Server ← Array<Tweet> → /feed; GET; { lastItemTimestamp?: number, count: number } ← { id: number, content: string, repliesCount: number, replies: Array<Reply> } → /tweet; GET; { id: number} 51 → /replies; GET; { tweetId: number, lastItemTimestamp: number } ← Array<Replies>
  • 52. 2. API Client Server → /tweet; POST; { content: string } ← Array<Tweet> → /feed; GET; { lastItemTimestamp?: number, count: number } ← { id: number, content: string, repliesCount: number, replies: Array<Reply> } → /tweet; GET; { id: number} ← Tweet 52 → /replies; GET; { tweetId: number, lastItemTimestamp: number } ← Array<Replies>
  • 53. : Does it make sense? 53
  • 54. 2. Focus on the important areas of the product 1. Would you like me to focus on some specific area? 3. Focus on your strengths 3. Deep dive 54
  • 55. ●Error page for cases when tweet cannot be found, 500 from server or ●Retries policies ●“Notification” to say that something goes wrong Deep dive: Error handling 55
  • 56. ●Error page for cases when tweet cannot be found, 500 from server or ●Retries policies ●“Notification” to say that something goes wrong ●Service to observe the offline/online mode Deep dive: Error handling 56 Feeds Controller Tweet Controller Back end Application controller Connection Checker Middleware
  • 57. Deep dive: a11y 57 What area of accessibility would we like to cover?
  • 58. ● Keyboard accessible: ○ Tab order ○ Semantic elements ● Visually accessible: ○ Contrast, accessible fonts, no color-coding, etc ○ proper aria-labels ● Advanced: Screen reader support ● Testing ○ Unit tests with lighthouse + axe tools for automation testing ○ Manual tests for a11y scenarios ● Company-level base component library with a11y ● Company-wide processes: ○ a11y training for the team members ○ a11y-related page ● …. Deep dive: a11y 58
  • 59. : would you like me to focus on something else? : we’re done. Thank you! 59
  • 60. View layer Feeds “Controller” Feed Single post Client State New post Tweet “Controller” Back end Application “Controller” 60 { user: User feed: Feed tweet: NewTweet } Error Page
  • 61. Summary & Tips 61 61 ●Spend time on requirements gathering. ●You're driving an interview and explaining every step. ●Don't rush if you know the solution. Or better, always build from scratch. ●Continuously check the status with the interviewer and the requirements. ●Don't overcomplicate things. Start high-level and drill-down. ●Check the time. It's better to skip some unclear areas rather than spend the whole interview solving them. ●If you're stuck, ask for a tip. ●Focus on your strengths.
  • 62. Resources ●What are Functional and Non-Functional Requirements and How to Document These ●How to design a Facebook in 30-minutes or Acing System Design Interview ●Frontend system design interviews - the definitive guide 62 62
  • 63. How to Build a Productive Team Grammarly stands with Ukraine. We invite you to do the same. Here are some ways you can help: