Skip to content

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

Open
dealproc wants to merge 1 commit into
mainfrom
client-pool
Open

Example code for distributing read requests across EventStore DB nodes.#19
dealproc wants to merge 1 commit into
mainfrom
client-pool

Conversation

@dealproc

@dealproc dealproc commented May 1, 2022

Copy link
Copy Markdown

No description provided.


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

Copy link
Copy Markdown
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 ?

@ylorph ylorph left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

ylorph commented May 2, 2022

Copy link
Copy Markdown
Contributor

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

@CLAassistant

CLAassistant commented Aug 1, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

3 participants