What do people want in a persistent .NET Dictionary?
.net, c#, database, dictionary, persistence
Solution
I've published the PersistentDictionary on Codeplex. This only supports serializing structures, but I will work on a different data structure that supports storing and retrieving arbitrary objects.
https://github.com/microsoft/managedesent
Problem
I'm implementing generic, persistent .NET collections based on top of the ESENT database engine (using the ManagedEsent interop layer). So far I have been focusing on classes that exactly mimic their System.Collections.Generic counterparts, except that they take a path in the constructor indicating where the database should go. Code like this is working: ``` using Microsoft.Isam.Esent.Collections.Generic; static void Main(string[] args) { var dictionary = new PersistentDictionary<string, string>("Names"); Console.WriteLine("What is your first name?"); string firstName = Console.ReadLine(); if (dictionary.ContainsKey(firstName)) { Console.WriteLine("Welcome back {0} {1}", firstName, dictionary[firstName]); } else { Console.WriteLine("I don't know you, {0}. What is your last name?", firstName); dictionary[firstName] = Console.ReadLine(); } } ``` My questions are: - Other than compatability with Stack, Queue and Dictionary what features do people want/need in persisted collections? - Should I require version 2.0 or version 3.5 of the .NET framework? - The key and value types are both restricted to the basic .NET types (bool, byte, [all the integers], float, double, Guid, DateTime and string). I might add support for values which are serializable structures. Is this type restriction too painful? - What kind of performance benchmarks do people want to see? - What kind of applications do people want to use a PersistedDictionary for? I will have the first release ready next week, but I want to make sure I'm building the right thing.