libcluster
walex
libcluster | walex | |
---|---|---|
10 | 17 | |
1,886 | 251 | |
- | - | |
6.4 | 9.1 | |
5 months ago | 24 days ago | |
Elixir | Elixir | |
MIT 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.
libcluster
-
Elixir clustering using Postgres
libcluster is the go-to package for connecting multiple BEAM instances and setting up healing strategies. libcluster provides out-of-the-box strategies and it allows users to define their own strategies by implementing a simple behavior that defines cluster formation and healing according to the supporting service you want to use.
- Phoenix 1.7 for Elixir: Edit a Form in a Modal
- Elixir for Ruby developers: the three most important differences
-
cannot query kubernetes (unauthorized): endpoints is forbidden: User cannot list endpoints in the namespace
I am using libcluster to connect my nodesI get the following error:
-
We used Elixir's Observer to hunt down bottlenecks
Distributed Elixir can be done with Docker containers too, see https://github.com/bitwalker/libcluster which by default has some Kubernetes support but you can also have third party (or custom) clustering strategies. I've not done this myself but I've seen articles about this a lot during the past years.
Hot code updates for most applications aren't really worth it in my opinion, assuming you do something like blue/green rollover deployments. It's cool that it's possible though. But it requires appup files and afaik Distillery is one of the release tools that has support for it built-in.
-
If you were in charge of a startup tech stack, how would you use elixir to actually scale and make every work seamlessly?
On the deployment level, you can use synchronous communication using API-based solutions or asynchronous communication using external solutions (RabbitMQ, Kafka,...) or Erlang/Elixir tools (message passing, pg2, PubSub, Libcluster,...)
- Nodes
- Nodes Elixir
-
Clustering nodes with different basenames
Looking throught libcluster code (https://github.com/bitwalker/libcluster/blob/master/lib/strategy/kubernetes_dns.ex#L150) it does seem to require that both nodes share the same basename.
-
Building a Distributed Turn-Based Game System in Elixir
libcluster – Automatic cluster formation/healing for Elixir applications.
walex
-
The Guide to PostgreSQL Data Change Tracking
The WAL CDC approach: https://github.com/cpursley/walex?tab=readme-ov-file#publica...
CREATE PUBLICATION news_item FOR TABLE news WHERE (topic IS "AAPL");
-
Elixir Nitpicks
What do you mean testing with processes?
I won't suggest these are the best written tests, but I test various processes, supervisors, etc like this:
https://github.com/cpursley/walex/blob/master/test/walex/sup...
-
PostgreSQL Is Enough
You don’t send the entire WAL, just what you subscribe to - and you can even filter via SQL: https://github.com/cpursley/walex?tab=readme-ov-file#publica...
- A Technical Dive into PostgreSQL's replication mechanisms
-
Fly Postgres, Managed by Supabase
What we do is much if the business logic in Postgres. But then there’s all the other stuff like external integrations, etc.
We handled that by having an Even system built on the Postgres WAL that we use like a callback system.
I put together a little library in Elixir (that originally started out as forked Supabase realtime) for this:
https://github.com/cpursley/walex
Recently added the ability to configure WalEx to forward events to webhooks or EventRelay (so you don’t need to know Elixir).
-
All the ways to capture changes in Postgres
If you're using Elixir, check out https://github.com/cpursley/walex
I've actually been thinking about turning this idea into a product where you can just point it at your postgres database and select the tables you want to listen to (with filters, like you describe). And have that forwarded to a webhook (with possibility of other protocols).
I'd love to hear folks thoughts on that (and if it would be something people would pay for).
-
Show HN: ElectricSQL, Postgres to SQLite active-active sync for local-first apps
Neat, this is the pattern I've been thinking about for a while now. Also glad to see this is Elixir based.
I've been using https://github.com/cpursley/walex (basically a fork of cainophile via a fork for subabase) to listen to Postgres changes in Elixir.
-
How to Listen to Database Changes Using Postgres Triggers in Elixir
https://github.com/cpursley/walex
Which is based on WAL logs and doesnt have the same limitations.
-
PostgreSQL Logical Replication Gotchas
Great writeup, just added this to the WalEx readme:
https://github.com/cpursley/walex
(WalEx is an Elixir lib for listening to the WAL and perform callback-like actions with the data)
-
We used Elixir's Observer to hunt down bottlenecks
Very cool.
I'm using Elixir to listen to change events via https://github.com/cpursley/walex (which I basically ripped off from Supabase).
What are some alternatives?
Nomad - Elixir/Phoenix Cloud SDK and Deployment Tool
PolarDB-for-PostgreSQL - A cloud-native database based on PostgreSQL developed by Alibaba Cloud.
horde - Horde is a distributed Supervisor and Registry backed by DeltaCrdt
neon - Neon: Serverless Postgres. We separated storage and compute to offer autoscaling, branching, and bottomless storage.
Kubex - Kubex is the kubernetes integration for Elixir projects and it is written in pure Elixir.
realtime - Broadcast, Presence, and Postgres Changes via WebSockets
ex_aws - A flexible, easy to use set of clients AWS APIs for Elixir
worker - High performance Node.js/PostgreSQL job queue (also suitable for getting jobs generated by PostgreSQL triggers/functions out into a different work queue)
erlcloud - AWS APIs library for Erlang (Amazon EC2, S3, SQS, DDB, ELB and etc)
helm-charts - neondatabase helm charts
discovery - An OTP application for auto-discovering services with Consul
supavisor - A cloud-native, multi-tenant Postgres connection pooler.