Hacker News new | past | comments | ask | show | jobs | submit login

Most of the fs calls have sync equivalents, but you only want to use them at application startup.

IO is slow, Node is evented IO, the requests come in and the requests (to the database) go out, the data comes in and the result is rendered to the client. Node deals with requests.

But let's say it was made to work like you request, and the docs were changed to reflect that. People learn they could throw some code in a file and call it node.js. (I've done that, using a fastcgi server implementation and adding a hander for it on a bluehost account.)

So now you have PHP but with Javascript as it's syntax, your developers build applications the way they do in PHP, you call Node slow and a thread like this launches on HN saying how bad the language is and how somebody should fix that.




I've never heard of people complaining of PHP being slow. They don't care, they just want to glue some HTML, CSS and JS together and run it on the browser easily.

So yes, simplify JS on the server to act like PHP and use node for servers and other stuff. Name it differently if you want so they don't call node slow. V8CGI is the closest to a deliciously simple JS implementation on the server I've seen. Take a look at it for some ideas.




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

Search: