I have used Mongo GridFS and WeedFS to store media files before using NodeJS and now I would like to evaluate GlusterFS. I have found NodeJS module at https://github.com/qrpike/GlusterFS-NodeJS but examples shown below are confusing
var GlusterFS, gfs;
GlusterFS = require('glusterfs');
gfs = new GlusterFS;
gfs.peer('status', null, function(res) {
return console.log('Peer Status:', JSON.stringify(res));
});
gfs.volume('info', 'all', function(res) {
return console.log('Volume Info (All Volumes)', JSON.stringify(res));
});
In above example I do not get straight forward way to store media files as I do using gridfsstream at https://github.com/aheckmann/gridfs-stream or as weedfs node wrapper at https://github.com/cruzrr/node-weedfs.
Am I understanding GlusterFS wrong? I would like to have basic examples on how to store and retrieve files from GlusterFS through NodeJS API. Please help me on this. Thanks.
That module
qrpike/GlusterFS-NodeJS
can't do file operations. It only does administrative control. From the code the following lists the commands it supports:You need a different module.