I would like to use CouchDB for keeping some logs (don't ask why ;-)) and I would like to make use of CouchDB's attachment feature. It should be noted that I have a lot of logs, but each log is rather small, I don't expect any of them to exceed 1Mb (usually they are more in the couple of Kb range).
AFAICS I have a couple of options:
- I could accumulate the logs on server side and push the whole logs in one go to the server as an attachment, but it would mean that they wouldn't be available right away :-(
- I could push the logs in regular intervals, but for updating them I would need to download them again attach more info to them and push them back to CouchDB
I'm not so happy with neither of those solutions, even though that would be possible which brings me to a possible third option (and my question).
For the GET request CouchDB clearly supports the (Content-)Range header (doesn't seem to be the standard one according to RFC 2616). RFC 2616 also does not limit the Content-Range to only GET requests (this opinion seems to be shared with others).
So the question is whether CouchDB supports this also for the PUT request. In this case I could attach to the attachment which would be ideal for my use case :-)