postgres-websockets VS postgresql-replicant

Compare postgres-websockets vs postgresql-replicant and see what are their differences.

postgresql-replicant

A streaming PostgreSQL logical replication client library for Haskell (by agentultra)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
postgres-websockets postgresql-replicant
1 5
338 38
- -
7.2 3.2
6 months ago 9 months ago
Haskell Haskell
BSD 3-clause "New" or "Revised" License BSD 3-clause "New" or "Revised" License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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

Posts with mentions or reviews of postgres-websockets. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-12-29.
  • PostgREST – Serve a RESTful API from Any Postgres Database
    22 projects | news.ycombinator.com | 29 Dec 2022
    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

postgresql-replicant

Posts with mentions or reviews of postgresql-replicant. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-12-29.
  • PostgREST – Serve a RESTful API from Any Postgres Database
    22 projects | news.ycombinator.com | 29 Dec 2022
    You can use a library like https://github.com/agentultra/postgresql-replicant or similar to hook in a data plane and use PostgREST as a data plane.

    Your business logic works on the event stream that comes from the WAL.

  • backend.sql and frontend.js = ♥
    5 projects | news.ycombinator.com | 30 Jan 2022
    I wrote postgresql-replicant [0] in order to do this. It’s not a novel idea. It lets you read the logical replication stream.

    On top of this library you can do all sorts of things: replicate data to Kafka or SQS, write a web socket server to publish changes to clients, etc.

    [0] https://github.com/agentultra/postgresql-replicant

  • Ask HN: What are some tools / libraries you built yourself?
    264 projects | news.ycombinator.com | 16 May 2021
    https://github.com/agentultra/postgresql-replicant — stream delta changes from a PostgreSQL database. Not a novel concept or implementation but this library doesn’t exist in Haskell and that’s a shame because Haskell has lots of great libraries for working with streams.

    https://github.com/agent ultra/DataVersion — type-directed data migration library. I needed to migrate some data in a document database that had no schema with years of data in it to a format that had a schema. I leveraged some other stuff to achieve it but this library was a key piece to being confident that the transformations were correct and complete. Migrated the database and backfill it with a Lambda function using this library.

    Those are just the most recent ones.

  • Haskell good for general use?
    1 project | /r/haskell | 11 May 2021
    On my stream at https://twitch.tv/agentultra I've been working on a library to stream changes out of a PostgreSQL database. We've had to figure out how to use low-level libpq bindings, concurrency primitives, serializing and deserializing binary messages, etc. You can find the library here: https://github.com/agentultra/postgresql-replicant
  • [Announce] postgresql-replicant-0.1.0.0-candidate: streaming PostgreSQL changes
    1 project | /r/haskell | 2 May 2021
    You can star the repo and report issues at: https://github.com/agentultra/postgresql-replicant -- new contributors are welcome! I'm still working out a contribution guide, it's still super early on the project. I can be found here and on the FP Slack (https://fpchat-invite.herokuapp.com/) and on the FP Zulip (https://funprog.zulipchat.com)

What are some alternatives?

When comparing postgres-websockets and postgresql-replicant you can also consider the following projects:

postgrest - REST API for any Postgres database

lowdefy - The config web stack for business apps - build internal tools, client portals, web apps, admin panels, dashboards, web sites, and CRUD apps with YAML or JSON.

graphql-api - Write type-safe GraphQL services in Haskell

GoJS, a JavaScript Library for HTML Diagrams - JavaScript diagramming library for interactive flowcharts, org charts, design tools, planning tools, visual languages.

graphql - Haskell GraphQL implementation

Pion WebRTC - Pure Go implementation of the WebRTC API

gc-monitoring-wai - a wai application to show `GHC.Stats.GCStats`

Tabula - Extract tables from PDF files

raml - RESTful API Modeling Language (RAML) library for Haskell

Zip Foundation - Effortless ZIP Handling in Swift

simpleconfig

null - reasonable handling of nullable values