3 ms·
> JS got popular coz, well you ain't got fucking choice on frontend and having your then-frontend JS/HTML/CSS designer be able to also do backend is, well, agai
by mhink 4y ago
> JS got popular coz, well you ain't got fucking choice on frontend and having your then-frontend JS/HTML/CSS designer be able to also do backend is, well, again, easy and cheap.
IIRC, a bigger reason for Node's popularity (at least at the very beginning of its popularity) was the fact that it had event-based I/O, which let a single process handle a lot more in-flight requests than Ruby (where the concurrency model was to spin up a bunch of processes and multiplex across them with nginx or similar).
- pjmlp 4y agoFamous TCL paper from 1995, regarding event based programming. "Why Threads Are A Bad Idea (for most purposes)" https://web.stanford.edu/~ouster/cgi-bin/papers/threads.pdf https://web.stanford.edu/~ouster/cgi-bin/papers/threads.pdf
- samsquire 4y agoI don't think threads are a poor idea but they have sharp edges. I work on multithreaded software and I get 31,516,776 synchronizations per second with a lock free algorithm and 12 threads and 31,565,052 on the lock benchmark. When the threads are increased to 100 (contention) the lock benchmark does 3,419,271 requests per second whereas the lock free algorithm does 19,926,428 so the contention hurts them both but the lock free benchmark scales far better. Threads aren't bad. The domain is not easy.