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

Implement "unordered channel" library site with the same ordering semantics as Orc publications #193

Open
2 tasks
arthurp opened this issue Feb 18, 2017 · 5 comments

Comments

@arthurp
Copy link
Member

arthurp commented Feb 18, 2017

The Orc standard library should have an "unordered channel" or "item pool" site which provides a channel with the same ordering guarentees as Orc publications (that is, almost none). This could be implemented much more efficiently than an ordered channel (using thread local queues and item stealing for instance) and it could be used in cases where publications are being tunneled around a trim or other combinator. In these cases the inputs are publications and the output is as publications as well so stronger ordering would be destroyed anyway.

  • Decide on a name for the site. "Unordered channel" seems like an oxymoron and "item pool" is not clear. The site will act like a tuple space, except that it will not provide pattern matching support.
  • Implement it using a concurrent pool of some sort in Scala. Consider using a split pool, but don't over do it. The big win for split pooling will come in a dOrc aware implementation.
@jthywiss
Copy link
Member

I've used a wrapped Java ConcurrentHashMap for this a few times, so I concur with the need.

Name: How about just "Bag"?

@arthurp
Copy link
Member Author

arthurp commented Feb 21, 2017

"Bag" is reasonable. I was thinking about a name that invokes the idea of "Tuple Space". Hmm.

@arthurp
Copy link
Member Author

arthurp commented Aug 3, 2017

Looking back at this I'm concerned about the name "Bag" since I think this type should NOT support any kind of "contains" operations. It would only support get and put (and a few other related things) like channels. Allowing the user to look at the stored values without removing them would prevent some optimizations.

@jthywiss
Copy link
Member

jthywiss commented Aug 3, 2017

BlackBag? :-)

@arthurp
Copy link
Member Author

arthurp commented Aug 5, 2017

What about "Pool" or "MessagePool"?

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

2 participants