Hacker News new | ask | show | jobs
by don71 3648 days ago
Hi! I'm Claudius from ArangoDB.

Saying Foxx is like stored procedures is overly simplistic.

ArangoDB's external API is the HTTP API. Foxx lets you extend that HTTP API with arbitrary code that will be executed in V8 with direct access to the same native APIs it uses internally.

The closest equivalents I'm aware of are RethinkDB's Horizon (which isn't hosted in the database) and CouchDB's CouchApps (which are far more limited in what they can do).

You can think of it as having a subset of Node.js running right on top of the database with direct memory access and scaling (Foxx services run on each coordinator).

1 comments

So the expectation is for client applications to directly connect to the API. But of course that's not required.
You are right that that is not required. That ArangoDB speaks HTTP doesn't mean it has to be exposed to the browser.

You can use Foxx to host your entire server-side application inside ArangoDB in some cases but in our experience, the best approach is having a middleground where the data-intensive server-side code lives in Foxx services and the client-facing part (e.g. server-side rendering) exists outside of it.

Foxx offers you the option to put backend logic directly inside the database; it's not an all-or-nothing decision.