问题
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.
回答1:
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.
回答2:
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)
>>> ...
来源:https://stackoverflow.com/questions/9959502/python-and-graph-database-use-java-lib-wrapper-or-rest-api