compared with
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (25)

View Page History

h1. Intro

The [Data Basket UI design] shows shortened URLs (eg "").
Such functionality was not discussed in the spec, but was accepted as a given during the UI design discussion.
Here we will put the design decisions about how we'll implement URL shortening.

h1. Disadvantages

Shortened URLs have many disadvantages including unreadability, reduction of trust, instability, overhead traffic, and security risks.
- [] : an excellent page discussing all aspects of shortened URLs.
- [] : an emotional article including numerous links to other pages criticizing this practice.
Includes phrases such as
-- Twitter decided to break the Web by raping all of its URIs. Twitter’s sloppy URI gangbang became the Web’s biggest and most disgusting clusterfuck in no time.
-- What if the great chief of Libya all of a sudden decides that gazillions of redirecting punters to their desired smut aren’t exactly compatible to the Qur’an? All your URIs will be defunct over night.
-- (by Google)... promises stability, security, and speed. Well, at the day it launched, I broke it with recursive chains of redirects, and meanwhile creative folks ... wrote a guide on “hacking for fun and profit”
- []
- []
- []
- []
- []
- []
- []

The fact that you can surmise what the above pages are about is a simple example why shortened URLs should not be used
h2. References

[] :
- the penultimate section describes Free & Open-Source URL Shortening Software.
- the last section has Further Readings, including
While doing evil, reluctantly: Size, er trust matters
How to cleverly integrate your own URI shortener
- speed and reliability comparison[][]

h2. Stateful or Stateless

The key question is whether to:
- use a state-full service (i.e. save the redirects),
- such service is not very complicated

If external, which one should we select? I'd go with

h2. Domain, Resolving

If we decide to go with internal software, then we need to get an actual domain, establish DNS record, and setup a redirector. This is required for short URLs to be resolvable (to work).


These are Top Level Domains (TLD), belonging to some country. Eg is Lybia (silly\!) and is Greenland.
To get such domain, one should follow the specific procedures of the respective TLD authority.

TODO Ceco:
- research and trial some open source software (java\!)
- research and see how RS could use it (what is the API?).
Is it possible to "reserve" a prefix?
- describe how we'd deploy the sofware, or use

Possible solution that I found and tested:
# tinyURL  Service
* easy for use and deploy
* open-source


1.1. Download the javaQuery API


1.2. Import downloaded jar to the project build path

1.3. Invoke

tinyURL tU = new tinyURL();


1.4. Result


2. Service


2.1.  I found a simple class that changes the given String Object (the url) to a short and easy to remember URL.

To work we need to download  GSON library - [|]

(gson - convert Java Objects into their JSON representation)\\

2.2. Add the main jar to the build path -- the test was made on 08.14.2012, main jar was


2.3. Import in the project next java file that I upload (

2.4. Invoke


2.5.  Result


Note: From result  1.4 and 2.4, shortening url(SU) working but the prefix is based on SU service provider,  we can’t reserve ours;

The best solution is to create own url shortening service, that way we can reserve our  domain.

h1. Storing and Processing