Skip to main content
Added yet another C++ actor model implementation.
Source Link
Giorgio
  • 19.8k
  • 16
  • 89
  • 137

If you have some time to dedicate to refactoring your application, I would advise you to take a look at the actor model (see e.g. Theron, Casablanca, libcppa, CAF for C++ implementations).

Actors are objects that run concurrently and communicate with each other only using asynchronous message exchange. So, all the problems of thread management, mutexes, deadlocks, etc, are dealt with by an actor implementation library and you can concentrate on implementing the behaviour of your objects (actors), which boils down to repeating the loop

  1. Receive message
  2. Perform computation
  3. Send message(s) / create / kill other actors.

One approach for you could be to do some reading on the topic first, and possibly have a look at one library or two to see if the actor model can be integrated in your code.

I have been using (a simplified version of) this model in a project of mine for a few months now and I am amazed by how robust it is.

If you have some time to dedicate to refactoring your application, I would advise you to take a look at the actor model (see e.g. Theron, Casablanca, libcppa for C++ implementations).

Actors are objects that run concurrently and communicate with each other only using asynchronous message exchange. So, all the problems of thread management, mutexes, deadlocks, etc, are dealt with by an actor implementation library and you can concentrate on implementing the behaviour of your objects (actors), which boils down to repeating the loop

  1. Receive message
  2. Perform computation
  3. Send message(s) / create / kill other actors.

One approach for you could be to do some reading on the topic first, and possibly have a look at one library or two to see if the actor model can be integrated in your code.

I have been using (a simplified version of) this model in a project of mine for a few months now and I am amazed by how robust it is.

If you have some time to dedicate to refactoring your application, I would advise you to take a look at the actor model (see e.g. Theron, Casablanca, libcppa, CAF for C++ implementations).

Actors are objects that run concurrently and communicate with each other only using asynchronous message exchange. So, all the problems of thread management, mutexes, deadlocks, etc, are dealt with by an actor implementation library and you can concentrate on implementing the behaviour of your objects (actors), which boils down to repeating the loop

  1. Receive message
  2. Perform computation
  3. Send message(s) / create / kill other actors.

One approach for you could be to do some reading on the topic first, and possibly have a look at one library or two to see if the actor model can be integrated in your code.

I have been using (a simplified version of) this model in a project of mine for a few months now and I am amazed by how robust it is.

Added a link to a further C++ implementation, and updated comment.
Source Link
Giorgio
  • 19.8k
  • 16
  • 89
  • 137

If you have some time to dedicate to refactoring your application, I would advise you to take a look at the actor model (see e.g. Theron, Casablanca, libcppa for a C++ implementationimplementations).

Actors are objects that run concurrently and communicate with each other only using asynchronous message exchange. So, all the problems of thread management, mutexes, deadlocks, etc, are dealt with by an actor implementation library and you can concentrate on implementing the behaviour of your objects (actors), which boils down to repeating the loop

  1. Receive message
  2. Perform computation
  3. Send message(s) / create / kill other actors.

I have been trying (a simplified version of) this model in a project of mine right now and I was amazed by how robust it is.

One approach for you could be to do some reading on the topic first, and possibly have a look at one library or two to see if the actor model can be integrated in your code.

EDIT

This I have been using (a simplified version of) this model in a project of mine for a few months now and I am amazed by how robust it is also an interesting reading.

If you have some time to dedicate to refactoring your application, I would advise you to take a look at the actor model (see e.g. Theron for a C++ implementation).

Actors are objects that run concurrently and communicate with each other only using asynchronous message exchange. So, all the problems of thread management, mutexes, deadlocks, etc, are dealt with by an actor implementation library and you can concentrate on implementing the behaviour of your objects (actors), which boils down to repeating the loop

  1. Receive message
  2. Perform computation
  3. Send message(s) / create / kill other actors.

I have been trying (a simplified version of) this model in a project of mine right now and I was amazed by how robust it is.

One approach for you could be to do some reading on the topic first, and possibly have a look at one library or two to see if the actor model can be integrated in your code.

EDIT

This is also an interesting reading.

If you have some time to dedicate to refactoring your application, I would advise you to take a look at the actor model (see e.g. Theron, Casablanca, libcppa for C++ implementations).

Actors are objects that run concurrently and communicate with each other only using asynchronous message exchange. So, all the problems of thread management, mutexes, deadlocks, etc, are dealt with by an actor implementation library and you can concentrate on implementing the behaviour of your objects (actors), which boils down to repeating the loop

  1. Receive message
  2. Perform computation
  3. Send message(s) / create / kill other actors.

One approach for you could be to do some reading on the topic first, and possibly have a look at one library or two to see if the actor model can be integrated in your code.

I have been using (a simplified version of) this model in a project of mine for a few months now and I am amazed by how robust it is.

added 101 characters in body
Source Link
Giorgio
  • 19.8k
  • 16
  • 89
  • 137

If you have some time to dedicate to refactoring your application, I would advise you to take a look at the actor model (see e.g. Theron for a C++ implementation).

Actors are objects that run concurrently and communicate with each other only using asynchronous message exchange. So, all the problems of thread management, mutexes, deadlocks, etc, are dealt with by an actor implementation library and you can concentrate on implementing the behaviour of your objects (actors), which boils down to repeating the loop

  1. Receive message
  2. Perform computation
  3. Send message(s) / create / kill other actors.

I have been trying (a simplified version of) this model in a project of mine right now and I was amazed by how robust it is.

One approach for you could be to do some reading on the topic first, and possibly have a look at one library or two to see if the actor model can be integrated in your code.

EDIT

This is also an interesting reading.

If you have some time to dedicate to refactoring your application, I would advise you to take a look at the actor model (see e.g. Theron for a C++ implementation).

Actors are objects that run concurrently and communicate with each other only using asynchronous message exchange. So, all the problems of thread management, mutexes, deadlocks, etc, are dealt with by an actor implementation library and you can concentrate on implementing the behaviour of your objects (actors), which boils down to repeating the loop

  1. Receive message
  2. Perform computation
  3. Send message(s) / create / kill other actors.

I have been trying (a simplified version of) this model in a project of mine right now and I was amazed by how robust it is.

One approach for you could be to do some reading on the topic first, and possibly have a look at one library or two to see if the actor model can be integrated in your code.

If you have some time to dedicate to refactoring your application, I would advise you to take a look at the actor model (see e.g. Theron for a C++ implementation).

Actors are objects that run concurrently and communicate with each other only using asynchronous message exchange. So, all the problems of thread management, mutexes, deadlocks, etc, are dealt with by an actor implementation library and you can concentrate on implementing the behaviour of your objects (actors), which boils down to repeating the loop

  1. Receive message
  2. Perform computation
  3. Send message(s) / create / kill other actors.

I have been trying (a simplified version of) this model in a project of mine right now and I was amazed by how robust it is.

One approach for you could be to do some reading on the topic first, and possibly have a look at one library or two to see if the actor model can be integrated in your code.

EDIT

This is also an interesting reading.

Source Link
Giorgio
  • 19.8k
  • 16
  • 89
  • 137
Loading