orleans icon indicating copy to clipboard operation
orleans copied to clipboard

Add configuration support for ISiloBuilder to TestClusterBuilder

Open erikljung opened this issue 7 years ago • 6 comments

Hi, in order to configure common options for a "test silo" and a "real silo" -- it would be great if there was some way to configure a ISiloBuilder in the same way as TestClusterBuilder.AddSiloBuilderConfigurator<T>() is working today.

erikljung avatar Mar 22 '19 16:03 erikljung

Thanks for the suggestion, but I'm not entirely sure what you mean. Are you suggesting that a new feature of something like TestClusterBuilder.AddSiloBuilderConfigurator<T>() but for "real silo"? So for example. it would be useful in scenario like, mulitple applications share the same common base silo configuration, but at the same time have different configuration on top of the base one?

xiazen avatar Mar 26 '19 20:03 xiazen

So an example of what I mean: I will have an application with a implementation of a Silo - A program which uses new HostBuilder().UseOrleans(HostBuilderContext, ISiloBuilder) where I will configure the ISiloBuilder according to my needs. In addition I will have a test project to verify the implementation above, where I will configure new TestClusterBuilder(), which exposes ISiloBuilderConfigurator for configuration.

I would like a more aligned way to do common configuration for both the ISiloBuilder and the TestClusterBuilder(). I would like to not duplicate all configuration for test and the real implementation. I am however not sure how this should be achieved from the point of current design principles.

erikljung avatar Mar 27 '19 10:03 erikljung

An example where this seems to work "better" is TestClusterBuilder.AddClientBuilderConfigurator<>(); where the configurable type IClientBuilder is the same from a test and real implementation scenario.

erikljung avatar Mar 28 '19 12:03 erikljung

Are you saying, right now TestClusterBuilder only has AddSiloBuilderConfigurator for ISiloHostBuilder, you want that for ISiloBuilder as well?

xiazen avatar Mar 28 '19 18:03 xiazen

In my view we should replace the existing ISiloHostBuilder usage with ISiloBuilder for TestClusterBuilder and all related infrastructure.

At the same time we should consolidate ISiloHostBuilder and ISiloBuilder across the codebase since ISiloBuilder is stable and has proven its worth

ReubenBond avatar Jul 15 '19 15:07 ReubenBond

Opened #6250 with an implementation of this

ReubenBond avatar Jan 20 '20 21:01 ReubenBond