internalfx / rethinkdb-regrid Goto Github PK
View Code? Open in Web Editor NEWA file storage system for RethinkDB inspired by GridFS
License: ISC License
A file storage system for RethinkDB inspired by GridFS
License: ISC License
We are forking the RethinkDB database and since this is a important project to support in my opinion, I'd like to know if we could do it under RebirthDB org, so it gets more visibility.
Is there a way to remove a file, so that the space used for it in the database is reclaimed?
Also, is there a way to control how many revisions should be kept?
How to reproduce...
let wstream = bucket.upload(`myfile`)
wstream.write(myBuffer) // any buffer that is larger than `chunkSizeBytes`
wstream.end()
Chunks larger than chunkSizeBytes
are written
I'm trying to wrap my head around how this works here.
Currently, I'm using:
https://github.com/expressjs/multer
to upload my files and I'm saving them straight to disk. I like the performance nginx offers when serving static files:
http://blog.modulus.io/supercharge-your-nodejs-applications-with-nginx
Is it possible to upload my files using regrid and then serving the files through nginx?
This is probably surprising behavior.
I'm having a hard time understanding the docs. For example, the text refers to 'id', 'fileId' and 'filename' and it's not clear which should be used in which context. For example, createWriteStream() accepts a filename, but createReadStream() wants an id. If id is different than a filename, then how do I find what is the id of the file that I just wrote?
Also, the docs refer to functions like 'upload' which apparently no longer exist.
Hey @internalfx please how possible is to add a fuse mountable point in regrid.
Going through this issue rethinkdb/rethinkdb#2647 . I think there is a possibility of making rethinkdb mountable as fuse filesystem. Please can you add a fuse mount point to it. We are not familiar with nodejs and c-sharp which are the two drivers available now for regrid . But i think with fuse it would be more easier and will adapt to most applications
Hey @internalfx i am just thinking the horizon project might be nice if we could use it with regrid.
Have you tried seeing how you could integrate regrid with horizon. And horizon is backed by rethinkdb, i think one of the important solutions still missing in it is regrid.
Could you take a look and see if it could integrate seamlessly. https://github.com/rethinkdb/horizon
Secondly, what about supporting some of rethinkdb supported api languages like javascript and python, and php could be really nice too.
Hi,
with the following code the table 'example is not being created in RethinkDB. For testing purposes I changed the table name in your test code and those tables are not being created as well. Any idea ?
Cheers, Mike
var ReGrid = require('rethinkdb-regrid')
var bucket = ReGrid({db: 'example'})
// initBucket creates tables and indexes if they don't exist, returns a promise.
bucket.initBucket().then(function () {
// We are now ready to read and write files
// Watch a filename for changes
bucket.watchFilename('/videos/myVid.mp4').then(function (cursor) {
cursor.each((err, changes) => {
console.log(changes)
})
})
The spec mentions a deletedAt
field but it's not being set by the delete()
function.
This looks like a pretty awesome project. Is there a built in test to measure performance of files?
Hi all
Is it possible to give the readstream (download function) a start/end range to retrieve a chunk of a file like in gridfs (mongodb)?
var fileID = '661ec4ac-2afa-404b-88ca-c566394d07af';
var rangeOptions = { start: 0, end: 28930};
var file = bucket.downloadId(fileID, rangeOptions);
something like this?
Thanks
What would be the best way to implement thumbnails? Basically they are derived data that can be created lazily on first read, but then cached.
How to ensure the thumbnail cache remains current, removing the thumbnail on file update or removal? Should there be a cache invalidator that listens to all file changes?
It would be great if the project had Typescript definitions.
Otherwise, using this library with TS is a real pain in . . .
The commit f6333ce changed the RethinkDB query from a delete()
to an update()
. The next line return result.deleted === 1
should be updated to return result.replaced === 1
or something like that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.