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

Yes the nodejs concurrency model takes some time getting used to, but working with threads is much harder imo. Raw speed benchmarks don't do enough to give a full picture.


This is comparing nodejs with Ruby's EventMachine, so where do threads enter the picture? It's been a while since I looked at EM, but if I remember correctly, it's pretty much in the same area as Python's Twisted or node.js, as opposed to something like plain ol' Java threads or Erlang.


I don't actually even see eventmachine in there, aside from a remark about having tried it in the opening introduction. Seems it is just comparing node with sinatra+mongomapper running under thin or unicorn.

Based on the title I assumed it was something like goliath or sinatra/async with rainbows!/thin. Looking at the git repo linked in the article though, I don't believe that is the case.


EventMachine uses an event loop like node, so threads are somewhat irrelevant here. Unless "workers" are threads and not actual processes, but I am pretty sure they are processes.


Working with threads in the context of a web request is not hard.


Threads are inferior to events for concurrency, but they're better for throughput.

number_of_threads * thread_stack_size = sadface.jpg (when trying to use threads to handle lots of connections)




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

Search: