[RFC] Introduce data_publisher - #10426
Conversation
CT Test Results 3 files 85 suites 1h 10m 51s ⏱️ Results for commit 2d68cbd. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts
// Erlang/OTP Github Action Bot |
|
Tastes like |
a7955df to
d1f2fa0
Compare
Oh do you mean start the gen_server without allowing it to have any cross-node communication? I can think how to add this functionality |
frazze-jobb
left a comment
There was a problem hiding this comment.
Great job, I like it. I have some documentation, and naming comments, that we can discuss.
I was able to trigger a crash when trying this out, so that needs fixing. I will maybe try some more, to see if I can find something untested.
cbbc9f6 to
7278e1f
Compare
|
updated with some doc and bug fixes |
frazze-jobb
left a comment
There was a problem hiding this comment.
I don't like custom_state,
How about data -> local_state
and storage -> global_view?
Motivation:
Global view implies that what you see is a projection or a materialized summary of the whole cluster. It signals to the developer that:
It contains data from multiple places.
It might be slightly out of sync (a "view" can be stale).
It's not necessarily an exact copy of the local_state (data).
|
Sure I can do the change, just a note that global_view can contain more things than a "view": In pg it is the monitors of the local pids |
|
Yes, this behavior can be used in that way, but I imagine that there should be clean cuts between state and view. Maybe the monitors could be part of the local state, but not affect the view by calling update in update_view_and_notify. But it works now and I dont think you need to make the change on pg. But if you want you can try. |
|
I updated the PR to have type name change to global_view and local_data |
frazze-jobb
left a comment
There was a problem hiding this comment.
I'm happy with this, minor problem with licence header, and a failing testcase: kernel_SUITE:app_test
|
great, updated with the fix, thanks! |
|
The license header check fails. Removed from our daily builds. |
|
all checks passing now |
|
Thanks! Please squash your commits. See Writing good commit messages. |
|
Sure, updated |
Generalized data publishing logic of pg to a behavior module, so that it better supports version upgrade, and can be used for other data publishing scenarios. The message sent between pg gen_servers to be a general update instead of tuples starts with join/leave. This makes it able to support more efficient APIs.
0ec252e to
b309d6f
Compare
Generalized data publishing logic of pg to a behavior module, so that it better supports version upgrade, and can be used for other data publishing scenarios.
I also changed the message sent between pg gen_servers to be a general update instead of tuples starts with join/leave. This makes it able to support more efficient APIs.
This replaces PR of #7609
I have a small change that makes pg:demonitor only return ok instead of ok | false, this is revertible but I believe no one is using the 'false' return