Skip to content
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

PR for changes to SocketUTransport to make it compatible with 1.5.8 #64

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

debruce
Copy link
Contributor

@debruce debruce commented Jul 1, 2024

This PR provides an implementation for L1 transport on a TCP socket to and from a standalone python script using Dispatcher. This was validated using a standalone C++ program exercising publishing and seeing corresponding subscription callbacks.
The heart of the implementation is a single socket connected to the dispatcher, and an unordered_map whose keys are a required UUri and an optional filtering UUri, and whose values shared pointers pointing to a list of listeners for that uuri combination. The test code used to verify this is not a part of this PR.

@gregmedd gregmedd linked an issue Jul 10, 2024 that may be closed by this pull request
@debruce debruce force-pushed the feature/socketUtransport branch 2 times, most recently from 6fc7268 to 04459c0 Compare July 16, 2024 17:56
@debruce debruce marked this pull request as ready for review July 16, 2024 17:57
@debruce debruce changed the title Draft PR for changes to SocketUTransport to make it compatible with 1.5.8 PR for changes to SocketUTransport to make it compatible with 1.5.8 Jul 16, 2024
Copy link
Contributor

@gregmedd gregmedd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me


I really don't have any complaints. The socket code all looks correct, locking is where it needs to be, the metaprogramming for the tuple hash looks right. There are a few small cleanup items, but none of them are really a dealbreaker.

I see no reason this could not be merged.

up_client_socket/cpp/include/SocketUTransport.h Outdated Show resolved Hide resolved
up_client_socket/cpp/src/SocketUTransport.cpp Outdated Show resolved Hide resolved
up_client_socket/cpp/include/WakeFd.h Outdated Show resolved Hide resolved
up_client_socket/cpp/include/WakeFd.h Outdated Show resolved Hide resolved
@gregmedd
Copy link
Contributor

One more minor comment: you could squash the commits now that you know it builds.

@debruce debruce force-pushed the feature/socketUtransport branch 5 times, most recently from 067b713 to 04e6a7f Compare July 29, 2024 15:37
@debruce debruce force-pushed the feature/socketUtransport branch 5 times, most recently from f99f0aa to 00b4399 Compare July 29, 2024 20:39
Copy link
Member

@agosh01 agosh01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@gregmedd gregmedd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave this another quick looking over. I think it is ready to merge.

This PR implements a socket transport to the python dispacther script,
and necessary data structures for listener callbacks and callback
removal. The high level code is a private implementation in
SocketUTransport.cpp. The unordered_map supporting callbacks is in
SafeTupleMap.h. The details of this is std::hash extensions to hash
tuples of optionals for filtering with wildcards.
@gregmedd gregmedd merged commit 0395b91 into eclipse-uprotocol:main Jul 30, 2024
3 checks passed
@debruce debruce deleted the feature/socketUtransport branch July 31, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Port up-tck C++ socket transport to 1.5.8 API
3 participants