orleans icon indicating copy to clipboard operation
orleans copied to clipboard

Silo should validate if a PubSubStore is configured or not before starting

Open attilah opened this issue 8 years ago • 7 comments

Issue: When you setup the streaming, but not adding a storage with the baked in name of "PubSubStore", the Silo starts without errors and then later, when it needs to access the store to persist a subscription it fails during runtime.

Solution: Add additional validation if a "PubSubStore" is registered in DI or not. If not, fail early with configuration exception.

Nice to have: Make "PubSubStore" provider name configurable

attilah avatar Mar 12 '18 22:03 attilah

Make "PubSubStore" provider name configurable

Already spoke with @jason-bragg about that. Unfortunatelly it is not simple right now. Probably when the revamp happens on Stream APIs we get it outsourced.

galvesribeiro avatar Mar 12 '18 23:03 galvesribeiro

Probably when the revamp happens on Stream APIs we get it outsourced.

not sure what triggered this conclusion. the name "PubSubStore" is always hard coded to be the pubsubgrain state store name. This doesn't change after streaming api revamp. How easy to make it configurable doesn't have much to do with streaming, it is how to make a grain state storage name configurable. So I don't quite understand what @galvesribeiro 's points. Mind explain more ?

xiazen avatar Mar 20 '18 23:03 xiazen

@attilah I think we can add a validation to see if a "PubSubStore" grain storage is registered into DI. should be trivia, and also bring a lot benefits to users. I personally tripped on this from time to time.

xiazen avatar Mar 20 '18 23:03 xiazen

@xiazen, @galvesribeiro, I'll leave the clarification of galvesribeiro's post to him, but the requirement that a user needs be aware that a particular implementation of the pubsub system uses grains which use a specific grain state storage named "pubsubstore" (which needs be configured) is very cryptic and unintuitive. This implementation detail is unrelated to the public stream surfaces, but is the type of shortcoming that should be addressed if we revamp streams.

Recent (and future) refactoring of components allow more options. For instance, if the pubsub grains used storage facets, the name of the grain storage could be configured, rather than being required to always be "pubsubstore". This would be much more intuitive and flexible.

jason-bragg avatar Mar 21 '18 00:03 jason-bragg

@xiazen

the name "PubSubStore" is always hard coded to be the pubsubgrain state store name

I know, and that is the problem.

@jason-bragg

I'll leave the clarification of galvesribeiro's post to him

Don't need to. As always, you did that for me! 💃

galvesribeiro avatar Mar 21 '18 01:03 galvesribeiro

submitted a pr #4273 to add the validation.

xiazen avatar Mar 21 '18 21:03 xiazen

fixed in #4273

xiazen avatar Mar 23 '18 17:03 xiazen