Hacker News new | past | comments | ask | show | jobs | submit login
Goodbye Tokyo Cabinet, hello PostgreSQL (briancarper.net)
48 points by khingebjerg on June 29, 2010 | hide | past | favorite | 14 comments



"I switched to TC to begin with because I was using SQL wrong, and it was too slow and clumsy. Once I figured out how to use SQL correctly, it was a no-brainer to go back."

While k-v stores and other NoSQL solutions have many great, valid use-cases, I expect there are many other people who switched to NoSQL stores on the basis that they were "faster" only to discover that they needed many of the features they'd left behind in SQL databases.


Moved a personal blog from MySQL to TokyoCabinet to Postgres? Why?

He writes:

"I have no idea how to use a key/value store database properly."

You don't need a database, or object-store or anything fancy to get decent performance for a personal blog. I use Chronicle and it spits out flat files; lighttpd uses sendfile(2) and everything is fast. FWIW, his blog software is one he wrote in Clojure:

http://github.com/briancarper/cow-blog/tree/0.2.0

For read-intensive applications, Sqlite3 would do just well.

This write-up should not influence anyone with respect to the (de)merits of MySQL, TokyoCabinet or Postgres.


Why? Because it's a fun project to play with and a good way to learn. SQLite3 probably would work, yes.

I agree, this post shouldn't influence anyone. Not sure why it was submitted to HN.


I submitted it because I like reading about your experiments with your blog, and I thought others would like it too.

A person hacking on his own stuff, just to try out things, is hacker news to me.


While I like reading informative articles about hackers mastering their tools, this article doesn't have a lot of general purpose information, or mastery of tools.

A follow up article about the query architecture in all three implementations could be interesting: how he failed with a relational DB, how he failed with a key/value DB, how he succeeded with a relational DB. An article like that could have an interesting story arc and may include information applicable to other developers.


That guy has no clue how to use a non-relational DB (he even admits it) and he uses a DB that is wrong for his task and wonders why it's so hard.

The only point he makes is that the APIs for non-relational DBs are much too simple and limited, so you end up building lots of code on top to do the most trivial things.

What we really need is a way to generate indexes or materialized views on these DBs in a standardized way (see CouchDB, for an example).


He has no clue how to use a relational DB either (he even admits it). How and why is this on the homepage?


I have a (bit of a) clue how to use a relational DB. But not from Clojure two years ago, when the only interface was a very thin layer over JDBC.

As for why it's on the homepage, I don't think it belongs here either. The intended audience was rather more narrow than HN.


I wasn't sure I was reading it right, but you said MySQL was too slow to run your personal blog? Is that right?


I ran on MySQL for a few months without issues, but my code was disgusting. My choice was clean code + slow, or ugly code + fast. Today I have clean code + fast, thanks partly to better library support in Clojure, so I'm happier. I'll be the first to admit that I didn't have much of a clue a year and a half ago. I think I have a bit more of one today, but I could be wrong.

Again, not sure why any of this is important enough to talk about on HN. I'm hoping this thread dies before my server bursts into flames.


Why is this on the front page? I could understand it IF he switched to PostgreSQL because it outperformed Tokyo Cabinet, but he switched back simply because he finally learned SQL. This isn't about technology, it's about his understanding. This story is lame.


People who don't understand database/relational-stuff should not touch db-related work.


Why not use both, especially if you're using your blog as a technical playground? Every time you update the document in the Tokyo cabinet, you could make appropriate changes to the PostgreSQL tables, and that way you wouldn't have to worry about writing clever queries for tags.

(Disclaimer: I don't know what I'm talking about. If someone else had mentioned this idea, I wouldn't have said anything.)


Point number 2 for why not to use TC is not very strong. If you need help installing a database perhaps you need to learn a little bit more before managing a webserver.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: