CoreyKaylor / Lightning.NET

.NET library for LMDB key-value store
Other
399 stars 82 forks source link

Small example #29

Closed runaum closed 9 years ago

runaum commented 10 years ago

First of all, i'm sorry for my primitive English. Can you wrote a small example of Lightning.NET using? And maybe best practices. It's really difficult to understand .NET wrapper now. I looked at Java/Ruby wrappers - they are more understandable.

My task is a highload cache (single thread now), up to 32 Gb. I tried a classic way: create an environment, set an environment settings, create transaction, open database, than start to put my data via transaction (key: long, value: double[2]). Everytime I've got an error somewhere in the lmdb64.dll on ~100k iteration.

Thank you for your work, but we need a little bit more information about using.

ilyalukyanov commented 10 years ago

Excuse me for not answering for this long. Your English is pretty fine so it's nothing to sorry for. Please don't close this issue as the library definitely lacks some docs and for sure they should be written. The issue will remind me this necessity. I will take a look on your problems and comment in the other issue.

Ruslebiffen commented 9 years ago

Nothing new here? Interested in trying out LMDB, but there's hardly any info to find about it at all, let alone examples.

CoreyKaylor commented 9 years ago

I think starting with the dnx branch the unit-tests by themself do enough to demonstrate the API usage. I don't think there's much of a learning curve on how to use Get, Put, and foreach statements.

https://github.com/ilyalukyanov/Lightning.NET/tree/dnx