Better HN
topnewbestaskshowjobs
Log inSign up

vsurabhi

510 karma · joined May 2, 2018 (8y ago) · 35 submissions

Submissions

1.

The “fifth wheel” parallel parking tool that never hit it big (2018)(hagerty.com ↗)

72 points · by vsurabhi · 4y ago · 83 comments

comment 5y ago · link · parent

(Vamshi from Hasura)

We've been working on SQL server native support and we're happy to announce support for read-only GraphQL cases with new or existing SQL Servers.

Next up is adding support for stored procedures, mutations, Hasura event triggers [1] and more!

[1]: https://hasura.io/docs/latest/graphql/core/event-triggers/in...

3.

Clodl: Turn dynamically linked ELF binaries into self-contained closures(github.com ↗)

56 points · by vsurabhi · 5y ago · 27 comments

4.

Building a GraphQL to SQL Compiler on Postgres, MS SQL and MySQL(hasura.io ↗)

8 points · by vsurabhi · 5y ago · discuss

5.

Hasura 2.0 Engineering Overview(hasura.io ↗)

3 points · by vsurabhi · 5y ago · discuss

6.

Rust Async vs. Linux threads: context switch time and memory usage(github.com ↗)

2 points · by vsurabhi · 5y ago · discuss

comment 6y ago · link · parent

This and a recent feature addition to neovim (passing lua closures to vimscript functions [1]) should make a good substitute for elisp to configure neovim.

[1] https://github.com/neovim/neovim/pull/12507

8.

Facebook should be treated as co-accused in riots: Delhi govt. panel(thehindu.com ↗)

2 points · by vsurabhi · 6y ago · discuss

9.

New AMD Ryzen 3000XT Processors Available Today(anandtech.com ↗)

1 points · by vsurabhi · 6y ago · discuss

10.

The UChicago χ-Projects(chi.cs.uchicago.edu ↗)

3 points · by vsurabhi · 6y ago · discuss

11.

Show HN: Hasura Cloud: Managed GraphQL for your database and services(hasura.io ↗)

13 points · by vsurabhi · 6y ago · 2 comments

12.

Jim: An open-source, small footprint implementation of Tcl(github.com ↗)

7 points · by vsurabhi · 6y ago · discuss

13.

Build Your Own Text Editor(viewsourcecode.org ↗)

4 points · by vsurabhi · 6y ago · discuss

14.

Court says Melbourne dentist can seek user details from Google over bad review(theguardian.com ↗)

10 points · by vsurabhi · 6y ago · 7 comments

15.

A Small and Simple Pen Plotter(github.com ↗)

2 points · by vsurabhi · 7y ago · discuss

16.

gc: A garbage collector for C and C++(hboehm.info ↗)

2 points · by vsurabhi · 7y ago · discuss

17.

Lnav: Watch and analyze your log files from a terminal(github.com ↗)

1 points · by vsurabhi · 7y ago · discuss

18.

Osquery: SQL-powered operating system instrumentation, monitoring, and analytics(github.com ↗)

132 points · by vsurabhi · 7y ago · 34 comments

comment 7y ago · link · parent

I've been using osquery (https://github.com/osquery/osquery) for a while. It is neat and I can appreciate the idea of 'exposing OS interfaces as databases'.

20.

OpenDrop: An Open Source AirDrop Implementation(github.com ↗)

813 points · by vsurabhi · 7y ago · 222 comments

comment 8y ago · link · parent

If you are using Postgres as your database you can use Hasura to add GraphQL APIs on top of all the tables. Hasura can be exposed to the fronted applications with declarative permissions. You can add a reverse proxy if you want to. Hasura scales horizontally but you will have to manage Postgres on your own or use a hosted Postgres service like RDS.

> .. caching .. This is related to GraphQL in general. The support for caching is nowhere close to what is possible with RESTful APIs but it should eventually get there.

comment 8y ago · link · parent

While Hasura is a 'BaaS' (in the sense that it can be directly exposed to frontend applications), it absolutely does not come with the limitations that you have mentioned. Hasura is not an 'either or' solution like Graphcool or Parse or AppSync. Hasura is designed to scale with the complex requirements of a project over time and to get out of the developer's way when they need more power.

