【问题标题】:At what size is the Faunus Graph Analytics Framework needed for Titan?Titan 需要多大的 Faunus 图形分析框架?
【发布时间】:2013-11-29 12:05:43
【问题描述】:

我正在研究在 TitanGraph 数据库上跨两个数据集的边缘执行图形聚合 (groupBy,groupCount) 查询:

  1. 大约 10,000 个节点和大约 100 万条边

  2. 大约 200,000 个节点和大约 10 亿条边

有谁知道我需要在什么时候努力安装 Faunus 才能在 1 分钟内完成这种类型的 gremlin 查询?

【问题讨论】:

    标签: graph gremlin titan faunus


    【解决方案1】:

    在 10000 个节点和 1M 边上,使用普通 Gremlin(没有 Faunus)应该不会有问题。请参阅下面的代码,其中我使用 Furnace 生成了大约该大小的图形:

    gremlin>  g = TitanFactory.open('/tmp/titan/generated')
    ==>titangraph[local:/tmp/titan/generated]
    gremlin> import com.tinkerpop.furnace.generators.*
    ==>import com.tinkerpop.gremlin.*
    ==>import com.tinkerpop.gremlin.java.*
    ...
    ==>import com.tinkerpop.furnace.generators.*
    gremlin> for (int i=0;i<10000;i++) g.addVertex(i)
    ==>null
    gremlin> r = new java.util.Random()
    ==>java.util.Random@137f0ced
    gremlin> generator = new DistributionGenerator("knows", { it.setProperty("weight", r.nextInt(100)) } as EdgeAnnotator)
    ==>com.tinkerpop.furnace.generators.DistributionGenerator@111a3ce4
    gremlin> generator.setOutDistribution(new PowerLawDistribution(2.1))
    ==>null
    gremlin> generator.generate(g,1000000)
    ==>1042671
    

    回顾您在aggregates 上的帖子,我基本上对这个数据集执行了相同的查询。

    gremlin> start=System.currentTimeMillis();g.E.groupBy{it.getProperty("weight")}{it}.cap.next();System.currentTimeMillis()-start
    ==>1415
    gremlin> m.size()
    ==>100
    

    如您所见,执行此遍历大约需要 1.5 秒(在 TinkerGraph 上大约需要 500 毫秒,所有内容都在内存中)。

    在 1B 边缘,您可能需要 Faunus。我不认为你会在一分钟内完成所有这些边缘的迭代,即使你能以某种方式将它们全部放入内存中。请注意,使用 Faunus,您可能无法获得 1 分钟的查询/回答时间。我认为你需要进行一些实验。

    【讨论】:

    • 这正是我正在寻找的,很高兴看到一些不错的数字。谢谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多