Facebook Interview Question for Software Engineer / Developers


Country: United States
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
4
of 4 vote

There are multiple steps in designing this. format for storing user info is the last thing. First we need to think about data storage. Think about Availability, concsistency, replication, tolerance. For gmail like system, it should be strongly consistent. It should be available and hence it needs to be replicated both within the datacenter as well as across datacenter. BigTable/HBASE like system will work for this. Next level is to support a webservice which can interact with webclient as well as mobile client. This should support any mail format like IMAP/POp3. A load balancer need to be installed at the front to receive connections. when a user sends a mail, the webservice needs to call the appropriate storage service to store the mail contents to the sent users. It needs to call the notification service to notify the users. This requires that the webclient keep a persistent TCP connection. The server will push the notification on this connection. For mobile clients the notification service should push the message to mobile push service. This mobile push service needs to handle the case of pushing the notification through carrier. This is the basics. Then we can talk about more features like seraching the older mails, filters, settings etc.

- Anonymous January 26, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

ALGO
-------------
User table
=========
1. Each user has a unique ID which. (we have to generate a random ID)
2. Once user logs in that ID associates with user all time

Message Table
=============
1. Each message has a unique ID (we have to generate random no + UserID from User table)

- Indranil Roy October 29, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

yes i think too

- nosay December 22, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

NO!

- Anonymous December 22, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

that no?

- nosay December 22, 2012 | Flag


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More