Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
bdb-fork-grimen
Advanced tools
Readme
This library provides node bindings for the Berkely Database (BDB).
Here's a 100% plagerized answer from the BDB docs:
BDB is a general-purpose embedded database engine that is capable of providing a wealth of data management services. It is designed from the ground up for high-throughput applications requiring in-process, bullet-proof management of mission-critical data. BDB can gracefully scale from managing a few bytes to terabytes of data. For the most part, BDB is limited only by your system's available physical resources.
BDB is a proven technology that gives you great read/write performance and offers you real durability (since it's transactional write-ahead-logging).
It seems a popular pattern for node.js is to maintain smaller services that are offloading some performance or scaling critical portion of your webapp, but node doesn't come with any way for you to store data, leaving you with the problem of what to do with it. BDB is an extremely effecient in-process database, that you can wed to node.js to get high-throughput storage with full ACID guarantees.
npm install bdb
(You can also install it by doing node-waf configure build
and then
linking or copying the folder into your project's node_modules
directory.)
Note that this will also build a static version of BDB, and will place BDB utilities in your $NODE_PATH/bin. So, if you've already got a BDB on your system in that path (like, oh say /usr/bin), this is going to end badly for you. If you've got a version of BDB on your system, there are --shared-bdb-[include/libpath] options you can pass in at configure time. That will skip the static library compilation, and not lay down any of the BDB utilities.
So, if that crazy awesome intro got you all fired up on BDB, by now you've gone and already looked at the BDB documentation. Assuming that you have some knowledge of the C API, the node bindings are a pretty thin JS wrapper over them. However, there are a few important notes to be aware of with the node environment; since node is written to abstract away concurrency from you, and BDB is written to assume you have complete control over your concurrency model, there are some complications:
Other information:
To load the library:
var bdb = require('bdb');
Note that most any API supported here that in BDB has 'flags' or NULL
parameters is wrapped up with an options Object
. You'll of course be taking
my defaults if you don't specify a given field. In every case the convention
is that you can directly get at the underlying bdb api by prefacing the method
name with an _
. For example:
db.getSync({key: key}); ==>
db._getSync(undefined, key, 0);
Loading:
var env = new bdb.DbEnv();
env.openSync({home: '/path/to/your/env'});
env.closeSync();
What's supported:
openSync(options)
closeSync(options)
setLockDetect(policy)
setLockTimeout(timeout)
setMaxLocks(max)
setMaxLockers(max)
setMaxLockObjects(max)
setShmKey(key)
setTxnMax(max)
setTxnTimeout(timeout)
txnCheckpoint(options, callback)
Loading:
var db = new bdb.Db();
db.openSync({env: env, file: 'db_file_name'});
db.closeSync();
What's supported:
openSync(options)
closeSync(options)
put(options, callback)
get(options, callback)
del(options, callback)
putSync(options)
getSync(options)
delSync(options)
All the bindings I'm putting out as MIT, but you really need to be aware of the BDB license. BDB is put out under a dual-license model: Sleepycat and commercial. IANAL, but effectively the sleepycat license has a copy-left clause in it that makes any linking to BDB require your application to be open sourced if you redistribute it. You can opt to license BDB under a commercial license if those terms don't suit you.
FAQs
Berkeley DB(5.X) bindings for node
The npm package bdb-fork-grimen receives a total of 1 weekly downloads. As such, bdb-fork-grimen popularity was classified as not popular.
We found that bdb-fork-grimen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.