-
Website
http://blog.urbantastic.com -
Original page
http://blog.urbantastic.com/post/81336210 -
Subscribe
All Comments -
Community
-
Top Commenters
-
mattrepl
2 comments · 2 points
-
digash
1 comment · 1 points
-
heathjohns
8 comments · 1 points
-
Giannii
1 comment · 123 points
-
maychu
1 comment · 1 points
-
-
Popular Threads
_
Tokyo Cabinet - http://tokyocabinet.sourceforge.net/index.html
Tokyo Cabinet is certainly lower level than BigTable, but I don't know how else to refer to the Tokyo Cabinet stack that mixi.jp (essentially the Japanese version of Facebook) uses. It includes Tokyo Cabinet, Tokyo Tyrant, and Tokyo Dystopia.
The exposed scaffolding and simple design make managing a TC-based database less scary than other more opaque designs.
If you haven't checked it out yet, their presentation slides [2] might inspire you to see how TC could be used as a BigTable stand-in for web applications.
_
1 - To make things even clearer I'll add: the database is not limited to row-oriented storage, lacks a fixed schema, and supports column indexes.
2 - http://tokyocabinet.sourceforge.net/tokyoproduc...
There's an effort called ClojureScript that might help with the code duplication. But as it stands, though, I actually like having to two separate checkpoints in place. I've caught some of my own mistakes this way, and in the worst case scenario are far more likely to give a false negative than a positive, which is a better failure state than an inconsistant db.
In our particular case we're not interested in having Google index the dynamic content of our site - we have much more in common with Gmail than, say, a CMS system.
I love what you are doing. I dont know if ben told ya I work in a data center. The job you are doing is greate because running data center sand having powerfull servers are expensive. cost are going up in terms of colocation because of power so pushing some of the job to client side will fix alot of the issues of the problems.
Anoush
"The site originally ran on Google App Engine, which in theory should have been perfect - why we left them is a whole other blog post."
Subscribing and looking forward to it.
In my case, I differentiate b/w the ApplicationServer (Erlang/Mochiweb) that handles the actual logic of my applications. I call to the appserver via REST and get JSON replies.
I then have a UI Server, which is built with a Python framework, currently Pylons/Simplweb. This actually just serves up what I call UI Apps, which are basically orthogonal applications very heavy in Javascript.
So in a typical scenario, when you hit the home page for my application, you'll hit the UI server which will return the Login page to you. This page is actually fully Javascripted and when you hit submit button, the Javascript will make a REST call to the appserver to authenticate you. If the JSON sent back indicates success, we use document.location to redirect you to the next UI app in the sequence. Each UI app is almost independent of the other, and so forth.
I've been distilling this architechture slowly over the past 4 months, and I have some unanswered questions in my head, but also, I have some very cool gems, like the way I use contracts b/w the appserver and the UI apps. Each JSON response is actually a structure containing, version info, type info, and some other parameters, so my Javascript processing them begins to closely resemble pattern matching in Erlang.
All in all, like you say... its interesting, its new, but there are lots of kinks to work out in the way. I like the way you make all your HTML static, while I still have some bits supplied by templates, I think your approach is superior in this regard, as it has less moving parts.
Someone should give this method a name and actually start studying it.
That Clojure server is where the "business" logic resides, and it, in turn, sits on top the CouchDB database (again, connected via HTTP).
Does it carry some risk? You bet! but I think placing yourself ahead of the curve will pay handsomely soon.
One thing I noticed however, and I think it's kind of a downside to separating out the dynamic and static sections, is that when one turns off javascript on all the content goes completely away. My impression is that it's cool if an email client requires javascript to work, but having an informational site do this completely breaks the linked document metaphor of the web. I would be really interested to know how it's even possible for search engines to index this... But maybe I'm just being too closed minded about the whole thing. :)
*Deep breath* You really should blog about why Google App Engine didn't work out for you, I'd love to hear about it. The reason I ask is because I've been getting into using it, and it seems almost too perfect and awesome to be true...
However, you are right about the document model. Urbantastic is very much an application, not a CMS system. Just as it doesn't make sense to index Gmail, it wouldn't make sense to index us.
The site's only a little over a month old at this point...
Your stack sounds good. I use a similar Json->JS approach where it makes sense. I'm using GAE a lot and have been very happy with it - 100k req/sec at my busiest time daily. I'm curious to know what problems you encountered.
Ben
It is also quite new, but already have some application using it in prod and very simple to use.
http://www.reddit.com/r/programming/comments/80...
http://www.reddit.com/r/programming/comments/80...