So here I am again with another question, wooo!
I made a previous post about interfacing with the Plone control panel using React and the REST API. One of my targets, or shall we say ‘features’ that I’d like to implement is a Server -> Client connection using SocketIO. Every time an administrator creates an item I fire a subscriber event which triggers a SocketIO emit. I want the client (using the React app) to receive a notification or an automatic content update when say, a new News Item is created…
So my question is on how to implement this, I’ve looked into a few options but my noobness in the whole websocket area is preventing me from figuring out a solution.
The Python SocketIO doesn’t really show any solutions that I can see would be relevant to Plone. As an alternative I tried to see how people have implemented SocketIO with Django but yeah…?
If I create a SocketIO server separately how can I make an emit on the Plone event. There isn’t anyway to connect per-say to the server.
If I want to create a parallel instance to Plone that listens on a separate port, how would I go about that…
It’s a little tricky, my words are a little short, so maybe someone understands this better and can offer some ideas on how to get this working.
Plone (IObjectCreatedEvent) -> SocketIO emit update -> Client on React app is listening, and receives update (Component code runs)