表示 DAG(有向无环图) [英] Representing a DAG (directed acyclic graph)

查看:122
本文介绍了表示 DAG(有向无环图)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将依赖项存储在 DAG 中.(我们正在细粒度地规划新的学校课程)

I need to store dependencies in a DAG. (We're mapping a new school curriculum at a very fine grained level)

我们使用的是 rails 3

We're using rails 3

注意事项

  • 宽于深
  • 非常大
  • 我估计每个节点有 5-10 个链接.随着系统的增长,这将增加.
  • 读多,写少
  • 最常见的是查找:
    • 一级和二级依赖
    • 搜索/验证依赖项
    • Wider than it is deep
    • Very large
    • I estimate 5-10 links per node. As the system grows this will increase.
    • Many reads, few writes
    • most common are lookups:
      • dependencies of first and second degree
      • searching/verifying dependencies

      我了解 SQL,我会考虑使用 NoSQL.

      I know SQL, I'll consider NoSQL.

      寻找实现选项的良好比较的指针.

      Looking for pointers to good comparisons of implementation options.

      也对我们可以快速开始的东西感兴趣,但以后过渡到更强大/可扩展的东西会不会那么痛苦.

      Also interested in what we can start with fast, but will be less painful to transition to something more robust/scalable later.

      推荐答案

      我认为 Ruby 绑定 Neo4j 应该很合适.它用于 Rails 3.底层数据模型使用节点和有向关系/边,两者都具有键/值样式属性.为了扩展以读取为主的架构,Neo4j 使用主/从复制设置.

      I think the upcoming version (beta at the moment) of the Ruby bindings for the graph database Neo4j should be a good fit. It's for use with Rails 3. The underlying data model uses nodes and directed relationships/edges with key/value style attributes on both. To scale read-mostly architectures Neo4j uses a master/slave replication setup.

      这篇关于表示 DAG(有向无环图)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