3 ms·
As the author points out in the article, the neat thing is that Go does this for you. That was the major takeaway.
by willvarfar 15y ago
As the author points out in the article, the neat thing is that Go does this for you. That was the major takeaway.
- antirez 15y agoThis 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).
- yummyfajitas 15y agoIn 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.
- ootachi 15y agoThere 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.