Java 内容存储库实现:单线程、内存中、只读?
是否有 Java 内容存储库(JCR,在 JSR-283) 是否存在具有以下功能的实现?
- 单线程(不创建用于后台处理的线程)。
- 内存中(不依赖于外部存储,例如数据库系统或文件系统)。
- 可能只读(无需支持写入操作 - 所有内容均在启动时以编程方式提供)。
据了解,这些约束会给系统带来严重的限制,所以请不要深究。提供一些背景知识,目的是找到一个轻量级 JCR 实现,它可以:
- 用于构建在 JCR 之上的原型发布系统:简单的博客引擎、内容管理系统等。当系统增长时,它可以转向功能更齐全的 JCR 实现。
- 在受限环境中运行,例如 Google App Engine,其中不允许创建线程。如果内容相对较小且很少更新,则只读内容存储库是可以接受的。
到目前为止考虑的选项似乎不能满足这些要求:
- Apache Jackrabbit:显然需要线程。存储似乎是可插拔的,因此可以实现内存存储。
- 其他选择?
Does a Java Content Repository (JCR, specified in JSR-283) implementation with the following features exist?
- Single-threaded (does not create threads for background processing).
- In-memory (does not rely on external storage such as a database system or a filesystem).
- Possibly read-only (no need to support write operations — all content is provided programmatically upon startup).
It is understood that these constraints will create severe limitations for the system, so please don't go into that. To give some background, the purpose is to find a lightweight JCR implementation which can:
- Be used for prototyping publishing systems built on top of JCR: simple blog engines, content management systems and so on. When a system grows, it can move to a more full-featured JCR implementation.
- Run in restricted environments such as the Google App Engine, where for example thread creation is not allowed. If the content is relatively small and rarely updated, a read-only content repository can be acceptable.
Options considered so far, which do not seem to fill these requirements are:
- Apache Jackrabbit: Apparently requires threads. Storage seems to be pluggable, so in-memory storage could be implemented.
- Other alternatives?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您看过 ModeShape 吗? ModeShape 是轻量级的,可以轻松配置为使用内存存储库,并具有可扩展的连接器框架(如果您想将其连接到外部内容系统)。还可以禁用搜索和索引以及许多其他服务。它确实创建了一些用于后台处理的线程,尽管它是开源的,并且可以进行修改以允许创建精简的 JCR 引擎(尽管并非所有 JCR 功能都可以工作)。
Have you looked at ModeShape? ModeShape is lightweight and can easily be configured to use an in-memory repository and has an extensible connector framework (if you want to connect it to an external content system). It's also possible to disable searching and indexing and a number of other services. It does create a few threads for background processing, though it's open source, and could be modified to allow creating a stripped-down JCR engine (though not all JCR features would work).
Priha 不需要线程,并且符合 JCR1.0 标准(从某种意义上说,它没有经过官方认证,但通过了TCK),尽管它没有实现所有可选位。
Priha does not require threads, and is JCR1.0 compliant (in the sense that it's not officially certified, but passes the TCK), though it does not implement all the optional bits.