Show HN: Octo – Generate a serverless API from an SQL query
octoproject.github.io
Show HN: Octo – Generate a serverless API from an SQL query
1–10 of 62 posts
Re: Show HN: Octo – Generate a serverless API from an SQL query
#2Re: Show HN: Octo – Generate a serverless API from an SQL query
#3Re: Show HN: Octo – Generate a serverless API from an SQL query
#4Re: Show HN: Octo – Generate a serverless API from an SQL query
#5Looks vaguely similar to http://postgrest.org/
I think there's certainly space for this project, i.e. hand-written queries, on any database (Postg[REST|raphile] both only work with Postgres of course, not sure about Hasura). Not sure it will succeed without support for more forms of Serverless deployment, primarily Lambda.
Re: Show HN: Octo – Generate a serverless API from an SQL query
#6Re: Show HN: Octo – Generate a serverless API from an SQL query
#7One of the things that's not obvious to me about things like this (and other similar tools) is where/how scopes/limitations/permissions are handled. I assume they either are or can be, I just never see it spelled out clearly. What am I missing?
This project doesn't seem to have any inbuilt AuthZ functionality, so unless your database has that built in like Postgres, or you need something that's not possible in-database, I guess you just... can't.
Re: Show HN: Octo – Generate a serverless API from an SQL query
#8The idea is interesting. But it looks like you end up with a yaml file that enumerates each of your tables/endpoints and the queries that back them. So are we exchanging the “complexities” of code, where we have control and testing, for the “lack of complexity” of yaml that becomes unwieldy and untestable in the name of “simplicity?”
Re: Show HN: Octo – Generate a serverless API from an SQL query
#9Unlike PostgREST/Hasura and some other dynamic tools you can "eject" at this point if you'd like and continue on development without the generator in a language you already know. But I'm working on exposing Lua-based hooks you could carry across whatever backend language you choose to generate and avoid the need to eject.
It has builtin support for paginated bulk GET requests with filtering, sorting, limiting. Built-in support for bcrypt-password authentication and optional SQL filters specified in configuration for authorization of particular endpoints based on session and request metadata.
Still very much a work in progress but the goal is to push the envelope on application boilerplate.
Screenshots are of the example/notes project in the repo.
Re: Show HN: Octo – Generate a serverless API from an SQL query
#10One of the things that's not obvious to me about things like this (and other similar tools) is where/how scopes/limitations/permissions are handled. I assume they either are or can be, I just never see it spelled out clearly. What am I missing?
This is a little limited in this current form and I'm working to expand SQL filters to match up to HTTP codes so you can say this request needs to have a session otherwise it is a 401, then it also needs to match another filter otherwise it is a 403. But this other endpoint is ok to show without a session if the object being requested is marked public in the db.
There's a lot to think through especially when extending these filters to bulk methods.
https://github.com/eatonphil/dbcore/blob/master/examples/not...