Orleans: ClientBuilder equivalent for .UseOrleans()

Created on 27 Jul 2020  路  3Comments  路  Source: dotnet/orleans

It would be very nice to have an extension method for the IHostBuilder that injects IGrainFactory or IClusterClient without hosting the silo. Currently we have to make sure all the network connection plumbing works and inject the client on our own. Something like .UseOrleansClient() would let us configure the ClientBuilder but take away the responsibility of maintaining a connection / reconnecting.

What are your thoughts?

help wanted

Most helpful comment

@ReubenBond I will allow myself to submit a PR spike, but please expect that I may need guidance.

All 3 comments

Good idea

I agree, I think this would be beneficial. There are other projects out there which do add support for this today, for example: https://github.com/OrleansContrib/Orleans.MultiClient

I am still willing to have something built in, and I think it would be a good contribution. One requirement: UseOrleans and UseOrleansClient are mutually exclusive (can't have both on the same IServiceCollection or IHostBuilder), so the support must detect that and throw as soon as possible if the user makes that mistake.

@ReubenBond I will allow myself to submit a PR spike, but please expect that I may need guidance.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pherbel picture pherbel  路  4Comments

Liversage picture Liversage  路  4Comments

gabikliot picture gabikliot  路  4Comments

zhoujijian picture zhoujijian  路  5Comments

danvanderboom picture danvanderboom  路  3Comments