Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Url Shortner #65

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Communication Model.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Component Model.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Entity Diagram.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assumptions.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# Assumptions
- Url expire time will be configurable by the system admin.
- Editing the url expiry time will not affect the url shortened before editing the expiration time.
- Shortening required authentication and each user will have a profile contains his own unique urls.
- Retrieving the original urls doesn't require authentication.
- Authentication module is out of scope.
8 changes: 8 additions & 0 deletions questions.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# Questions
- Requirements says that the system should handle urls of any length. However the max length for both url or query string will be UInt max.
- Fragments are browser features it will never be to the server and it stays on the url after redirection.
- The short url expiry time will be configurable by the system admin or each user will set the expiry time of each url.
- Can we reuse the deactivated urls.
- What will be the replacement of 404 not found error, will an error page be enough.
- Should the system handle the segments after the short url or just regard it as invalid url (ex. travx.ix/abcd for https://facebook.com what will tavx.ix/abcd/messages mean ?)
- Can user deactivate his short urls manually before it expires.
- Authentication and Authorization are totally absent on the requirements, will it be internal or public system.
9 changes: 9 additions & 0 deletions scale.md
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
# Scale
- Application level:
- Hardware will depends on wheather the technology that will be used will be multi-threaded (Java, ASP.net) or single threaded (Node.Js).
- Create a web farm distributed in different countries to ensure the least network latency.
- Load balancer in front of the web farm to manage the requests either by location and/or the utilization.

- Database leverl:
- Multi master replication, as there no update requests for the database in the current design this will be the best model.
- Database clustring to ensure the most availability.
- Load balancer to manager queries between the database servers (clusters).
3 changes: 3 additions & 0 deletions solution.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Solution.md
The solution should enable users to shorten long urls of any schema for both GET & POST endpoints. each user will have a profile that contains his urls so that we may give him some powerful analytics by adding click counter module.

Any registered user can share his shortened url with the public, the shortened url will hit a rest endpoint in the system that translate it to the long original url - if exists - and redirect the user to the original url keeping the http headers, verb and query string untouched.
Binary file removed system-context-diagram.png
Binary file not shown.