pyArango vs. Foxx Microservices

421 views Asked by At

What is the major difference between using pyArango and Foxx Micro-service? As I saw we we are eventually writing the AQL in the .js file when creating the micro-service. How does it differ from writing into pyArango client?

What are the advantage of using Foxx Micro-service and pyArango?

Thanks

1

There are 1 answers

0
David Thomas On BEST ANSWER

Foxx microservices run on the database server, which means if they need to manipulate large amounts of data to provide the data you need, then that data manipulation happens on the server.

If you use pyArango to externally process large amounts of data, then the full amount of data must come out of the server via your pyArango driver, so that Python can process the data in order to build the required answer.

Obviously, another difference with Foxx is that it's written in JavaScript, so that may be a difference for your project that is worth thinking about.

Even if you run Python on the ArangoDB server, and extract data via pyArango versus Foxx, I would hazard to guess that Foxx will be faster.

Personally, when implementing ArangoDB, I don't allow direct table access to its data, rather I force all connectivity to go through Foxx.

The key benefit is that I can control incoming data schemas, supported actions, business logic, user access levels, and limit the possibility of consumers of the data from damaging the integrity of the data.

Another key benefit is that by exposing the data via Foxx, and blocking direct AQL access, I have the flexibility to change the underlying data collections, models, structures, and relationships without the consumers having to change their code, as I just update the relevant Foxx REST endpoints and they keep returning data in the same way as they did before the structural updates.

It's not a black and white decision, but by thinking about the security, consumption, lifecycle, and priorities of your application, you will come to an answer that works for you.