将临时文件存储到 JackRabbit 中是个好主意吗?
有人知道与纯 FS 持久性相比,jackrabbit 有多少开销吗?
我将它用于 CMS 项目,但我还必须保留临时文件(不幸的是,它们具有属性/元数据)...不知道我是否也应该为此使用 jackrabbit。
我认为开销足够大,足以避免这种情况......至少是文件系统上的 IO。
这些文件与存储库中的其余文件相同,但可以肯定的是,它们将在一分钟内被删除。
我应该创建一个层来通过 JAVA IO API 保存具有属性的文件,我应该使用 jackrabbit 还是应该使用数据库?如果是这样,是否可以以某种方式设置性能?
does anobody know how much overhead jackrabbit has, in comparison with pure FS persistence ?
I'm using it for a CMS project, but I also have to persist temporary files (that unfortunately have properies/metadata)... Don't know if I should also employ jackrabbit for that.
I think the overhead is significant enough to avoid this .... at least the IO on filesystem.
These files are the same as the rest of files in repo, but it is for sure, that they will be deleted in a minute.
Should I create a layer to persist files with properties via JAVA IO API, should I use jackrabbit or should I use database ? If so, can it be set for performance somehow ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下,Jackrabbit 将二进制文件存储在
FileDataStore
中,它使用FileOutputStream
,因此开销相对较低。但是,数据存储中的二进制文件会一直保留到垃圾收集为止,如果您创建大量临时文件,这可能会给您带来问题。元数据:这取决于您拥有多少元数据。元数据存储在持久性管理器中,也可能存储在搜索索引 (Lucene) 中。主要的性能问题通常是全文搜索,因此如果可能的话禁用它。
这实际上取决于您的用例。 Jackrabbit 并不声称“比数据库更快”,但数据模型(分层、键值对)可能更好或更容易使用。
By default, Jackrabbit stores the binaries in the
FileDataStore
, which uses aFileOutputStream
, so the overhead is relatively low. However, the binaries in the data store remains until garbage collected, which might be a problem for you if you create a huge number of temporary files.Metadata: it depends how much metadata you have. The metadata is stored in the persistence manager and possibly in the search index (Lucene). The main performance problem there is usually fulltext search, so disable it if possible.
That really depends on your use case. Jackrabbit does not claim to be "faster than a database", but the data model (hierarchical, key value pairs) may be better or easier to use.