-
Notifications
You must be signed in to change notification settings - Fork 116
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
Actors v18 #755
Actors v18 #755
Conversation
rebased and dropped the npm changes as they break the documentation build; oh well. |
b2601a6
to
f80416b
Compare
|
||
### rpc.unmonitor | ||
::: tip usage | ||
### remote-stop-server! |
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.
Maybe remote-server-stop!
?
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.
We have stop-actor!
above where stop
is a prefix, but here stop
is the suffix. Maybe
stop-actor! -> actor-stop!
remote-stop-server! -> remote-server-stop!
for unified names?
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.
stop-remote-server!
probably more consistent; let me think about this.
I use the remote
prefix in a few places to make it obvious this is a remote action.
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.
Why remote? Doesn't it work the same local and remote?
bf332d7
to
2393295
Compare
,(@shutdown | ||
(infof "loader shutting down ...") | ||
(exit 'shutdown)) | ||
,(@ping) |
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.
Whoa, this is wild, and deserves a note here, since the <- is only defined later.
Does match also have it? Is there a macro to help my macros have it too? etc.
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.
match doesn't have it, I came up with the gnostic syntax later -- maybe we should add it? It is really nice for composition indeed.
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.
It is very nice, and something I've wanted for a long time. I was surprised it was possible, and what more with regular syntax-rule!
the previous implementation was lazy and very inefficient.
before killing the registry
it's been updated
no need to do hash table lookups in such a frequent operation
writing it as a u8vector object is just a silly idea.
rebased on master; it's in the future now. |
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.
Sorry I had only a cursory look at the code itself, but LGTM modulo remarks for documentation.
Internet. It allows servers to find each other by using the server | ||
identifier, and implicit connect as needed without requiring the | ||
programmer or the operator to explicitly connect to each other. | ||
|
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.
Does that keep working if my IP address changes?
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.
you'd need to update the server address in the registry; you can do this with ensemble-add-server!
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.
How will my laptop even know it has changed address? That might happen often as I hop between wifi and mobile... at which point my IP might often be firewalled.
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.
Well, if you are running an ensemble server in your laptop exactly what are you advertising?
It is far more likely that you are running a client in your laptop, in which case you don't have to do anything.
Having said that, if you want to run a server in your laptop, we could make a separate utility to detect changing IPs and update the registry entry.
I simply don't think this is a concern at this level, and we have all the necessary procedures to write such a tool.
to authenticate each other. The cookie is placed in `$GERBIL_PATH/ensemble/cookie`; | ||
if you are running an ensemble spanniong multiple hosts, you should copy the cookie | ||
to the relevant hosts. Note that the tool will not overwrite an existing ensemble | ||
cookie. |
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.
Race condition?
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.
No, safety; it would be bad to accidentally override your cookie.
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.
I mean, there is an inherent race condition when two processes both try to create the cookie. Are we trying very hard to avoid it? How?
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.
I don't think that it is reasonable to create cookies programmatically and shoot yourself in the foot.
This should be an administrative step that should run once, either manually or as part of your ensemble container/tarball/rsync preparation process.
So I don't think we need to do anything about it.
Actors v18; see #724
This is a rewrite of the
std/actor
package, with a leaner and more powerful protocol, a much more ergononic API, and a practical management tool.The legacy package has been deprecated and moved to
std/actor-v13
until it gets removed in some future release.See the documentation for more details.