Issue/686 part 2 - #764
Conversation
…olittle#686 Exceptions from the following calls will be forwarded to anything implementing IExceptionSubscriber - queries - commands - sagas - calls to rest handlers Original issue: ProCoSys#9
From the ProCoSys fork. Instead of depending on IInstancesOf<T>, any implementation can depend on IOrderedInstancesOf<T> instead. By doing this, the ordering of Ts are guaranteed: Implementations of T can specify their ordering, either explicitly by and Order attribute, or implicitly via an After attribute.
…olittle#686 Exceptions from the following calls will be forwarded to anything implementing IExceptionSubscriber - queries - commands - sagas - calls to rest handlers Original issue: ProCoSys#9 # Conflicts: # Source/Bifrost/Bifrost.csproj
|
Could this be split into 3? The CommandHandlerInvoker part (42be6f0) is the least intrusive. The OrderedInstancesOf part I'd like to discuss. Need to understand the need and the implications, as it feels a bit "un-bifrosty" with regards to it creating couplings - and attributes are something we've been trying to avoid for that reason. The IExceptionSubscriber is very interesting and in line with thoughts I've been having and I want to pursue that one for general diagnostics purposes and maybe take it in a slightly different direction. |
|
|
..say you have a processor that takes an object and sends it to multiple other instances (very common scenario). If the order is not important, this class is simply However, if there are dependencies between any of these objects (for any reason, believe me, we had many examples of this in the ProCoSys code base), the simplest implementation is: ..leading to one interface per processor, and strong coupling between Processor and these interfaces. Any addition or removal of processors leads to a change in this class. (And in the ProCoSys Import project we had classes forwarding to 10-15 other classes like this.) So I propose IOrderedInstancesOf to solve this problem, reducing Processor again to with the only other change to either
And the cost is that in any case, one of these must reference Bifrost.Execution, and in the second I think this cost is in many cases justified. |
|
Great. Thanks, lets keep the IOrderedInstances and IExceptionSubscriber thing here for now. I will put these on the agenda for the community standup on Monday to be discussed. Easier to understand the requirement I think. |
Continuing on #686