views:

1570

answers:

4

Hi,

I need a pure .Net persistent hashtable/binarytree, functionally similar to berkeley-db Java edition.

Functionally it should opperate in a similar maner to a DHT such memcached and velocity etc but it doesn't have to be distributed. In essence I am looking for a persistent hashtable.

Does anyone have any ideas or suggestions?

A similar question is also here: http://stackoverflow.com/questions/100235/looking-for-a-simple-standalone-persistant-dictionary-implementation-in-c

Paul

A: 

Have you tried using the build in collections in System.Collections.Generic? And using serialization to push that puppy out to an XML document or something of the like.

That would be ok perhaps for small collections, but I need to scale to the TB region.
Kinlan
+1  A: 

You might consider the Caching Application Block or System.Web.Caching. Both have methods for connecting them to a SQL Server database as the backing store.

The other method would be to simply serialize the object using a XML or Binary Formatter. (which can be used for deep cloning by the way)

Greg Ogle
thanks for the thoughts, but neither of these are the answer.Essentially, the berkely db is a persitent binary tree or hash table and can be many TB in size. The thing about the bdb is that it is an embedded db, which is what I need, so sql server is out of the question too.
Kinlan
+1  A: 

How about this? SourceForge.net: Berkeley DB for .NET

Omer van Kloeten
Thanks for the link, but that is just a wrapper of the c implementation. I am looking for a purely .net based solution.
Kinlan
+1  A: 

As an alternative, you might look into using an index engine such as Lucene.net.

The thing it would give you over a List would better indexing and I believe capacity, though that is not really the intended usage. The intended usage is to parse files, yet can also be used to parse databases. At my previously work place, they used Lucene (java implementation) to index our product catalog by categories from database data.

Greg Ogle
One use case I have would actually fit lucene.net pretty well. thanks for the rec.
Kinlan