1

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:

  1. 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 :-(
  2. 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 :-)

4

1 回答 1

1

CouchDB 开发人员在这里。PUT 上的范围不是一个功能,但完全可以作为一个很好的补充。你愿意打开一个问题吗?https://issues.apache.org/jira/browse/COUCHDB

此外,这将是一个很棒的第一个补丁,并且是学习一些 Erlang 的一个很好的借口(http://learnyousomeerlang.com开始)。

于 2015-03-26T19:10:21.997 回答