postgres-websockets
pREST
postgres-websockets | pREST | |
---|---|---|
1 | 15 | |
338 | 4,098 | |
- | 0.5% | |
7.2 | 7.9 | |
6 months ago | 2 days ago | |
Haskell | Go | |
BSD 3-clause "New" or "Revised" License | MIT License |
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
pREST
- Need help connecting VueJS 3 UI to a database
- Postgres as Rest
-
pREST on YugabyteDB
In a previous post, I published an example with PostgREST on YugabyteDB. Here is another one: pREST opens a REST API to PostgreSQL. YugabyteDB is a PostgreSQL-compatible Open-Source Distributed SQL database. It adds horizontal scalability to applications built for PostgreSQL. Let's see how it integrates with pREST.
-
PostgREST – Serve a RESTful API from Any Postgres Database
Pretty sure I started with this: https://github.com/prest/prest/blob/main/cmd/root.go
And from there you can execute your own command and add handlers or other things as you wish.
-
Constant work to onboarding new members into engineering team
Improve local tests execution — it is frustrating that someone wants to contribute and cannot run the local tests (we use e2e tests, making requests to prestd's own API), a way was implemented where the tests run inside docker using docker-compose;
- pREST
- GitHub - prest/prest: pREST (PostgreSQL REST), low-code, simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new
-
Accessing Postgres via REST using pRest
With pRest, it is possible to create a RESTFul API to access the contents of a Postgres database in a fast and straightforward way. The project, written in Go, can be found on its official website and Github.
-
When is the best time to share a "new" product?
View on GitHub
- pREST (PostgreSQL REST), simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new
What are some alternatives?
postgrest - REST API for any Postgres database
InfluxDB - Scalable datastore for metrics, events, and real-time analytics
graphql-api - Write type-safe GraphQL services in Haskell
go-cache - An in-memory key:value store/cache (similar to Memcached) library for Go, suitable for single-machine applications.
graphql - Haskell GraphQL implementation
go-mysql - a powerful mysql toolset with Go
gc-monitoring-wai - a wai application to show `GHC.Stats.GCStats`
diskv - A disk-backed key-value store.
raml - RESTful API Modeling Language (RAML) library for Haskell
pgweb - Cross-platform client for PostgreSQL databases
simpleconfig
tidb - TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://tidbcloud.com/free-trial