Python and graph database. Use java lib wrapper or

2019-08-02 06:54发布

I want to ask you about the best way to use graph database (Neo4j) in Python. What you think, should I use "neo4j/python-embedded" (neo4j/python-embedded with JPype) or maybe "bulbflow" (bulbflow, with Rexster, Gremlin and REST api)? Is REST api secure and provides high availability (e.g. 500 000+ users)?

Thank you.

2条回答
ら.Afraid
2楼-- · 2019-08-02 07:11

You can use Bulbs (http://bulbflow.com/) with Neo4j Server or Rexster:

>>> from bulbs.neo4jserver import Graph
>>> g = Graph()
>>> g.vertices.create(name="James")
>>> g.vertices.create(name="Julie")
>>> g.edges.create(james, "knows", julie)

Or to use Rexster, just change the import:

>>> from bulbs.rexster import Graph
>>> g = Graph()
>>> g.vertices.create(name="James")
>>> g.vertices.create(name="Julie")
>>> g.edges.create(james, "knows", julie)

Note though with Rexster, it supports multiple graph databases so make sure you change the default DB URI in the config:

>>> from bulbs.rexster import Graph, Config
>>> config = Config('http://localhost:8182/graph/neo4jsample')
>>> g = Graph(config)
>>> ...
查看更多
我想做一个坏孩纸
3楼-- · 2019-08-02 07:34

I think Bulbs against Neo4j Server might be the best combination. Also, you can set up Neo4j in High Availability mode so multiple instances are forming a cluster, http://docs.neo4j.org/chunked/snapshot/ha.html which should take care of your load scenario.

查看更多
登录 后发表回答