Monday, April 12, 2010

[TSoc] Abusing TinyURL, bit.ly, and your browser--making the work someone else's problem.

So, lately, I've had a few ideas for simple, interesting websites, and there's one thing they have in common--they have no server-side state. Server-side state means you need a database, and databases don't scale easily or cheaply.

So here's basis behind one of the ideas: http://www.translationparty.com

TranslationParty works by taking your English phrase, using JavaScript to call into Google Language Tools to convert it to Japanese, repeats the process back to English, and back to Japanese--on and on until it finds "equilibrium", or is confident the phrase will never reach it. Of course, it only works with English-Japanese translation. You'll notice, though, that it uses an identifier to allow it to recall previous "parties". I can show you one I just created a moment ago, by having you click on this link: http://translationparty.com/#7180967

They're storing the seed phrases in a database, so that visitors can refer back to them. That's fine, I suppose, but that database is eventually going to get large and expensive, and most of the past seed phrases will have been forgotten about in the mean time.


I showed TranslationParty to a couple folks last night, and they noticed it only did English-Japanese translation. I'd just hit on the idea of doing something like TranslationParty, but using virtualhosts to allow language selection.

en.ja.example.com would behave largely like the existing TranslationParty site.
ja.en.example.com would start with Japanese as the seed language, rather than English.
en.de.example.com would bounce between English and German
de.fr.example.com would bounce between German and French.

So, $1.$2.example.com would start with $1 as the seed language, and #2 as the intermediate language.

Problem is, I wouldn't want to store that database. It's largely a waste of server resources, considering most of it would be forgotten ten minutes after it was created. The obvious solution is to store the seed phrase as an HTTP GET parameter. http://en.ja.example.com/?seed=What%20lies%20in%2the%2deepest%20regions%20ones%20our%2memory would have "What lies in the deepest regions of ones memory" as the seed phrase, and be equivalent to http://translationparty.com/#7181046 ...

Now, that's a long, nasty URL, not suitable for copying and pasting in polite company, but it means that I don't need a database for these things. Besides, that's what bit.ly and tinyURL are for, right?


--
:wq

No comments:

Post a Comment