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

Example code for distributing read requests across EventStore DB nodes. #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dealproc
Copy link

@dealproc dealproc commented May 1, 2022

No description provided.


public class EventStoreClientPoolOptions {
public int MaximumReaderThreads { get; set; } = 3;
public int MaximumWriterThreads { get; set; } = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we don't expose the write operation , remove ?

Copy link
Contributor

@ylorph ylorph left a comment

Choose a reason for hiding this comment

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

  • Need
    • a README containing
      • what / how it does the work
      • when to use, when to not use.
      • caveats / gotchas / limitations if any
    • A small program demonstrating usage.
      • would be cool if it showed the diff between not using the pool & using it
  • samples might be in different languages , need to move this to a .net subfolder
  • the readme on the root folder needs to be adapted
  • the github actions needs to be adapted
  • no tests ?
  • I wonder what happens when
    • one of the nodes in a cluster would be replaced by a new one (i.e a completely new DNS name / IP address )
    • I'm reading a really long stream ( like a category stream )

_log.LogInformation("Setting leader connection to {@leaderUri}.", leaderUri);
var grpcClientSettings = EventStoreClientSettings.Create($"{_options.LeaderUri}");
grpcClientSettings.DefaultCredentials = _options.DefaultCredentials;
grpcClientSettings.ConnectivitySettings.NodePreference = Client.NodePreference.Leader;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
grpcClientSettings.ConnectivitySettings.NodePreference = Client.NodePreference.Leader;
grpcClientSettings.ConnectivitySettings.NodePreference = NodePreference.Leader;

Otherwise it does not build

@ylorph
Copy link
Contributor

ylorph commented May 2, 2022

Wondering if this should go into the .net client library repo
what do you thing @dealproc ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants