Re:How to Safely Store Your Users' Passwords in 2016
by ARussell on Wednesday February 17, 2016 @12:15PM
(#11119369)
Wasn't Node's big draw early on (aside from the fact that it's JavaScript) the fact that everything is supposed to be asynchronous? I'm actually surprised this is a problem.
[ Parent
| on HN ]
Re:How to Safely Store Your Users' Passwords in 2016
by sotojuan on Wednesday February 17, 2016 @12:30PM
(#11119503)
Everything is asynchronous but the linked article uses the synchronous versions of the functions for some reason... async versions exist and are recommended[1]
[1] https://github.com/ncb000gt/node.bcrypt.js#async-recommended
Re:How to Safely Store Your Users' Passwords in 2016
by zwily on Wednesday February 17, 2016 @12:38PM
(#11119576)
Do the async methods actually execute on a thread pool though? Or do they use enough async methods internally to periodically release the main thread enough to keep it responsive?
From a quick glance at the source, the answer to the first is no.
Re:How to Safely Store Your Users' Passwords in 2016
by phpnode on Wednesday February 17, 2016 @12:47PM
(#11119648)
This one is truly async, it uses a libuv managed thread pool.
Re:How to Safely Store Your Users' Passwords in 2016
by zwily on Wednesday February 17, 2016 @01:03PM
(#11119812)
Yep you're right - disregard what I said above. :)
Re:How to Safely Store Your Users' Passwords in 2016
by mobiuscog on Wednesday February 17, 2016 @12:25PM
(#11119451)
asynchronous doesn't magically make CPU-intensive tasks faster.
Re:How to Safely Store Your Users' Passwords in 2016
by corobo on Wednesday February 17, 2016 @01:56PM
(#11120257)
It does mean other tasks (e.g. serving pages to visitors) can still be run at the same time as the CPU-intensive task though, like most languages do when it comes to hashing passwords and logging people in