Hacker News new | ask | show | jobs
by arkhamist 4053 days ago
One of the core hasura devs here. 'hasura-db' is a wrapper over postgres. The idea is to provide a very neat json api to talk to postgres with a permissions model. However, you still have the raw access to postgres. So, you can always fire up a django/rails/etc app and connect to your postgres instance and implement any custom functionality that can't be done using hasura-db's json api.

Coming to your question: Since the underlying db which actually stores your data is postgres, you get all the power of a relational database. With hasura-db you get a 'monogodb' like document api. So, hasura-db + postgres tries to capture the best of both worlds.

Since your data is (designed to be) completely normalized in postgres, 'hasura-search' integrates with elastic search to create denormalised documents for efficient full text search in a declarative way. So, hasura-search esentially listens to any changes to your data in postgres and builds denormalised documents that are inserted/updated/deleted into elasticsearch. So, your elasticsearch data stays in sync with your postgres data in real time without any effort from your side ! Deployment will be at least as easy as on Heroku.

2 comments

I see, so seems like your core innovation is this new kind of db along with amazing search integration. Then why become a full platform (seems harder to gain traction)? Why not become a DB/Search company and create a software package that customers use (kinda like MongoDB) rather than having to deploy their code onto your platform (like Heroku)? Just curious, I'm sure you may have had good technical / business reasons.
Hi! Core Hasura dev here. We're trying to make hasura a place to deploy microservice style applications where hasura handles all the operational things for you (sort of like heroku) and then also wrap up a lot of great existing tech as ready-to-eat microservices that just need declarative configuration. Like wrapping over Postgres and elasticsearch. Next up on our list is file handling and cloud storage integration. Then caching.

So the idea is that a lot of things are figured out, in hopefully not idiotic ways. Built on open stuff. We're going to try to make our communication a lot more clear on that and then have a sensible demo to try it out and see the benefits of getting something super customisable setup without writing too much code.

That actually sounds brilliant and I think there's definitely a need for something like this. As a mobile developer I often use Parse as a starting point b/c it allows fast prototyping for clients, but invariably I get frustrated by limitations and then roll my own backend.

I see on your site that you guys are looking to develop iOS & Android SDKs, feel free to let me know if you would like a hand with that :) (My email is in my profile).

Good luck!

> The idea is to provide a very neat json api to talk to postgres with a permissions model.

Just today I was looking for something like this! Any chance I can use only this json API service (using Heroku Postgres) without having to use the rest of Hasura?

We have considered this. We really liked what heroku did with their postgres service, especially the 'followers' feature. Considering hasura's core principle is not to reinvent things, we really want this integration to happen. However there are few technical challenges before this becomes a realistic option.

1. hasura-db requires few custom extensions (written in c) to be installed into postgres which is not possible in heroku's postgres.

2. hasura-db also makes some assumptions about authentication which is handled by the hasura platform.