hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.06k stars 2.77k forks source link

FastCGI like feature #6756

Open SkinyMonkey opened 3 years ago

SkinyMonkey commented 3 years ago

Serverless/webhooks are fine, but they introduce an additional layer of complexity (networking with everything that comes with it for example).

A FastCGI like feature, allowing hasura actions/events to call a custom program/worker run locally by hasura could allow to bypass those problems while allowing to run custom business code.

It might sound a bit old school but old concepts are sometimes interesting to revisit :)

What do you think?

SkinyMonkey commented 3 years ago

Annnd I just read how exactly fastCGI works and it's pretty much the same hahaha. I assumed it was a pooling of local subprocesses acting as workers, not a separate server listening for tcp requests.

This article explains it pretty well: https://www.alibabacloud.com/forum/read-412

A unix socket version, instead of TCP, could help, but is it worth it?

I began to implement a CGI version in hasura for my own fun.