Repository navigation
api: public service discovery experimental API - #391
Merged
Merged
Conversation
KonradBreitsprecherBkd
added this pull request to stack #435
October 5, 2026 13:44
MariusBgm
force-pushed
the
dev_public_service_discovery_capi
branch
4 times, most recently
from
October 6, 2026 14:32
2cb9cc1 to
a5c423b
Compare
MariusBgm
marked this pull request as ready for review
October 7, 2026 10:28
Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
drop UUID and other internals. only provide primaryIdentifier as handle key Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
add validator integration testcase for matchin pub + sub Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
…hers into the struct Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
…e housekeeping alot Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
… handler Signed-off-by: Marius Börschig <Marius.Boerschig@vector.com>
- Replace the catch-all Link kind with NetworkSimulatorLink, PubSubMatch and RpcMatch. Matches are now reported as removed: after both endpoints are known, and before the first endpoint's ServiceRemoved. - Report each participant's LifecycleService and TimeSyncService. - Rework SilKit_Experimental_ServiceDescriptor (unreleased, so not backward compatible): serviceId / connectedServiceId as stable keys, typed networkType, operationMode and timeSyncActive, an isSnapshot flag for the services replayed on handler registration; drop the always empty simulationName. - Adapt the C++ hourglass, and extend the unit, integration and hourglass tests. Signed-off-by: Konrad Breitsprecher <Konrad.Breitsprecher@vector.com>
MariusBgm
force-pushed
the
dev_public_service_discovery_capi
branch
from
October 13, 2026 14:41
e2e01c2 to
6bcc013
Compare
snps-kratz
approved these changes
Oct 19, 2026
snps-kratz
left a comment
Collaborator
There was a problem hiding this comment.
I came up with some questions and created a small demo discovery inspector that exercises this design. I did not run into any immediate problems with that. Just some questions and minor comments.
KonradBreitsprecherBkd
requested changes
Oct 22, 2026
KonradBreitsprecherBkd
left a comment
Contributor
There was a problem hiding this comment.
I found some issues that require attention.
- Rename silkit/capi/Experimental.h to silkit/capi/ServiceDiscovery.h and CapiExperimental.cpp to CapiServiceDiscovery.cpp. - SetServiceDiscoveryHandler now sets instead of adds: a participant has a single handler, and a later call replaces handler and context without replaying the known services. Setting the handler from within the handler fails with WRONGSTATE (C) / StateError (C++), also during the replay. CreateServiceDiscovery returns one observer per participant. - Drop isSnapshot from the service descriptor: it could only mean "known to this participant when the handler was set", not "existed in the simulation". The replay stays synchronous on the calling thread before Set returns, and the docs say so. The late-observer ITest no longer depends on that race. - A failure while replaying the known services is returned from SetServiceDiscoveryHandler as an error code; failures on later events are still swallowed. - The C++ hourglass trampoline no longer lets exceptions unwind through the C ABI: a std::exception from the user handler is logged as a warning through the participant logger, anything else is swallowed. - Docs: descriptor passed by pointer, labels empty when not applicable or not decodable, single-handler and threading contract for Set. - Tests: single-handler and nested-Set rejection (unit, hourglass), throwing user handlers (hourglass), replay before Set returns (unit). Signed-off-by: Marius Börschig <marius.boerschig@vector.com>
KonradBreitsprecherBkd
self-requested a review
October 23, 2026 07:31
KonradBreitsprecherBkd
approved these changes
Oct 23, 2026
KonradBreitsprecherBkd
left a comment
Contributor
There was a problem hiding this comment.
My concerns were addressed well.
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.
This service discovery API design aims to hide internals (Pub/Sub matching, Client/Server matching, Supplemental Infos / internal encodings) from the public.
Changes:
Linkevent, similar to NetworkSimulator linksalready added an hourglass on top (to see if the C design is sound)
Rebased and fixed memory saftey issues -> improvements will be in the PR stack on top