Conversation
|
@migajek I don't think this code does any harm per se, but can you explain a little bit more what that race condition is? How did you get that? And ImTools is significantly faster than ConcurrentDictionary, hence it's usage all over Wolverine and Marten |
|
Understood. I assumed they're still more performant especially since these collections are mostly read. For the circumstances - you're gonna hate the answer ;) The call chain: Obviously the quick remedy for the issue was to register all response types upfront, but unless uprfront registration is a requirement, I'd go with bullet-proofing the HandlerGraph |
|
Makes sense, but also: Just so you and anyone who reads this knows, the Wolverine team most certainly does not recommend building an application like this: Just don't do that. Way too much indirection. |
|
Thanks, but to make things clear - we're not doing anything like |
|
@migajek Just potentially slow. Doing request/reply through Wolverine (really through any service bus) is going to incur more latency than an HTTP call would. Probably a little more efficient to go purely async if you can. Just so you know, I'm going to pull this into main now that's for 5.0. I'll cherry pick this over to 4.0 in the next day or two for whatever the next 4.* bug fix release is |
|
thank you, both for the advices and the cherry-pick. cheers |
Please note - I lack ImTools experience, so I'm not sure ImTools + lock is still better choice over regular ConcurrentDictionary