Project

General

Profile

Actions

Feature #4230

closed

librados: node.js bindings

Added by Wido den Hollander about 11 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Category:
librados
Target version:
-
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

Although I don't have a use-case at this specific point it would be very cool to have node.js bindings.

From the docs it seems pretty simple to write these bindings and make cool stuff with it.

I'm just opening the feature here so that it shows up and can be picked up:

Some reference docs:

Without bindings you would be able to use node-ffi, but I think native bindings would be cleaner: https://github.com/rbranson/node-ffi

Actions #1

Updated by Alexandre Marangone about 11 years ago

Email was rejected by redmine. This was sent to ceph-devel:

----
Hi Wido,

Also cc'ing ceph-devel.

Few months ago I started to write node bindings to librados. No
specific use case either, just curious to learn a little bit more
about v8 and librados.

My first work was to do a 1:1 wrapping, but it wasn't javascripty enough.
I started over and was able to do stuff like:
var librados = require('./build/Release/nrados');
var rados = new librados.Rados({
'user': 'admin',
'keyring': '/etc/ceph/keyring',
'monitors': '[ 192.168.0.20 ]'
});

var ioctx = new librados.IoCtx();
rados.connect(function (err) {
if (err)
throw err;
rados.ioctx_create('mypool', ioctx, function (err) {
if (err)
throw err;
ioctx.write_full('myobject1', 'aa');
});
});
Which is better, but still, clumsy (I want to get rid of ioctx_create).
I need to put some thoughts into the overall design.

I didn't touch the code for about two months, and couldn't find it
this morning. As soon as I figure out where it is, I'll create a
github repo.

Of course, thoughts and suggestions are welcome.

--
Alexandre
---

Actions #2

Updated by Loïc Dachary over 9 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF