On 21/05/14 00:00, Matt wrote:
What options are out there currently for streaming blob support in Node.js 
databases?

I know that MongoDB has GridFS which seems to support streams. Are there any 
others?

I suppose you mean "DBMS supported by Node,js", rather than "Node.js databases".

Anyway, I streamed successfully fairly sizeable binary attachments (600MB) to/from CouchDB with Nano (Node.js driver for CouchDB), by piping directly to the response (or, conversely, from the request body to the attachment):

var stream = datastore.db.attachment.get(docid, "blob",
                    function(errStream) {
                      if (errStream) {
                        datastore.commons.logger.error(
                            "Doc. %s load attachment error: %s", docid,
                            errStream.message);
                        return datastore.swagger.stopWithError(res, {
                          code : 500,
                          reason : errStream.message
                        });
                      }
                    });

                if (stream) {
                  stream.pipe(res);
                } else {
                  return datastore.swagger.stopWithError(res, {
                    code : 500,
                    reason : "Error creating stream"
                  });
                }
...

Regards,

Luca Morandini
Data Architect - AURIN project
Melbourne eResearch Group
Department of Computing and Information Systems
University of Melbourne
Tel. +61 03 903 58 380
Skype: lmorandini

--
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/llgpl6%242bh%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to