I would like to use ArangoDB in Django, but I don't know which of the following options is better: using the ArangoDB Python driver or building a new API with Foxx. I think that the ArangoDB Python driver is not based on Foxx and I don't know the pros and cons of building a new API from scratch, even if it is made easier by Foxx. In addition, I'm afraid that using javascript in the interface between Foxx and the backend could make things slower. Would it be faster if I used Guacamole ODM together with Ruby on Rails?
-
Can you elaborate a bit more what you want to archive? Do you want to create an restful (HTTP/JSON) interface for an application? Do you want to use django-nonrel with ArangoDB?fceller– fceller2014-05-28 11:50:21 +00:00Commented May 28, 2014 at 11:50
-
I should note that this is bit of a "which x is better" question.Shayne– Shayne2016-12-31 07:35:55 +00:00Commented Dec 31, 2016 at 7:35
2 Answers
Better option for your case is to use ArangoDB Python driver.
Here is couple of reasons:
- easy-to-start - just install driver and move on with development
- some similarity to Django ORM API
- have some documentation
- all your business logic will be in place and in Python which should be great advantage
And here is why Foxx is not the best option for your case:
- you have to build your own API which means:
- bunch of code in JavaScript
- some documentation to describe API
- additional logic level (in Foxx and in Django project) which increase tangling in your project
- it probably not increase performance because you still retrieve your data using HTTP
Foxx is good option when you build Single page APP using ArangoDB as data layer. Also probably Foxx will be great for building hight-level API's with Foxx as preprocessed/aggregated data provider.
Comments
I made a python ArangoDB driver (https://github.com/saeschdivara/ArangoPy) and I created on top of that kind of a bridge for Django (https://github.com/saeschdivara/ArangoDjango). So you can use kind of an orm for ArangoDB and still use the Django Restframework to create your API.
3 Comments
settings.py in the project readme.