Node.js is an event driven I/O and It's a single threaded server that
acts upon callbacks and never blocks on the main thread.- But how does it manage to non-blocking I/O?
- if it does easy to manage, why don't thread-based system manage it?
- Does not work the other threads (behind single event-driven thread) as like thread-based ?
- if the other threads mean workers(behind event driven thread) are busy, how it still can handle jobs without blocking?
Thread-based model assigning a task to a thread and if there is no
idle thread, block new tasks.- if a thread can handle multiple tasks like as event-driven single
thread that handles every I/O without blocking, why thread-based
system doesn't use this tactic on busy threads to I/O without
blocking.
- if a thread can handle multiple tasks like as event-driven single
I am wondering what are the differences (advantages/disadvantages) between event-driven and thread-based server systems.
No comments:
Post a Comment