Hi, I am new to the actor-based system. This is my first time to use the actor framework. And I really like riker. It is well-documented and elegant.
But, I ran into a serious issue several days ago and I don't know how to solve it.
How can I send big messages between actors? If I send the messages between actors, I have to derive Clone and Copy traits for the data structs which I used for wrapping messages. Clone is so a big issue to ignore, especially for big messages.
For example, I have a receiver actor for receiving TcpStream. Then the receiver actor processes it, stores some necessary information, and then pass it to the next actor for future processing.
It simply acts like this:
Big Big TcpStream --> receiver actor --> Big big struct (converted from receiver actor) --> A actor (recording some basic info) --> B actor (processes it, or stores it) --> End
So, in my opinion, it is not a good idea to pass big data struct around between actors. It could impact the performance greatly possibly. Maybe is it not a good idea to use an actor-based framework? Maybe I should just stick to the traditional threading methods?
Or, is it possible to pass the reference to that big data struct between actors? (maybe use a pool or something?)
PS:
- I know this issue is not highly related to the
riker itself. But it would be extremely helpful to point out something for me.
- Are there some projects using
riker right now? It will be really nice for me to imitate those codes. (Maybe it is also really nice for a newbie, like me.)
Hi, I am new to the actor-based system. This is my first time to use the actor framework. And I really like
riker. It is well-documented and elegant.But, I ran into a serious issue several days ago and I don't know how to solve it.
How can I send big messages between actors? If I send the messages between actors, I have to derive
CloneandCopytraits for the data structs which I used for wrapping messages.Cloneis so a big issue to ignore, especially for big messages.For example, I have a receiver actor for receiving
TcpStream. Then the receiver actor processes it, stores some necessary information, and then pass it to the next actor for future processing.It simply acts like this:
So, in my opinion, it is not a good idea to pass big data struct around between actors. It could impact the performance greatly possibly. Maybe is it not a good idea to use an actor-based framework? Maybe I should just stick to the traditional threading methods?
Or, is it possible to pass the reference to that big data struct between actors? (maybe use a pool or something?)
PS:
rikeritself. But it would be extremely helpful to point out something for me.rikerright now? It will be really nice for me to imitate those codes. (Maybe it is also really nice for a newbie, like me.)