我可以在一个Titan数据库中创建多少个图? [英] How many graphs can i create in one Titan DB?

查看:95
本文介绍了我可以在一个Titan数据库中创建多少个图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一种情况,系统的每个用户可以拥有自己的百万个顶点和更多边的图。我想将它作为每个用户的独立图来实现。


  1. 因此,如果有十亿以上的用户,我可以在集群Titan DB中创建
    多少图与DynamoDB后端?

  2. 如果存在限制,我应该创建多个单独的TitanDB实例并传播负载吗?




  3. 我需要的原因是图表上的大部分活动都在用户拥有的范围内。跨用户活动可能很低且零星。



    我看了这个 Titan Graph DB Limitations 文件的局限性,但它只讨论顶点和边的限制。另外,当我们在Google上搜索时,所有的文档链接都会打到DataStax主页上,并且没有任何信息,在那里我可以找到文档。

    另外,你能否让我知道如何根据需要创建单独的图形实例?

    解决方案

    在同一个持久层中可以有多个图形。例如,如果您有以下配置,则使用Cassandra:

      conf1:
    storage.cassandra.keyspace = name1
    conf2:
    storage.cassandra.keyspace = name2
    conf3:
    storage.cassandra.keyspace = name3

    然后,您可以使用以下命令在该持久层中创建多个图:

      graph1 = TitanFactory .open(conf1)
    graph2 = TitanFactory.open(conf2)
    graph3 = TitanFactory.open(conf3)

    如果您问如何在相同的 TitanFactory.open()内创建多个图表,那么您无法以直接的方式执行操作。 / p>

    您可以在同一个图中创建多个不连通的图。例如:

      graph1 = TitanFactory.open(conf)
    //创建一个断开连接的图
    v1 = graph.addVertex();
    v2 = graph.addVertex();
    v1.addEdge(edge,v2);
    //创建另一个断开连接的图
    v3 = graph.addVertex();
    v4 = graph.addVertex();
    v3.addEdge(edge,v4);

    以上内容有效地为您提供了同一图表中的两个子图。



    我个人的建议是,如果你不需要图表之间的任何连接,那么你应该使用多个图表。即如上所述, graph1 graph2 graph3 从长远来看,这将使缩放更容易。当然可以肯定的是,不需要连接。


    I have a situation where each user of the system can have their own graph of million vertices and lot more edges. I want to implement it as separate graph for each user.

    1. So, if there are a billion plus users, how many graphs can i created in a clustered Titan DB with DynamoDB backend?

    2. Should i create multiple separate TitanDB instances and spread the load if a limitation exists?

    The reason i need this is that most activity on the graph is within what the user owns. Cross user activity can be low and sporadic.

    I looked at this Titan Graph DB Limitations document for limitations but it only talks of limits on vertices and edges. Also, all documentation links when we search for on google are hitting the DataStax homepage with no niformation where in there i can find the documentation.

    Also, Can you let me know how to create separate graph instances as needed?

    解决方案

    You can have multiple graphs within the same persistence layer. For example with Cassandra if you had the following configs:

    conf1:
       storage.cassandra.keyspace=name1 
    conf2:
       storage.cassandra.keyspace=name2
    conf3:
       storage.cassandra.keyspace=name3
    

    Then you could create multiple graphs within that persistence layer using:

    graph1 = TitanFactory.open(conf1)
    graph2 = TitanFactory.open(conf2)
    graph3 = TitanFactory.open(conf3)
    

    If you are asking how do you create multiple graphs within the same TitanFactory.open(), that you cannot do in a straightforward manner.

    What you can do is create several disconnected graphs in the same graph. For example:

    graph1 = TitanFactory.open(conf)
    //Create One Disconnected Graph
    v1 = graph.addVertex();
    v2 = graph.addVertex();
    v1.addEdge("edge", v2);
    //Create Another Disconnected Graph
    v3 = graph.addVertex();
    v4 = graph.addVertex();
    v3.addEdge("edge", v4);
    

    The above effectively gives you two sub-graphs within the same graph.

    My personal recommendation is that if you don't need any connections between your graphs then you should use multiple graphs. I.e. graph1, graph2, and graph3 as I specified above. This will make scaling easier in the long run. Of course be very certain that connections are not needed.

    这篇关于我可以在一个Titan数据库中创建多少个图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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