2 ms·
If what you need is a REST API there are solutions for it that use Postgres, namely http://postgrest.com/ http://postgrest.com/
by mixedCase 10y ago
If what you need is a REST API there are solutions for it that use Postgres, namely http://postgrest.com/ http://postgrest.com/
- pluma 10y agoIf you just want a REST API for your database, sure, PostgREST does that for Postgres. But Foxx lets you specify your own endpoints, not just expose the DB via REST (which ArangoDB already can do out of the box). IOW: if you just want to talk to your DB over REST and manipulate documents directly, ArangoDB's native REST API is the equivalent of PostgREST. If you want arbitrary HTTP endpoints with logic you define yourself, bundled as isolated modules with an express-like router API, Foxx is currently the only way to do that within a database. It allows you to colocate your data-centric application logic with the data it operates on (or even remove the need for exposing sensitive data altogether by handling application-level auth/auth within the database). The only equivalent I can think of personally are CouchApps in CouchDB but they are necessarily far more limited in scope (because CouchDB isn't built to support complex or ad hoc queries).
- ruslan_talpa 10y ago"But Foxx lets you specify your own endpoints ... Foxx is currently the only way to do that within a database" ... so you mean like /rpc/storred_precedure_name in PostgREST :)? (don't get me wrong, anyone capable of writing a db from scratch is a genius, good job and good luck)