Dropping Data Structures into the Pit of Success

time to read 2 min | 214 words

As part of the work that I am doing for Rhino ServiceBus, I am also creating a few data structures.

image No, I haven't gone mad and decided that it is a good idea to write my own linked list, but I have discovered that there are several patterns that I am using that require some potentially tricky coding, so I decided to gather them into a single place so I wouldn't have to do this again.

It is important to note that those are not actually data structures that I am using inside Rhino ServiceBus, rather, those are data structures that I expect users of Rhino ServiceBus to use.

Currently I have LRU Set and thread safe dictionary. Both of which, mind you, are following a completely different approach that the usual approach that you would see in standard collections.

Here is an example of how this can be used:

dic.Write((add,remove) =>
    add("a", 5);
    add("c", 6);

It also try to provide an interface that is as small as possible, because I don't want to give flexibility here. There are very specific use cases for those data structures.