postgres-websockets
showcase
postgres-websockets | showcase | |
---|---|---|
1 | 10 | |
338 | 150 | |
- | 2.0% | |
7.2 | 4.7 | |
6 months ago | 11 months ago | |
Haskell | TypeScript | |
BSD 3-clause "New" or "Revised" License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
postgres-websockets
-
PostgREST – Serve a RESTful API from Any Postgres Database
At work, we've finally replaced a large part of a custom (mostly-)web backend with PostgREST recently, and that's quite a relief: considerably less code to maintain in that project now, and that was a rather awkward code. Something akin to PostgREST's "Embedding with Top-level Filtering" [1] had to be provided for all the tables, with OpenAPI schema and a typed API (Haskell + Servant); I avoided manually writing it all down, but at the cost of poking framework internals, and maintainability suffered. It was particularly annoying that the code doesn't really do anything useful, except for standing between a database and an HTTP client, and simply mimics the database anyway. Whenever a change had to be introduced, it was introduced into the database, the backend, and the frontend simultaneously, so it wasn't even useful for some kind of compatibility.
Now PostgREST handles all that, and only a few less trivial endpoints are handled by a custom backend (including streaming, which I'm considering replacing with postgrest-websocket [2] at some point).
During the switch to PostgREST, the encountered minor issues were those with inherited tables (had to set a bunch of computed/virtual columns [3] in order to "embed" those), and with a bug on filtering using such relations (turned out it was an already-fixed regression [4], so an update helped). Also a couple of helper stored procedures (to use via /rpc/) for updates in multiple tables at once (many-to-many relationships, to edit entities along with their relationships, using fewer requests) were added (though the old custom backend didn't have that), the security policies were set from the beginning, the frontend was rewritten (which allowed to finally switch without adding more work), so it was only left to cleanup the backend.
Not using views, since as mentioned above, database changes usually correspond to frontend changes, and the API doesn't have to be that stable yet.
Happy with it so far.
[1] https://postgrest.org/en/stable/api.html#embedding-with-top-...
[2] https://github.com/diogob/postgres-websockets
[3] https://postgrest.org/en/stable/api.html#computed-virtual-co...
[4] https://github.com/PostgREST/postgrest/issues/2530
showcase
-
Appropriate way to retrieve data from PlanetScale in client side code?
While the example is next interacting with postgresql, the lib also supports mysql (and planetscale by extension) https://github.com/subzerocloud/showcase/tree/main/node-myrest
-
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
-
Go and SQLite in the Cloud
Yes there is but not FOSS
https://github.com/subzerocloud/showcase/tree/main/flyio-sql...
- Blue-steel: REST API for your database (PostgreSQL/SQLite)
-
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
- Is there anything like this in Rust?
- Show HN: The power of PostgREST in a Rust library
- The power of PostgREST in a Rust library (looking for feedback)
- Automated REST API for PostgreSQL/SQLite/ClickHouse (In Rust)
What are some alternatives?
postgrest - REST API for any Postgres database
kysely - A type-safe typescript SQL query builder
graphql-api - Write type-safe GraphQL services in Haskell
cf-socket-server - This nifty little project is a swiss army knife for realtime backend projects. It is scoped to rooms, and encompasses multiple useful features.
graphql - Haskell GraphQL implementation
annuaire-entreprises-sirene-api
gc-monitoring-wai - a wai application to show `GHC.Stats.GCStats`
cloudflare-for-speed-and-security - Scale faster and save big with the global edge cloud platform - https://kerkour.com/cloudflare-for-speed-and-security
raml - RESTful API Modeling Language (RAML) library for Haskell
postlite - Postgres wire compatible SQLite proxy.
simpleconfig
marmot - A distributed SQLite replicator built on top of NATS