CouchDB to store binary data

2,677 views
Skip to first unread message

Henrique Gogó

unread,
Dec 13, 2010, 12:16:17 PM12/13/10
to couc...@googlegroups.com
I have a question:

CouchDB is a good way to store binary data? Ok, I understand its a database, so, is good to store string data (JSONs)... but CouchDB can attach binary data to... but is a good idea store BIG files?
My idea is use CouchDB to store big files (to store zip or iso files). Is possible? Is a good idea? And about replication?

Thanks.

--
Henrique Gogó
http://www.gogs.com.br

Jan Lehnardt

unread,
Dec 13, 2010, 12:36:59 PM12/13/10
to couc...@googlegroups.com

On 13 Dec 2010, at 18:16, Henrique Gogó wrote:

> I have a question:
>
> CouchDB is a good way to store binary data? Ok, I understand its a database, so, is good to store string data (JSONs)... but CouchDB can attach binary data to... but is a good idea store BIG files?
> My idea is use CouchDB to store big files (to store zip or iso files). Is possible? Is a good idea? And about replication?

My biggest test when creating the API was using a 8GB video file, so yeah, it works :) — Replication should work, too, but there are some edge-cases where CouchDB could be smarter than it is currently. For example if replication fails in the middle of a large attachment transfer, and you restart it, it'll download it all over again. Everything else should work though.

Cheers
Jan
--

Peter Nolan

unread,
Dec 13, 2010, 1:48:40 PM12/13/10
to couc...@googlegroups.com
having couchdb be able to restart downloads from their last position would be an awesome addition.  Unfortunately I am unable to help you guys do that :/  
may someone add it though.  :)

-Pete


--
You received this message because you are subscribed to the Google Groups "CouchApp" group.
To post to this group, send email to couc...@googlegroups.com.
To unsubscribe from this group, send email to couchapp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/couchapp?hl=en.




--


Henrique Gogó

unread,
Dec 13, 2010, 2:52:27 PM12/13/10
to couc...@googlegroups.com
So,

Can I use CouchDB like "FTP file storage"? Ok, it stores!, but, is useful? Is a good idea?
I hear that UbuntuOne use CouchDB only for contacts, tasks and other "text" things... no binary data. It's true?

2010/12/13 Peter Nolan <peter...@gmail.com>



--
Henrique Gogó
http://www.gogs.com.br

J Chris Anderson

unread,
Dec 13, 2010, 3:07:58 PM12/13/10
to couc...@googlegroups.com
CouchDB should be fine for an S3-type use-case. The thing to remember
is that compaction will have to recopy the attachments, and any change
in the attachment involves replacing the entire blog, not just
changing a small part of it.

For smaller attachments (images, etc), this shouldn't be an issue at
all. If you use case is large files (more than a few hundred MB or so)
you might want to wait until CouchDB has a dedicated large object
store. There is no timeline for this, but there are other people
interested in creating it also.

Chris

2010/12/13 Henrique Gogó <henriq...@gmail.com>:

--
Chris Anderson
jch...@couchone.com
http://jchrisa.net

Henrique Gogó

unread,
Dec 13, 2010, 3:18:45 PM12/13/10
to couc...@googlegroups.com
Ok, thanks!
CouchDB is fantastic, anyway! :D

2010/12/13 J Chris Anderson <jch...@couchone.com>

Adam Kocoloski

unread,
Dec 13, 2010, 3:26:55 PM12/13/10
to couc...@googlegroups.com
Hi Pete, 1.1.0 will support resumable downloads, but the replicator hasn't yet been upgraded to take advantage of it. Best,

Adam

Peter Nolan

unread,
Dec 13, 2010, 3:39:27 PM12/13/10
to couc...@googlegroups.com
well Adam,

that was quick :p

I do plan on playing with video files in a couchapp so this is good to know.

Quick question - whats the best way to serve video files?  I haven't ever really played with video before and have been glancing over the various iterations out there.  particularly flow player, silverlight, vimeo and well, i forget, but it was just a javascript file.  Long story short, i just want a player that plays most of the major formats, wmp, flash, etc.  

If anyone has a recommendation or experience with playing videos please let me know.  

-Pete

Jan Lehnardt

unread,
Dec 13, 2010, 4:02:26 PM12/13/10
to couc...@googlegroups.com

On 13 Dec 2010, at 20:52, Henrique Gogó wrote:

> So,
>
> Can I use CouchDB like "FTP file storage"? Ok, it stores!, but, is useful? Is a good idea?
> I hear that UbuntuOne use CouchDB only for contacts, tasks and other "text" things... no binary data. It's true?

That is correct, but it is mostly die to the file sync project starting way before the "text things" sync stuff. So they had custom file sync code in place before looking at CouchDB. Not saying they would have picked CouchDB absolutely, but there are historic reasons, too.

Cheers
Jan
--

Reply all
Reply to author
Forward
0 new messages