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

Add .NET client for dynamic pubsub subscriptions #1346

Closed
wants to merge 46 commits into from

Commits on Sep 4, 2024

  1. First pass implementing standalone pubsub client for Dapr (focusing o…

    …n using streaming subscriptions).
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    86a6c1c View commit details
    Browse the repository at this point in the history
  2. Added missing copyright notice

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    849a828 View commit details
    Browse the repository at this point in the history
  3. Fleshing out comments

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    2d73e69 View commit details
    Browse the repository at this point in the history
  4. Added Dapr.Protos project to solution as a central place to put the D…

    …apr prototypes
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    bed6e4d View commit details
    Browse the repository at this point in the history
  5. Added Nuget properties to project

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    bdc5a03 View commit details
    Browse the repository at this point in the history
  6. Restored missing using

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    1f43315 View commit details
    Browse the repository at this point in the history
  7. Updated to use the standard Dapr client builder, added DI registratio…

    …n extension methods.
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    0bab52c View commit details
    Browse the repository at this point in the history
  8. Minor tweaks to conform to solution style

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    90fe7b0 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5e751db View commit details
    Browse the repository at this point in the history
  10. Tweak to README to include additional package names

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    6d5ed77 View commit details
    Browse the repository at this point in the history
  11. Added test project for Dapr.Messaging

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    32ce9be View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2024

  1. Added missing copyright statement

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    0852650 View commit details
    Browse the repository at this point in the history
  2. Updated naming in file to match solution convention. Fleshed out miss…

    …ing XML comment.
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    0cb3815 View commit details
    Browse the repository at this point in the history
  3. Conforming to naming conventions

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    7edb9c5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e3491b4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    219d458 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1847ca9 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2024

  1. Added public key to InternalsVisibleTo annotation

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    848c490 View commit details
    Browse the repository at this point in the history
  2. Significantly simplified dynamic pubsub implementation

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    b6810b0 View commit details
    Browse the repository at this point in the history
  3. Handling cancellation token timeout with configured action

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    04fa4d5 View commit details
    Browse the repository at this point in the history
  4. Updated name of method so it wouldn't be as confusing why the develop…

    …er would have two back-to-back invocations of SubscribeAsync (especially since it's not an async implementation at the Grpc client level.
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    d165b14 View commit details
    Browse the repository at this point in the history
  5. Added another message handler to facilitate channel draining in case …

    …of cancellation where there's a buffer in the Channel
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    5c3e1ce View commit details
    Browse the repository at this point in the history
  6. Handling potential race condition, corrected return type to be Publis…

    …hSubscribeReceiver instead of IAsyncDisposable
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    85ef0f8 View commit details
    Browse the repository at this point in the history
  7. No longer limiting a single subscriber for each component/topic combi…

    …nation
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    218f604 View commit details
    Browse the repository at this point in the history
  8. Eliminated restriction for one subscription per component/topic. Adde…

    …d channel to the shared ConnectionManager to handle message acknowledgements and to process inbound acknowledgements sequentially to the shared stream instead of from each separate receiver.
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    a7c4d5d View commit details
    Browse the repository at this point in the history
  9. Updated to latest protos

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    152c14e View commit details
    Browse the repository at this point in the history
  10. Updates to implementation to reflect latest protos

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    3af961a View commit details
    Browse the repository at this point in the history
  11. Removed unused method

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    6e17cd3 View commit details
    Browse the repository at this point in the history
  12. Removed unused usings

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    562298b View commit details
    Browse the repository at this point in the history
  13. Added the only unit test I could identify that is within capabilities…

    … of the current mocking technology (e.g. can't mock static or sealed types)
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    448c89b View commit details
    Browse the repository at this point in the history
  14. Fixing accessibility problem

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    e18e49c View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    033a27a View commit details
    Browse the repository at this point in the history
  16. Retargeting to .NET 6 instead of .NET 8

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    d8969d0 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    a9f645c View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. Removed singleton ConnectionManager as non-conforming to the spec. Ad…

    …ded flag to ensure double-subscription doesn't happen to cancel stream (with multiple initial requests), updated message draining during disposal and updated unit tests.
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    d0efaed View commit details
    Browse the repository at this point in the history
  2. Added default cancellation token value

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    dd22e83 View commit details
    Browse the repository at this point in the history
  3. Minor refactoring so cancellation exceptions can be handled in a sing…

    …le try/catch block instead of having more than one
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    521396f View commit details
    Browse the repository at this point in the history
  4. Refactoring to ensure that channels are drained successfully even if …

    …cancellation token throws. Minor perf improvments as spotted. Added/fixed comments.
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    ef418c0 View commit details
    Browse the repository at this point in the history
  5. Cleaning up unnecessary iniitalization values, usings and null access…

    … operators
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    3addf75 View commit details
    Browse the repository at this point in the history
  6. Modified message drain to only drain acknowledgements and even then, …

    …be constrained by a configurable timespan in how long it waits. Added some try/catch blocks to handle messages being written when the writer has been completed in case a Disposal happens mid-processing.
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    1cb6855 View commit details
    Browse the repository at this point in the history
  7. Updated to eliminate the double call for 'Register.SubscribeAsync' as…

    … the GrpcClient creates the PublishSubscribeReceiver, then calls SubscribeAsync internally. Renamed Register to `SubscribeAsync` and updated return type + example
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    462e9a1 View commit details
    Browse the repository at this point in the history
  8. Removed unnecessary call to DisposeAsync

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    f16effc View commit details
    Browse the repository at this point in the history
  9. Updated to apply some performance improvements to the channels at ins…

    …tantiation. Added support to let developer specify a maximum number of messages that can be queued for processing (blocking new Dapr from submitting more to the replica) and tweaked how messages are written in the subscription loop to accommodate this.
    
    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    67a637b View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2024

  1. Added cancellation token to acknowledgement channel writer

    Signed-off-by: Whit Waldo <[email protected]>
    WhitWaldo committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    a67185d View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2024

  1. Configuration menu
    Copy the full SHA
    ce5b24a View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2024

  1. Configuration menu
    Copy the full SHA
    6db55c4 View commit details
    Browse the repository at this point in the history