用于跟踪文档管理系统内文档状态的数据库

发布于 2024-12-05 03:22:23 字数 1045 浏览 3 评论 0原文

我开始为我们系统上管理的文档建立一个记录数据库。每个文档都会经历一系列特定的处理任务,我在这里将其称为规范化转换提取

文档处理可能在这些步骤中的任何一个中失败,因此,我正在寻找一种解决方案,可以快速存储这些信息以进行存档,但我也应该能够查询这些信息(并可能对其进行总结)。如果我用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花开半夏魅人心 2024-12-12 03:22:23

Mongodb 是一个正确的选择,因为它支持所有您期望的开箱即用文档

  • /嵌入文档
  • json 兼容的
  • 功能支持查询(当然除了连接)
  • 超快速
  • 10gen支持的

java驱动程序查看mongodb用例< /a>欲了解更多信息

Mongodb is a right choice for this since it supports all your expected features out of the box

  • documents/embedded documents
  • json compatible
  • support querying (of course except joins)
  • super fast
  • java driver supported by 10gen

check out mongodb use cases for more info

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文