HNHacker News
TopNewBestAskShowJobs

ruslan_talpa

460 karma · joined March 15, 2016

Founder of subzero

From Database to UI: The All-in-One library suite for internal tools development with integrated authentication in your language of choice.

https://subzero.cloud/

ruslan.talpa [at] subzero [dot]

submissionscomments
ruslan_talpa··on PostgREST – Serve a RESTful API from any Postgres database
Give me access to your PG with a user that has no privileges, can not run queries longer then X ms and see how easy it would be to DOS the db :)
ruslan_talpa··on PostgREST – Serve a RESTful API from any Postgres database
Soon (in the works now, it will be particularly interesting in the context of cloudflare workers talking to planetscale)

https://github.com/subzerocloud/showcase

ruslan_talpa··on PostgREST – Serve a RESTful API from any Postgres database
Because queries like this will kill any db, and you don’t need any privileges

SELECT crypt( encode(digest(gen_random_bytes(1024), 'sha512'), 'base64'), gen_salt('bf', 20) )FROM generate_series(1, 1000000)

More explanations here https://www.freecodecamp.org/news/stop-calling-postgrest-mag...

ruslan_talpa··on Show HN: Self-hosted CMS on serverless Cloudflare
Such a thing exists

https://github.com/subzerocloud/showcase/tree/main/cloudflar...

ruslan_talpa··on SQLite B-Tree Module
Been feeling lately the fatigue of managing 3-5 different services for a every single trivial project. This pushed me to explore adding SQLite support in my product [1], i think I'll wrap a Litestream [2] process in the same container and call it "Backed in a Box" :)

[1] https://github.com/subzerocloud/blue-steel

[2] https://github.com/benbjohnson/litestream

edit: typo

ruslan_talpa··on Postgres wire compatible SQLite proxy
You can query and write to SQLite over http with [1] (i wrote it) but it's not through the method you describe (range for files).

https://github.com/subzerocloud/blue-steel

ruslan_talpa··on Automated REST API for PostgreSQL/SQLite/ClickHouse (In Rust)
Hey @todsacerdoti thanks for posting this :) did you try it out? I think the repo did not yet have the actual rust code (which it does now)
ruslan_talpa··on Ask HN: Best low-/no-code solution for simple web-based database frontends
And even the frontend is probably already written for the use-case that you have https://github.com/priyank-purohit/PostGUI

“ A React web application to query and share any PostgreSQL database”

ruslan_talpa··on Ask HN: Best low-/no-code solution for simple web-based database frontends
And you can have the postgrest api up and running with https://subzero.cloud/ you just bring your own db that you control
ruslan_talpa··on Storage is now available in Supabase (YC S20)
I have a proof of concept for that :) (the db is PostgreSQL of course)
ruslan_talpa··on PostgREST on Fargate
fargate with 0.25 vcpu 1gb m (lowest option) is ~$10/m ((0.01012 + 0.004445) * 24 * 30), article states it's $3 which is wrong + $16 ALB (that you need with fargate) that is $26/m for the lowest option.
ruslan_talpa··on Stored Procedures as a Back End
You can setup a view (accessed by postgrest) that returns an error when there are no (correct) filters in the query so that takes care of select *... problem (also you can have the same logic in the proxy (nginx) layer
ruslan_talpa··on PostgREST: REST API for any Postgres database
A “ton” is very relative. Those tables still have to be written even with ORM. And as for views/rls/triggers the total LOC i would say is orders of magnitude smaller then in traditional stacks and a lot more readable (it’s static definitions vs imperative code)
ruslan_talpa··on PostgREST: REST API for any Postgres database
This is the “corect” response to the question above. :)
ruslan_talpa··on PostgREST: REST API for any Postgres database
The things you said are a pain (or can’t be done) here is how you do it https://github.com/subzerocloud/postgrest-starter-kit

