SwissBorg / akka-persistence-postgres

PostgreSQL plugin for Akka Persistence
Apache License 2.0
72 stars 11 forks source link

Event Driven Read Side Update Optimizations using LISTEN NOTIFY in addition or rather than polling #211

Open firehooper opened 3 years ago

firehooper commented 3 years ago

Has anyone looked into read side optimizations using LISTEN NOTIFY rather than polling (or using a slow long poll as a backup and use the listen notify to trigger the poll)? We use query by tags with a custom jsonb dao and legacy and it seems like we could use these built in functions similar to Elixir's commanded/eventstore . I will give it a try, but wanted to see if anyone had tried this already.

Related:

  1. https://github.com/commanded/eventstore/blob/bc5d6dd6e4f1d54efc667b66197486fe79f8f087/guides/Subscriptions.md
  2. https://jdbc.postgresql.org/documentation/head/listennotify.html
  3. https://discuss.lightbend.com/t/bridging-write-to-read-side-persistence-query-polling/1037/5

Thanks

nremond commented 3 years ago

@mkubala , I think we discussed this at the genesis of the project but I don't remember why we discarded it?