Android System Design Interviews
- Authors
- Name
- Amit Shekhar
- Published on
Today, we are going to discuss everything about the Android System Design Interviews.
Nowadays, it has become common that there will be 1 round of Android System Design Interviews when you go for a product-based company interview process. So, it is important to perform well in this round to get the offer.
Let's first understand what is Android System Design.
Android System Design is the process of defining the client components, API requirements, database tables, etc for a system to satisfy the specified functional and non-functional requirements.
There are two categories in the Android System Design Interview:
- Application: WhatsApp, Instagram, etc
- Library: Image Loading, Networking, File Downloader, etc.
In the Android System Design Interview, they ask you to design an application or a library, examples are:
- Design Image Loading Library
- Design File Downloader Library
- Design Instagram Stories
- Design Networking Library
- Design Analytics Library
- Design Caching Library
- Design Location Sharing App
- Design WhatsApp
- Design Spotify
- Design Uber App
- Design Video Calling App
I teach these system designs at Outcome School.
Now, let's understand the flow of the interview.
- Always ask clarification questions: To understand the problem and the requirement very clearly.
- Talk and sketch High-level Design.
- Connect the components with each other.
- Discuss the component in detail for which it is required based on the situation during the interview. Do not try to describe each component in detail unnecessarily because you can cover all of them in 45 minutes.
What is expected from you as an Android Developer: Client Side + API requirements
If you want to perform well during this interview round, you should follow the steps:
- Scope of the requirements
- Client components
- API requirements
- Detailing of the client components
For example, If they ask you to design WhatsApp, you should start with the scope of the requirements as that is the first thing in the steps mentioned above.
Scope of the requirements
In the scope of the requirements, we have 3 things:
- Functional
- Non-Functional
- Out of the Scope
Functional:
- Logged-in users should be able to chat using text messages
- Acknowledgment
- Online Status
Non-Functional:
- Secure Messaging
- Should work offline
- Should get notified of new messages even when the app is killed
Out of the Scope:
- Group Chat
- Video and Audio call
- File sharing
After the scope of the requirements, the next step is defining the Client components.
Client components
Based on the above requirements, we will need the following components:
- Login - OTP Verification
- Contacts
- Chat 1:1
- Chat Service
- Message Database
- Acknowledgment
- Online Status
- Notification System
- Profile
The next step is to mention the API requirements.
API requirements
In this step during the Android System Design Interviews, we need to list all the APIs required to build the system and specify which protocol (HTTP, WebSocket, etc.) will be used for each API.
HTTP will be needed for the following:
- OTP
- Contacts
- Profile
WebSocket will be needed for the following:
- Message
- Acknowledgment
- Online Status
Here if asked, you will have to write down the request data and the response data for the APIs.
The next step is Detailing of the client components.
Detailing of the client components
In this step during the Android System Design Interviews, you will need to dive deeper into some of the important components.
For example:
- Chat 1:1: You will need to explain the architecture, how this flow will work, and how you are going to design the Message database schema.
- Acknowledgment: How are you going to implement single tick, double tick, and blue tick?
- Online Status: How are you going to implement this? How will you determine if the app is in the background or foreground?
There may be further questions like:
- Can FCM be used for 1:1 chat? If yes, why do companies do not use it? If no, why not?
- What happens if User 1 sends a message to User 2, but User 2 is not connected to the server via WebSocket?
- What change will you make in the database schema if we have a group chat in addition to the 1:1 chat?
The discussion should reflect the following:
- Your knowledge of the product.
- You can think of the end-to-end system by defining all the components and how they will interact with each other.
- You know the major component required to build this system.
- You know about the architectures used in mobile apps and separate UI and business logic.
- You know about security and error handling.
- You know what should be done on the client and what on the server side.
What You Should Avoid:
- Do not jump straight to implementation.
- Don't be rigid about any framework.
This was all about the Android System Design Interviews.
That's it for now.
Join Outcome School and become better at Android System Design.
Thanks
Amit Shekhar
Co-Founder @ Outcome School
You can connect with me on:
Follow Outcome School on: