What i would like to do is:
- User1 and User2 are friend
- Both have an open websocket
- User1 post a new document
- Because of friendship, User2 receives the document within the websocket
I've checked the percolator.
It seems i can use it that way:
- User2 registers a percolator query to get documents of all its friends
- User1 index the document and get the percolator query match (i think i
read we can get percolator results at index time)
- User1 current indexing sends notifications to its friends open websockets
so that they receive the information
The matter is that it can be quite expensive to send the notification from
user1 doc indexing process to the user2 websocket handler.
In a distributed webapp, it would require messaging.
I think a tool which handles distributed event processing, like Redis,
would fit for that need.
To avoid using Redis or something else, would it be possible for
ElasticSearch percolator to directly send the notification to the user2
Is it possible that user2 registered percolator query keeps some kind of
connection to elasticsearch and receive results as they get indexed?