Comments (5)
Thanks for the answers and the welcome! Let's see how it goes ;)
Dug a bit deeper into Erlang's pg
module and got a bit surprised with the disjointness of scopes.
My updated understanding is:
- a process group is always in exactly one scope, and
- there can be multiple process groups with the same name, but in different scopes, so
- I must think of
(scope, process_group)
as an identifying tuple.
Is that correct?
from ractor.
Ya I find their docs lacking in some of the PG designs. But if we diverge here for a more logical solution I think that's fine too. I'm happy to be based on what they have but it doesn't have to be exactly Erlang's implementation.
You're summary sounds correct to my knowledge but I have not dug deeply through PG mainly for lack of time.
from ractor.
My questions before I might give it a try:
- Is there anything discouraging implementation at this moment?
- Is my understanding correct?
- Scopes are (possibly non-disjoint) sets of process groups.
- If no scope is explicitly set, all process groups are part of the default scope.
- To join a non-default scope, processes have to be joined with process groups in the explicit (non-default) scope.
- Processes can join any number of process groups in any number of scopes.
- As Rust doesn't support variadic functions: Does
ractor
have preferences regarding the interface, i.e.,- splitting the functions into, e.g., a
join
and ajoin_with_scope
(increasing the number of functions), or - setting an explicit
Default
function parameter for the scope (increasing noise when only using default scope), or - using macros for variadic interfaces?
- splitting the functions into, e.g., a
- Is there a technical reason the
pg
module's comments for themonitor
/demonitor
function mention 'scope or groups' already?
Can't promise anything but am curious so far.
from ractor.
Hello! And thanks for taking this on :) I'll try and answer your questions here
- Nope, just a level of complexity I wasn't willing to undertake when writing the core lib :)
- This all sounds correct to me
- Yeah this has been a slightly painful one, but I would lean towards multiple API calls one with scope, one without.
- I think this is just a stale comment from when I first attempted adding scopes and got too in-the-weeds before realizing it was more straightforward without scopes.
I'm also not 100% sure but I believe there will be over-the-wire cluster protocol changes to support scopes in the protobuf specs, so that's something to check as well.
Thanks for taking this on, and welcome to the project!
from ractor.
Thanks for the clarification and agreed. Will try to follow their design first.
from ractor.
Related Issues (20)
- About section needs update for async-std
- Support `async fn` in traits. HOT 1
- Request for TCP Echo Server Example with TcpListener and TcpStream as Actors HOT 1
- Enum contains type of itself HOT 4
- Add support to downcast a BoxedMessage to get a reference to it's wrapped type without consuming it HOT 4
- When panic=abort is on, panic is not captured. HOT 1
- Lifetimes do not match method in trait HOT 2
- Subscriber-Driven OutputPort Subscriptions
- Enhancing OutputPort Backpressure Handling via RecvError::Lagged Management and Buffer Configurability HOT 6
- `post_stop` of children are being called when supervisor fails. HOT 1
- Not depend protobuf-src on windows HOT 1
- Compiler panics HOT 2
- Handle multiple message types HOT 1
- Awaiting input in an actor HOT 1
- SpawnErr when spawning named actor will permanently pollute that name
- As a subscriber, I should can subscribe multiple type of messages from publisher HOT 2
- With async-trait turned off, it is impossible to use factory HOT 3
- flush() method to help testing HOT 1
- call_t! not working with predefined trait type HOT 1
- Add a pre_stop fn or some way to wait until post_stop has finished HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ractor.