my8bird / node-leveldb

NodeJS bindings to levelDB - a fast and lightweight key/value database library
http://code.google.com/p/leveldb/
BSD 2-Clause "Simplified" License
63 stars 12 forks source link

port to 0.7 to be ready for 0.8 #4

Closed my8bird closed 12 years ago

mikepb commented 12 years ago

Hey, I'm working on a separate branch with a simpler C++ API: https://github.com/mikepb/node-leveldb/tree/minimal-binding-api

The core library seems to work, but isn't thoroughly tested yet. Iterators don't work, neither does approximateSizes. My goal for this branch is to keep the native side simple and use JS when possible.

I also merged in the leveldb code on this branch to work with NPM again.

Cheers.

my8bird commented 12 years ago

awesome keep me posted if you need anything.

mikepb commented 12 years ago

All tests pass and I streamlined the build process to support npm (I think). When you get the chance, could you take a look and try it out?

https://github.com/mikepb/node-leveldb/tree/minimal-binding-api

my8bird commented 12 years ago

I got it pulled over and fixed up the package.json to use the project deps instead of globally installed ones. i also had to put the node-waf build step back in since the cakefile failed to run it, at least I assume you meant the Cakefile to run waf. I have not used a Cakefile before so i did not want to screw it up.

The tests seem to work well but the demos are broken on this branch and that is where an API change would be easiest to see and assess. Unfortunately, time is for me is horribly limited right now so is as far as I got so far.

One thing that would go along way in helping others would be commenting the coffee scripts in src/leveldb.

Here is the package.json changes I did: https://github.com/my8bird/node-leveldb/commit/1feb51e48b66c4d5657549711585dd68b201aef8

hopefully this weekend i will have some more time.

mikepb commented 12 years ago

The preinstall script actually isn't needed

mikepb commented 12 years ago

leveldb::Iterator is also not thread-safe, so I added a iterator-level lock to fix it.

my8bird commented 12 years ago

All builds are green for @mikepb new api branch and it is the new head.