我要找来查询一个REST方式下面用例一种独特的方式进行建模: -如何存储库,提供智能的基于REST访问
假设库包含以下内容: -
a. green color ball image of 1cm radius
b. yellow color ball image of 1cm radius
c. blue color ball image of 1cm radius
d. green color ball image of 2cm radius
e. yellow color ball image of 2cm radius
f. blue color ball image of 2cm radius
g. computer monitor icon image of size 32x32 pixels in png format
h. computer monitor icon image of size 64x64 pixels in png format
i. computer monitor icon image of size 32x32 pixels in ico format
j. computer monitor icon image of size 64x64 pixels in ico format
k. HR travel policy
l. HR new hire policy
g. HR promotion policy
1. Find all documents published after a certain date?
2. Find all documents published before a certain date?
3. Find all documents published between a certain set of dates?
4. Find all balls which are 1cm in radius
5. Find all documents whose download format is "png"
6. Find all documents whose size is 32x32 pixels
7. Find all balls which are green in color.
我们的存储库可能基于Google存储,Amazon S3,Mongodb GridFS,Java内容存储库(JCR 2.0)或简单的文件系统。
什么是理想的方式来存储和检索上述数据。我希望REST URL尽可能具有表达性,以便我可以对上述任何用例进行建模[1-6]。欣赏任何有关如何设计通用知识库的指针,以便我可以使用适当的命名约定来基于上述查询来获取文档。
Java内容存储库可能是最适合您的需求 - 也考虑阿帕奇吊带内置了JCR顶上一个REST框架:http://jackrabbit.apache.org/。此外,我怀疑,但不知道,其他NoSQL解决方案在将二进制数据存储为JCR时并不那么灵活。 – orangepips 2011-01-31 19:33:21