Repository navigation
Crossplot route handshake - #10
Open
andrewfullard wants to merge 4 commits into
Open
andrewfullard wants to merge 4 commits into
andrewfullard wants to merge 4 commits into
Conversation
Notify iterates over a copy of the listener list, so listeners can detach themselves or others mid-notification without skipping callbacks. Adds has_listeners() to check whether any listener is attached. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- serializer escapes strings and keys with %q, supports boolean and number keys, and returns nil for unsupported values (functions, userdata, cycles, numbers that do not round-trip) instead of emitting invalid or unsafe Lua. Function serialization via string.dump is removed. - MessageQueue serializes values when they are queued, so unsupported payloads are rejected immediately (queue_value returns false), and checks whether a mailbox is free without deserializing it. - GlobalValueKeyValueStore gains store_serialized, take (read and clear) and is_empty; store now returns whether the value was stored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e-handshake Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Galactic plots could publish events before other plots had registered
their listeners with the main bus, so early messages were lost.
- Subscribe/unsubscribe messages are merged into a single ordered
busid:main:route channel carrying {name, event, active}. An endpoint
only registers on its first local listener for an event and only
unregisters after its last one detaches.
- A bus created with an initial_route_source defers route messages and
sends its complete listener list in one message via
submit_initial_routes(required_sources).
- The main bus (crossplot:main) holds publications until every required
startup source (default "galactic-core") has reported, then sets
busid:main:ready.
- Notifications are taken (read and cleared) before callbacks run, so a
failing listener cannot block the mailbox; malformed notifications are
dropped. Subscribers are stored as a set and each publication is
serialized once for all recipients.
- deepcore:galactic registers as "galactic-core" and submits its routes
after all plugins are loaded; config.required_initial_route_sources can
name additional sources to wait for.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requires serialization + merge of the observable fix. This fixes a lot of issues around startup of many plugins that perform many subscriptions