Specifically, testing the sql side with sql (pgtap) and having your sql code in files that get autoloaded to your dev db when saved. Migrations are autogenerated* with apgdiff and managed with sqitch. The process has it’s rough edges but it makes developing with this kind of stack much easier

* you still have to review the generated migration file and make small adjustments but it allows you to work with many entities at a time in your schema without having to remember to reflect the change in a specific migration file

ruslan_talpa··on PostgREST: REST API for any Postgres database
I’ve heard the same type of argument a long time ago against choosing wordpress when it was still relatively new (usually from custom webdev shops when talking to clients)
ruslan_talpa··on PostgREST: REST API for any Postgres database
You keep talking about db views as though you can only read from them (an not write to them) :)
ruslan_talpa··on Brain.fm: Music to improve focus, meditation and sleep
It works for me (focus)
ruslan_talpa··on Database Version Control with Liquibase
Although part of a bigger stack, this can be used independently for postgresql

https://docs.subzero.cloud/managing-migrations/

Internally it uses sqitch and apgdiff.

The process is almost exactly like the one you described for your tool.

ruslan_talpa··on Ask HN: What are your favorite low-coding apps / tools as a developer?
Postgrest? :)
ruslan_talpa··on “Codeless” back end with postgREST
You can submit this link as a PR to this page https://github.com/PostgREST/postgrest-docs/blob/v6.0/ecosys...
ruslan_talpa··on “Codeless” back end with postgREST
is there a github repo with all this sample code?
ruslan_talpa··on PostgREST
> no one can fix

Really? No one? I learned haskell (my first FP lang) and rewrote the core of PostgREST (in my spare time) in about 6m... so stop scaring people :)

ruslan_talpa··on Modern Data Practice and the SQL Tradition
you CAN track the latest "CREATE" statement and deploy to a real system. Conceptually you only need to do a "diff" between your current "CREATE" and the on in the system where you are deploying. https://github.com/djrobstep/migra

Also something similar which uses apgdiff https://github.com/subzerocloud/subzero-cli

ruslan_talpa··on Modern Data Practice and the SQL Tradition
If you think RDBMs can't horizontally scale you have not kept up with the developments :) Look into https://docs.citusdata.com/en/v8.3/get_started/what_is_citus...
ruslan_talpa··on PostgREST
not exactly what i meant.

it's true that it's not a polished workflow to debug stored procedures because you you have to jump from your editor to pgadmin but i don't think this is such a big deal for two reasons.

- postgrest architecture is such that you rarely need stored procedures (not just me, all the projects), it's the exact same way ppl use databases without them (they just send queries to the db, same here). 90% of the code in this type of project is table/view definitions (with constraints) and appropriate grant/rls statements. So there is very little imperative code to debug.

- The type of stored procedures used is quite simple, isolated and mostly self contained, a single function, maybe calling some other helper functions (you are always 2 levels deep at most) so it's not like in other envs where you have to follow the code jumps between hundreds of functions and classes.

ruslan_talpa··on PostgREST
it is hard to read if you don't have some knowledge of haskell indeed and the comments part is true but it's not any harder then folowing other codebases if you don't know the particular language so i don't think this is a strong argument.

Another point is - it's not a library and you are not the one maintaining it :) the same way you are not maintaining, but still using things like postgresql,nginx,redis, rabbitmq.

I bet it's a lot easier to learn haskell and patch postgrest then to know C for 10 years and patch postgresql :)

ruslan_talpa··on PostgREST
why would you "expect" that if you don't know about it?
ruslan_talpa··on PostgREST
you are confusing postgrest with postgraphile :)
ruslan_talpa··on PostgREST
How do you easely piece together a (poerfull) rest api just by having the definitions of the tables in the database?

Very very old videos but you can get the core idea https://begriffs.com/posts/2014-12-30-intro-to-postgrest.htm...

https://begriffs.com/posts/2016-03-20-postgrest-tour.html

← PreviousPage 2 of 11Next →