-
Notifications
You must be signed in to change notification settings - Fork 98
Registry #178
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
Registry #178
Conversation
Some initial comments.. Why do we Also I think we should decompose |
Really first question here do we need such kind of monitoring at all. The key thoughts are the following: So my solution was: use the lightest possible mechanism to subscribe to event death, so I chosen linking. Maybe we need another approach or do not introduce additional monitoring at all, but then it should be documented in both specification and haddocks.
I agree. Also I think that I need to make separate PR for this commit and debate it there. |
Yeah fair enough, as long as receiving the link notification does what we want. I don't really understand how linking works when there's no receiver though - won't this just blow up in the NC event loop when we see the link failure signal from the remote node? I should probably re-read that code shouldn't I.... :/
That's a really good point. Please open an issue so we don't forget! Thanks. |
I've just run tests and current monitoring implementation doesn't work as needed. So my plan is the following:
Also I have created a bug report: https://cloud-haskell.atlassian.net/browse/DP-100 |
1,2,3 (haskell-distributed/distributed-process-tests#11) done All tests are passing. |
|
||
Both `nsend` and `nsendRemote` operations are asynchronous that doesn't | ||
check existance of the target process, if process died then message will | ||
be silently discarded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This text needs to be edited. I offer a version below. However a few things are amiss.
- Nothing is said about ordering of messages sent with nsend and nsendRemote
- Nothing is said about how the registry behaves on failures.
- The subsection is included in Open Issues, but I don't see any issue remarked as open.
It is apparent now that the semantics need to include register
, unregister
and possibly nsendRemote
as primitives.
The identifiers of both local and remote processes can be stored in the Registry. The operation \texttt{registerRemoteAsync} can register processes at remote nodes. When a message is sent to a remote node using \texttt{nsendRemote} there is no guarantee that the process that should receive the message is located at the node; thus it may be necessary to relay the message to a process on yet another node.
Both operations nsend
and nsendRemote
discard the messages if no process is registered with the given name.
I think I understand now the open issue. This PR fixes If it is not too complicated, I'd rather prefer to see a PR that fixes both functions rather than augmenting the |
Thanks for fixing semantics document, I'll use that text and will cover all questions you've raised.
|
I have updated PR, now it contains implementation for |
Registry agent monitors all processes that were added to registry and removes them from registry if they die.
This PR is outdated due to #184 |
An PR for an early review that implement registry according to unified semantics.
The main attention should be paid to d305553 where linking was introduced.