Many articles online demonstrates NodeJS as an example of reactor pattern. Isn't it rather proactor?
As far as I understand, the difference between the two is:
- reactor handles events in a single thread (synchronously)
- proactor handles events is multiple threads (asynchronously) with completion callbacks.
For example in this article:
Reactor Pattern is an idea of non-blocking I/O operations in Node.js. This pattern provides a handler(in case of Node.js, a callback function) that is associated with each I/O operation. When an I/O request is generated, it is submitted to a demultiplexer.
Isn't it actually definition of proactor?
Aucun commentaire:
Enregistrer un commentaire