Giter Club home page Giter Club logo

interview-cake's Introduction

Design a URL shortener

Step 1 is to scope the project

Since it's an API, do we need authentication or user accounts or developer keys?

no let's leave it open to start

If people can't delete links...do they persist forever? Or do we automatically remove old ones? First, it's worth considering what policies we could use for removing old ones:

1.We could remove links that were created some length of time ago...like 6 months.
2.we could remove links that haven't been visited in some length of time...like 6 months.

Should we let people choose their shortlink,or just always auto-generate it?

For example, say they want ca.ke/parkers-resume. Let's definitely support that

Do we need analytics, so people can see how many people are click on a link, etc?

Good idea, let's leave it out to start.

It's okay if your list of features was different from ours. Let's proceed with these requirements so we're working on the same problem.

Step 2 is to talk about the design goals

If we're designing something, we should know what we are optimizing for! What are we optimizing for?

Design Goals

1.We should be able to store a lot of links, since we're not automatically expiring them.
2.Our shortlinks should be as short as possible. The whole point of a link shortener is to make short links! Having shorter links than our competition could be a business advantage.
3.Following a shortlink should be fast.
4.The shortlink followers should be resilient to load spikes. One of our links might be the top story on Reddit, for example.

It is okay if the list wasn't just like mine, but let's move forward

Step 3 Next step: building the data model.

interview-cake's People

Contributors

kvinzheng avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.