Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It depends on your service multiplexing scheme. If you are using something like NodeJS or EventMachine, then thread safety provides nothing but only increased complexity and slowness.

And 0mq is for inter-process communication. While you are running a server with many threads in one process, you usually don't need it.



I guess I'm arguing that this is a premature optimization.


While I'm arguing that modern libraries can avoid threads...

Since you have Haskell and Actors, but worrying thread-safety of some other libraries. You can consider a single-threaded/multi-process deploy.

By setting the thread pool to 1, Actors in a single process can still handle tens of thousands of concurrent connections, while there is surely no thread-safety problem.


As I've said elsewhere in this thread, the messaging library shouldn't dictate my programming style.




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

Search: