Python and graph database. Use java lib wrapper or REST api?
Asked Answered
C

2

2

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.

Cesta answered 31/3, 2012 at 20:38 Comment(0)
N
2

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.

Nonstriated answered 1/4, 2012 at 6:51 Comment(1)
For a HA configuration, the client must hit one node of the cluster which is up. Use HAProxy (or similar) to determine which node to hitBoulanger
P
1

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)
>>> ...
Purgatory answered 24/5, 2012 at 19:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.