News for hackers. Stuff that matters.
Re:In-memory key-value store in C, Go and Python by willvarfar on Wednesday March 21, 2012 @04:59AM (#3733619)
As the author points out in the article, the neat thing is that Go does this for you. That was the major takeaway.
Re:In-memory key-value store in C, Go and Python by antirez on Wednesday March 21, 2012 @05:20AM (#3733652)
This is the default programming model in Go, but it's the same for Node.js, and you can use an easy-to-use event library in Ruby and Python as well.

A key-value store is system programming. It should be carefully designed, it's not real-world that you accept the default I/O model of the language you are going to use.

p.s. in the case of C it's hard to argue what is the default I/O model. It supports threads, fork, multiplexing, blocking and non blocking I/O, in the same way basically (in a low level way).

Re:In-memory key-value store in C, Go and Python by yummyfajitas on Wednesday March 21, 2012 @08:29AM (#3734036)
In the real world, defaults and simple-to-use libraries (i.e. not twisted) matter. Just because you are doing system programming doesn't mean you necessarily have the time/skill to carefully optimize everything.

System's programming isn't just writing a KV store used by millions. Sometimes it's writing a dedicated calculation server used in a single company. Carefully optimizing your I/O model might take longer than doing the project itself.

Re:In-memory key-value store in C, Go and Python by ootachi on Wednesday March 21, 2012 @11:47AM (#3734887)
There is no default in C, beyond stdio. The C specification makes no reference to any I/O beyond stdio.

The author was being unfair to C. Use epoll or, better yet, libuv. libuv is a simple-to-use library.