【问题标题】:possible to connect to multiple neo4j databases via bulbs/Rexster?可以通过灯泡/Rexster 连接到多个 Neo4j 数据库吗?
【发布时间】:2014-06-19 20:21:59
【问题描述】:

当我使用灯泡打开与图形的连接时,我希望能够指定 neo4j (2.0+) 数据库文件夹。目标是能够在同一台机器上打开不同或多个 neo4j 数据库(data/ 中的文件夹),而无需启动 neo4j 服务器。这适用于 Gremlin 控制台。我怀疑使用灯泡执行此操作的途径是使用灯泡 Rexster 客户端 (http://bulbflow.com/docs/api/bulbs/rexster/client/) 并以某种方式自动启动指向该文件夹的 Rexster 服务器。有没有人这样做过,或者任何人都可以为这些目标提供建议吗?

非常感谢

【问题讨论】:

    标签: neo4j gremlin tinkerpop bulbs rexster


    【解决方案1】:

    Bulbs 旨在让您轻松使用多个图形数据库。

    为您要运行的每个 Neo4j 数据库配置您的 rexster.xml(每个数据库将具有不同的名称,因此具有不同的 URL 路径),然后为每个数据库创建单独的 Bulbs ConfigGraph 对象:

    >>> from bulbs.rexster import Graph, Config
    >>>
    >>> config = Config('http://localhost:8182/graphs/somegraph')
    >>> g1 = Graph(config)
    >>>
    >>> config = Config('http://localhost:8182/graphs/anothergraph')
    >>> g2 = Graph(config)
    

    这里是相关文档...

    【讨论】:

    • 这很好用,设置也不难。必须为每个新图形添加配置信息到 rexster.xml,所以它不像 gremlin 控制台管理的那样自动,但仍然非常有用。谢谢!
    • @ZiggyEunicien Rexster 在 TinkerPop3 中重生为 Gremlin Server,Gremlin Server 可以让您通过 Gremlin 动态创建图表。
    猜你喜欢
    • 2014-03-21
    • 2014-09-19
    • 2015-06-17
    • 2013-10-22
    • 2019-09-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多