M
M
Marat Amerov2015-02-14 04:08:12
Erlang
Marat Amerov, 2015-02-14 04:08:12

Choosing an architecture for websockets. eventloop or actors?

When is one or the other solution preferable?
I am also interested in the experience of implementing into existing projects using RabbitMQ, etc.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Sokhatsky, 2015-02-16
@5HT

TL;DR: The implementation of any actor system is automatically an event loop.
Schedulers are usually called event loops, for example, in the form of C libraries such as libuv, which is used in node.js, Julia, Rust, and also in event loop, such libraries as in D, such as Vibe.D. Erlang actors are more than just a scheduler, they are also a messaging system.
If you don't need your scheduling units to talk to each other, you probably don't need an actor system and can quickly write this straight into C using libuv. Once you want the planning units to communicate with each other, you need something more than just looping through the stacks.
The question doesn't make sense, unfortunately, since Erlang provides more than just an actor system. You won't find an Erlang WebSocket server that doesn't support the concept of actors, and you won't find an Erlang WebSocket server that doesn't support the event loop concept.

S
Sergey, 2015-02-14
@begemot_sun

Actors are better. They work in parallel.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question