What's the difference betwee "Actor model" and "Reactor pattern" in Python?
Asked Answered
M

3

8

https://en.wikipedia.org/wiki/Actor_model, the project is called "pulsar"

https://en.wikipedia.org/wiki/Reactor_pattern, the projects are Twisted and Tornado

What's the difference in the theory and practice?

Malaco answered 14/10, 2013 at 0:55 Comment(0)
Y
6

Twisted, tornado and pulsar all use an event loop (called reactor in twisted) to wait for events on file descriptors. In this respect, they are similar libraries and therefore can interoperate with each other.

The actor model in pulsar refers to the parallel side of the asynchronous framework. This is where pulsar differs from twisted for example. In pulsar each actor (think of a specialised thread or process) has its own event loop. In this way any actor can run its own asynchronous server for example.

More information about the actor implementation in pulsar here

http://quantmind.github.io/pulsar/design.html

Yogi answered 19/10, 2013 at 13:36 Comment(0)
T
3

There's no difference. "Actor model" is somewhat more ambiguous, but both terms are sufficiently general that they can apply to lots of different software with different characteristics outside their basic model.

Thisbe answered 14/10, 2013 at 1:42 Comment(1)
quora.com/Node-js/…Responsiveness
Y
0

Reactors enable determinism while preserving the style of actors, and without the performance loss of indiscriminately constraining concurrency to fix bugs due to race conditions and other sources of nondeterminism. Reactors promote modularity and allow for distributed execution.

Yerga answered 11/2, 2023 at 19:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.