从python通过灯泡访问Titan Graph DB时的性能基准

时间:2015-02-20 08:25:21

标签: python groovy titan rexster bulbs

我有Titan(在我的系统上运行嵌入式cassandra)。

cd titan-cassandra-0.3.1
bin/titan.sh config/titan-server-rexster.xml config/titan-server-cassandra.properties

我运行了rexster客户端

cd rexster-console-2.3.0
bin/rexster-console.sh

我在我的系统上安装了灯泡,如下所示。

sudo apt-get install python2.7-dev
sudo apt-get install libyaml-dev

sudo pip install  https://github.com/espeed/bulbs/tarball/master

在上面的设置之后,我继续从我的python应用程序创建我的图形。

  from bulbs.titan import Graph
  g = Graph()
  switch = g.vertices.create(name="switch")
  device = g.vertices.create(name="device")
  g.edges.create(switch, "connected to", device)

我的问题如下。

1)对于一个简单的图表,我通过REXSTER服务器使用Bulbs从python应用程序访问Titan Graph DB。据我所知,REXSTER服务器通过灯泡使用的RESTful接口公开Titan。

2)如果我需要一些复杂的操作,我最好在groovy脚本中创建一些存储过程,并在Titan + Bulbs和REXSTER服务器之间使用REXSTER客户端。(我的理解是否正确?)

3)由于Bulbs通过RESTful接口与Titan通信,性能如何?我想知道一下 - 写表演 - 查询性能

4)如果我在其间使用REXSTER客户端会影响性能吗?

如果你能指出一些他们使用上述设置测量性能的文档,那就太棒了。

1 个答案:

答案 0 :(得分:1)

  

2)如果我需要一些复杂的操作,我最好在groovy脚本中创建一些存储过程,并在Titan + Bulbs和REXSTER服务器之间使用REXSTER客户端。(我的理解是否正确?)

对于复杂查询,您可以通过灯泡执行gremlin查询。请查看此页面:http://bulbflow.com/docs/api/bulbs/gremlin/

  

3)由于Bulbs通过RESTful接口与Titan通信,性能如何?我想了解一下 - 写性能 - 查询性能

     

4)如果我在其间使用REXSTER客户端会影响性能吗?

据我所知,使用Rexster写入或查询数据不会有任何显着的性能下降。因为,无论你的查询多么复杂和沉重,它都将在Titan内部执行。因此,使用Rexster不会成为瓶颈。