One of the main reasons why this is possible with Hasura and not possible with say Graphcool is the abstraction which Hasura provides. Hasura is not a black box which lets you do CRUD operations. It is a tool that adds powerful GraphQL APIs on top of Postgres, i.e, it works with any Postgres database, existing or new, no restrictions whatsoever. This means you are free to write your own code (and encouraged to) which speaks to Postgres directly with your favorite ORM and expose these APIs with "schema stitching" alongside Hasura.

Hasura therefore lessens the work of a GraphQL backend developer: use Hasura's GraphQL APIs when they fit your bill and write your own custom logic when needed as you would have done without Hasura.

In fact Hasura is a superset of Prisma when it comes to Postgres, you can also use Hasura as an ORM if you want to.

Disclosure: I work at Hasura on graphql-engine

comment 8y ago · link · parent

> .. completely flew over me

Thanks for the feedback. We thought that the 'BaaS' part would convey it.

> .. small datamodel to a very complete GraphQL types ..

Given any GraphQL server, you can generate the types/functions (using introspection) to access the GraphQL server in a typesafe/idiomatic way for a language. A project which does this: https://github.com/dotansimha/graphql-code-generator.

comment 8y ago · link · parent

That's pretty much what we are doing at Hasura, expose Postgres to the client directly with a powerful enough query language on top of GraphQL so that developers can get away with writing as little business logic as possible.

The biggest challenge is access control which we have modeled based on Postgres's RLS but for application users and roles.

comment 8y ago · link · parent

Prisma is used as an ORM for your database, so you would still need to write your own graphql server which sits in front of Prisma.

Hasura is meant to be exposed to the clients directly with declarative access control rules. When you have complex business logic you would write the logic yourselves and expose it alongside Hasura.

Disclosure: I work at Hasura on graphql-engine

comment 8y ago · link · parent

I think you should be able to use it alongside SQLAlchemy if you manage your schema through Prisma. Someone from Prisma team should be able to give you a more thorough answer.

comment 8y ago · link · parent

Very similar projects ! The emphasis of Hasura is to make it seamless to work with existing databases.

The primary difference is how authorization is handled. In Postgraphile, you map your application roles to Postgres users and define policies using Postgres's RLS. With Hasura, you define rules on roles (similar to Postgres's RLS) but it integrates into your existing auth system using webhooks.

comment 8y ago · link · parent

We do not batch queries. We take a slightly different approach. We convert the GraphQL query AST into a single SQL query (no matter how nested the GraphQL query is).

comment 8y ago · link · parent

> What I'm not seeing is how do you ..

You can write fairly complex rules with the access control layer ! The first two conditions are possible (except for the project is only visible on Mondays).

  allow select on rows which satisfy this property: 
  { "project_type" : { "_eq" : "whatever" } }

  allow update on rows which satisfy this property: 
  { "closed_data" : { "_is_null" : true } }

The idea is simple, we provide a boolean expression based access control layer which can use variables from headers. When you can't specify it using the access control layer, you can write this in your own graphql layer and schema stitch with hasura. So you only have to write what is not possible with the access control layer.

> The other point I don't see is how do you ...

You can use the tooling around Postgres ! You can create an `ON INSERT` trigger on the table and listen to these events.

We're launching something very cool in the subscriptions/event-source to solve these kinds of problems. We also have 2 nice projects that work independent of the graphql-engine to help with change subscription on postgres (skor[1], pgdeltastream[2])

[1] https://github.com/hasura/skor [2] https://github.com/hasura/pgdeltastream

comment 8y ago · link · parent

Hi, I'm one of the core contributors to the project.

Hasura and Prisma have very different approaches and end-goals at the moment.

TL;DR: Very simply put, Hasura is postgres first and adds an access-control layer to make it possible to query from the front end directly.

The longer version:

Prisma is intended to be a GraphQL ORM to Postgres (and several other databases with a common API) whereas Hasura is more database first and intended to let you leverage Postgres features over GraphQL.

Hasura comes with and lets you use any postgres migration system and then gives you GraphQL on top of it. This is what allows Hasura to give you GraphQL over any existing Postgres database and application even.

Hasura also comes with an optional access-control layer that makes it feasible to be used by frontend clients directly. This access control is inspired from postgres's RLS but does not depend on or use postgres RLS and can be coupled with application logic/auth.

12