Ben
❔ Naming Conventions N-Tier architecture, conflicts?
If thats an a-ok practice I'll keep it as is and write the namespaces explcity when needed.
In regards to your structure, I don't feel comfortable enough to put all my trust on the namespace 😅
Thanks!
8 replies
❔ MongoDB Update nested elements
Your query will return all the documents.
As Events always exists (might be an empty array though).
What I did was -
Events:{$ne: []}
Which basically search for all the documents where events not equal to an empty array. meaning it has nested elements15 replies
How to locally loadbalance threadsafe [Answered]
Ok so instead of reseting the indexCounter you modulo it with the length of the array. makes sense, not really worried about overflow each instance won't be surpassing the 1-2 million.
Using
Interlocked.Increment
means that a lock is in place on every update so it makes the indexCounter
incremental thread-safe, correct?
It shouldn't affect performance as such a basic operation won't hold the lock?
That being said, I can abandon the index counter and use concurrent queue to manage that for me if I dequeue and enqueue before awating the request?
Something like -
What do you think? @Xymanek19 replies
differentiating use cases- Enum vs Tuple vs Array
I'll start off by reading what each type is.
As all 3 do not serve the same purpose at all.
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/enum
I'm sure that after reading the doc of each type you'll have a better understanding or a more specific question to follow up with.
16 replies