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

[DP-03] Improve efficiency of message matching #43

Open
edsko opened this issue Oct 15, 2012 · 3 comments
Open

[DP-03] Improve efficiency of message matching #43

edsko opened this issue Oct 15, 2012 · 3 comments

Comments

@edsko
Copy link
Member

edsko commented Oct 15, 2012

[Imported from JIRA. Reported by Edsko de Vries @edsko) as DP-3 on 2012-10-15 09:20:36]

In particular, storing messages by type could be very beneficial.

@hyperthunk
Copy link
Member

So would we store the accepted mailbox as Map Fingerprint (StrictList a) or some such? Is Map the right data structure for this or donee want a strict version?

@edsko
Copy link
Member Author

edsko commented Jan 7, 2013

You have to be very careful here: you still need to guarantee ordering. If a process does a receiveWait for type A or type B then we need to make sure that if a message of either type exists they are delivered in the order that they were received.

@hyperthunk
Copy link
Member

You have to be very careful here: you still need to guarantee ordering.

Yes of course, I was jumping ahead without thinking there. I suspect then, some kind of custom data structure that maintains the priority property but supports searching/inserting by key. Ralf Hinze et al present a Priority Search Queue which IIRC was used (or adapted) in the GHC IO manager, so perhaps we can take some inspiration from there. The primary difference is that we want to select by a range of keys and then order by priority.

@qnikst qnikst changed the title Improve efficiency of message matching [DP-03] Improve efficiency of message matching Jun 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants