Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize Local Message Passing #39

Open
stuartmscott opened this issue Jan 13, 2023 · 1 comment
Open

Optimize Local Message Passing #39

stuartmscott opened this issue Jan 13, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@stuartmscott
Copy link
Member

Messages send to self, or to other State Machines on the same host could avoid going through the networking stack and therefore gain a performance improvement.

Split out from #11

@winksaville
Copy link
Collaborator

Connection features:

  • Sending is always non-blocking
  • Sending should take roughly constant time
  • Sending does not mean message will be received
  • Lossless except on disconnect
  • Notify sender & receiver on disconnect
  • Ordered between a sender / receiver pair.

Related features:

  • Actors can choose to share a thread with other actors if they guarantee they don't block.
  • Actors can choose to not share a thread.

For connections with in a process and potentially between processes the above features are possible using a queue based on linked lists although there needs to be space for link(s) in the message.

In addition, an instance of this connection should be usable as a front and back end for a connection across an appropriate network protocol.

Multiple Producer Single Consumer or MP Multiple Consumer (MPSC or MPMC) linked list queues are a solution.

Rust crossbeam_channel is a start:
https://docs.rs/crossbeam-channel/latest/crossbeam_channel/

C++:
https://www.google.com/search?q=c%2B%2B+unbounded+mpsc+or+mpmc+queue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants