Hi all,
I am interested in using Play Framework to build a streaming API like Twitter has for a project I'm assigned to.
My question is fairly straight forward. Events for when I have data available to stream are not being generated by clients as they do in traditional bi-directional websocket applications such as a 'chat' program. In my case, someone might enter data into a database and I'd have a trigger that needs to send a broadcast to all connected clients. Or I might have a file added to a directory that has a JSON message in it that I need to broadcast to all connected clients.
Whatever the external factor is, I need a way to communicate with Play Framework in order to be able to broadcast messages to clients. Ideally, clients will be registered to a topic in something like Redis pub/sub and I can simply push events via Redis. Not sure if Play has any plugins currently for websockets to work with redis pubsub, but that would be a super convenient way to build what I'm working on.
Surely someone has used Play to communicate with connected clients with events generated outside of the webapp itself. What are some current solutions out there to look at and study in order to go forward with this?
Thank you.