Hacker News new | past | comments | ask | show | jobs | submit login

If you want to listen to database changes in Elixir you can also get really good stuff done by using Cainophile (https://github.com/cainophile/cainophile). Same mechanism. I don't know the details of Debezium so I can't say if you are leaving fantastic things on the table. But I've had good fun with Cainophile. For example I've used it in my videos on Electric SQL to react to changes in a Postgres database. It matches nicely with realtime-ish UI via LiveView. So meshes really good with the current Elixir stack.



That library is great but pretty dated. I put together WalEx which borrowed a good bit from Cainophole but uses the new WAL listening logic in Postgrex:

https://github.com/cpursley/walex


What is dated? WalEx is still using logical replication slots, right? Trying to bring myself up to speed. Currently am using cainophile and would like to understand what WalEx is offering above and beyond. Cainophile isn't actively maintained but I think that's because it is feature complete, at least according to the author's concerns.



That is interesting. So this would mean using what I already have when using Ecto instead of the other postgres client I think cainophile uses.sounds good to me.


Yeah, originally I used cainophile's logic then switched to this:

https://hexdocs.pm/postgrex/Postgrex.ReplicationConnection.h...

Here's a great talk on Postgrex Relication:

https://www.youtube.com/watch?v=QubB19Dnxh0




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: