![]() ![]() Node.js being designed without threads doesn't mean you can't take advantage of multiple cores in your environment. This makes Node.js well suited for the foundation of a web library or framework HTTP is a first-class citizen in Node.js, designed with streaming and low latency in mind. This behavior is like browser JavaScript - the event loop is hidden from the user Node.js exits the event loop when there are no more callbacks to perform. Node.js simply enters the event loop after executing the input script. In Node.js, there is no such start-the-event-loop call. Typically, behavior is defined through callbacks at the beginning of a script, and at the end a server is started through a blocking call like EventMachine::run(). In other systems, there is always a blocking call to start the event-loop. It presents an event loop as a runtime construct instead of as a library. Node.js takes the event model a bit further. Node.js is similar in design to, and influenced by, systems like Ruby's Event Machine and Python's Twisted. ![]() As an asynchronous event-driven JavaScript runtime, Node.js is designed to build scalable network applications
0 Comments
Leave a Reply. |