My backend is in Postgres. I'm using Scala to build APIs of it.
Everytime there is a change in the database, I want my chrome extension to be notified. I've a few questions regarding this:
- Should I implement websockets here or do long polling?
- If web-sockets, are there any good examples of how do I do it using scala + play + Akka and javascript?
- I believe that I've to implement something called as an observer pattern that notifies my chrome extension if there is any change in data. Is there any other pattern that I should follow to get such a thing done with the minimum DB over-head.
- Should I use Redis or RabbitMQ to deal with this particular notification part of things?