用于跟踪文档管理系统内文档状态的数据库
我开始为我们系统上管理的文档建立一个记录数据库。每个文档都会经历一系列特定的处理任务,我在这里将其称为规范化、转换和提取。
文档处理可能在这些步骤中的任何一个中失败,因此,我正在寻找一种解决方案,可以快速存储这些信息以进行存档,但我也应该能够查询这些信息(并可能对其进行总结)。如果我用 json 定义我的数据结构,它可能看起来像这样:
{ 10123 : [
{ queue : 'converter',
startedAt : 'date-here',
finishedAt: 'date-here',
error : { message : 'error message', stackTrace : 'stack trace here' },
machine : '192.168.0.1'
} ,
{ queue : 'extractor',
startedAt : 'date-here',
finishedAt: 'date-here',
error : { message : 'error message', stackTrace : 'stack trace here' },
machine : '192.168.0.1'
},
{ queue : 'extractor',
startedAt : 'date-here',
finishedAt: 'date-here',
error : { message : 'error message', stackTrace : 'stack trace here' },
machine : '192.168.0.1'
},
] }
在理想的世界中,我将获得来自特定文档的完整处理生命信息,并且还应该能够检测哪些失败以及每个进程花费的平均时间。
关于处理此问题的理想数据库解决方案有什么提示吗?这可能适合每天几千次写入。
主要解决方案是用Java编写的,因此DB应该有一个Java驱动程序。
I'm starting to build a record keeping database for the documents we manage on our system. Each document goes through a bunch of specific processing tasks that I will call here normalization, conversion and extraction.
The document processing may fail at any of these steps, so, I'm looking for a solution where i can quickly store this information for archiving but I should also be able to query the information (and possibly summarize it). If I would define my data structure in json it would possibly look like this:
{ 10123 : [
{ queue : 'converter',
startedAt : 'date-here',
finishedAt: 'date-here',
error : { message : 'error message', stackTrace : 'stack trace here' },
machine : '192.168.0.1'
} ,
{ queue : 'extractor',
startedAt : 'date-here',
finishedAt: 'date-here',
error : { message : 'error message', stackTrace : 'stack trace here' },
machine : '192.168.0.1'
},
{ queue : 'extractor',
startedAt : 'date-here',
finishedAt: 'date-here',
error : { message : 'error message', stackTrace : 'stack trace here' },
machine : '192.168.0.1'
},
] }
In an ideal world I would have the full processing life information from a specific document and should also be able to detect wich ones have failed and the average time each process takes.
Any hints on an ideal database solution to handle this? This would possibly go for a couple of thousands writes a day.
The main solution is written in Java, so the DB should have a Java driver.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Mongodb 是一个正确的选择,因为它支持所有您期望的开箱即用文档
java驱动程序查看mongodb用例< /a>欲了解更多信息
Mongodb is a right choice for this since it supports all your expected features out of the box
check out mongodb use cases for more info