Reputation: 1696
I am in the process of building a StatefulService and I'd like to store the data in a reliable collection
My class looks like this:
public class Item
{
public string Value { get; set;}
public int Count {get; set;}
public string[] Metadata {get; set;}
}
I am storing it in the following dictionary:
IReliableDictionary<string, Item>
where the key is a string.
To speed queries I can use the indexing extensions: https://github.com/jessebenson/service-fabric-indexing
What I am not sure about is how to create indexes for the collection of metadata so that given a string I can have retrieve all the Item object that have that string as metadata.
So far the only idea I came up with has been to create a
IReliableDictionary<string,string[]>
where the key is the metadata and it returns an array of keys I can use to retrieve the Items from the first collection.
Any better ideas?
Upvotes: 0
Views: 96