Hacker News new | ask | show | jobs
Realtime web app architecture with Thoonk: a series of tubes, not tables (andyet.net)
58 points by evilpacket 5330 days ago
5 comments

Awesome. When I first heard of Thoonk, I failed to grasp its utility, but after reading this I can't wait to try it out.

The ease this will afford in isolating features is really exciting. Anybody else think this after reading the article about Williams, master of the comefrom?

Ha! I read that just before writing the Thoonk blog post!
Why do you think Redis is the best choice here? Did you benchmark other approaches and databases? What are the disadvantages of using Redis? How specifically does Redis help you make the app realtime? You said you scaled to 10s of thousands of users on a single server. What specs did that server have and what workload did you put it under? Did you write to disk during those tests?
Curiously just this morning I came across Derby (http://derbyjs.com/) which is another realtime framework that has a similar dependency on redis 2.6.

Derby seems to be more of a tradition mvc architecture. I like the idea of feeds in Thoonk, certainly worth some investigation.

Racer (http://racerjs.com) is a specific part of the Derby project which compares more directly to Thoonk, I think.
Really interesting stuff.

The naming of the types is slightly confusing. If I understand correctly, a "feed" is kind of like an unordered set (if you ignore the IDs) or a hash (using the ID as a key), while a "sorted feed" is like an array?

I agree. I'm unhappy with the names -- I'm trying to avoid naming things the same as Redis.

A feed is in publish order (not a set). Edited items are brought to the top.

A sorted_feed lets you publish at whatever end/index you want. You can also move items to a different index. Sorted feeds give you reposition events as well.

If nothing else, I'll fix this with documentation for 1.0.

Got it. Unrelated question: how would you compare Thoonk to Storm? Thoonk's "jobs" seem vaguely similar to Storm streams.

Also, I threw together a little REPL that makes it little easier to play around with Thoonk.js: https://gist.github.com/1378241

I kept getting faked out by the &bang, thinking that it was an incorrectly typed HTML entity.