Ethan's Blog


  • Home

  • Archives

  • Tags

  • Search

Designing Facebook Messenger

Posted on 2021-02-14

What is Facebook Messenger?

Facebook Messenger is a software application which provides text-based instant messaging services to its users. Messenger users can chat with their Facebook friends both from cell-phones and Facebook’s website.

Requirements and Goals of the System

Our Messenger should meet the following requirements:
Functional Requirements:

  1. Messenger should support one-on-one conversations between users;
  2. Messenger should keep track of the online/offline statuses of its users;
  3. Messenger should support the persistent storage of chat history;

Non-Functional Requirements:

  1. Users should have real-time chat experience with minimum latency;
  2. Our system should be highly consistent; users should be able to see the same chat history on all their devices;
  3. Messenger’s high availability is desirable; we can tolerate lower availability in the interest of consistency;

Extended Requirements:

  1. Group Chats: Messenger should support multiple people talking to each other in a group;
  2. Push notifications: Messenger should be able to notify users of new messages when they are offline;
Read more »

Designing Dropbox

Posted on 2021-02-14

Why Cloud Storage?

Cloud file storage services have become very popular recently as they simplify the storage and exchange of digital resources among multiple devices. The shift from using single personal computers to using multiple devices with different platforms and operating systems such as smartphones and tablets each with portable access from various geographical locations at any time, is believed to be accountable for the huge popularity of cloud storage services. Following are some of the top benefits of such services:

  • Availability: The motto of cloud storage services is to have data availability anywhere, anytime. Users can access their files/photos from any device whenever and wherever they like;
  • Reliability and Durability: Another benefit of cloud storage is that it offers 100% reliability and durability of data. Cloud storage ensures that users will never lose their data by keeping multiple copies of the data stored on different geographically located servers;
  • Scalability: Users will never have to worry about getting out of storage space. With cloud storage you have unlimited storage as long as you are ready to pay for it;

If you haven’t used dropbox.com before, we would highly recommend creating an account there and uploading/editing a file and also going through the different options their service offers. This will help you a lot in understanding this chapter.

Read more »

Designing Instagram

Posted on 2021-02-13

What is Instagram?

Instagram is a social networking service that enables its users to upload and share their photos and videos with other users. Instagram users can choose to share information either publicly or privately. Anything shared publicly can be seen by any other user, whereas privately shared content can only be accessed by the specified set of people. Instagram also enables its users to share through many other social networking platforms, such as Facebook, Twitter, Flickr, and Tumblr.

We plan to design a simpler version of Instagram for this design problem, where a user can share photos and follow other users. The “News Feed” for each user will consist of top photos of all the people the user follows.

Requirements and Goals of the System

We’ll focus on the following set of requirements while designing Instagram:
Functional Requirements:

  1. Users should be able to upload/download/view photos;
  2. Users can perform searches based on photo/video titles;
  3. Users can follow other users;
  4. The system should generate and display a user’s News Feed consisting of top photos from all the people the user follows;

Non-Functional Requirements:

  1. Our service needs to be highly available;
  2. The acceptable latency of the system is 200ms for News Feed generation;
  3. Consistency can take a hit (in the interest of availability) if a user doesn’t see a photo for a while; it should be fine;
  4. The system should be highly reliable; any uploaded photo or video should never be lost;

Not in Scope: Adding tags to photos, searching photos on tags, commenting on photos, tagging users to photos, who to follow, etc.

Read more »

Designing Pastebin

Posted on 2021-02-12

What is Pastebin?

Pastebin like services enable users to store plain text or images over the network (typically the Internet) and generate unique URLs to access the uploaded data. Such services are also used to share data over the network quickly, as users would just need to pass the URL to let other users see it.

If you haven’t used pastebin.com before, please try creating a new “Paste” there and spend some time going through the different options their service offers. This will help you a lot in understanding this chapter.

Requirements and Goals of the System

Our Pastebin service should meet the following requirements:
Functional Requirements:

  1. Users should be able to upload or “paste” their data and get a unique URL to access it;
  2. Users will only be able to upload text;
  3. Data and links will expire after a specific time span automatically; users should also be able to specify expiration time;
  4. Users should optionally be able to pick a custom alias for their paste;

Non-Functional Requirements:

  1. The system should be highly reliable, any data uploaded should not be lost;
  2. The system should be highly available. This is required because if our service is down, users will not be able to access their pastes;
  3. Users should be able to access their pastes in real-time with minimum latency;
  4. Paste links should not be guessable (not predictable);

Extended Requirements:

  1. Analytics, e.g., how many times a paste was accessed?
  2. Our service should also be accessible through REST APIs by other services;
Read more »

Designing TinyURL

Posted on 2021-02-08

Why do We Need URL Shortening?

URL shortening is used to create shorter aliases for long URLs. We call these shortened aliases “short links”. Users are redirected to the original URL when they hit these short links. Short links save a lot of space when displayed, printed, messaged, or tweeted. Additionally, users are less likely to mistype shorter URLs.

For example, if we shorten this page through TinyURL:

https://www.educative.io/collection/page/5668639101419520/5649050225344512/5668600916475904/

We would get:

http://tinyurl.com/jlg8zpc

The shortened URL is nearly one-third the size of the actual URL.
URL shortening is used to optimize links across devices, track individual links to analyze audience, measure ad campaigns’ performance, or hide affiliated original URLs.

If you haven’t used tinyurl.com before, please try creating a new shortened URL and spend some time going through the various options their service offers. This will help you a lot in understanding this chapter.

Read more »
1…181920…55
necusjz

necusjz

271 posts
16 tags
© 2016 - 2026 necusjz
Powered by Hexo
Theme - NexT.Mist