Persistent Binary Tree / Hash table in .Net [closed]
Asked Answered
I

4

5

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: Looking for a simple standalone persistent dictionary implementation in C#

Paul

Iinden answered 20/9, 2008 at 15:11 Comment(4)
Are you saying you want a database? Or that you want to be able to write a hash table to disk & read it back again? Or something else?Samaria
I need a purely .Net based system similar to berkeley db.Iinden
Can you please link to my question #100735Prudhoe
It isn't clear what you mean by "persistent" - from your comments it sounds like you want something stored on disk, but a "persistent" data structure in computer science is something else, e.g. see this "persistent hash tree" for C#Preraphaelite
M
3

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

Miler answered 20/9, 2008 at 22:19 Comment(1)
Thanks for the link, but that is just a wrapper of the c implementation. I am looking for a purely .net based solution.Iinden
C
1

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)

Clinker answered 20/9, 2008 at 17:11 Comment(1)
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.Iinden
C
1

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.

Clinker answered 6/10, 2008 at 2:25 Comment(1)
One use case I have would actually fit lucene.net pretty well. thanks for the rec.Iinden
E
0

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.

Emileeemili answered 20/9, 2008 at 16:32 Comment(1)
That would be ok perhaps for small collections, but I need to scale to the TB region.Iinden

© 2022 - 2024 — McMap. All rights reserved.