Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hi TWX team,
We have a use case:
We have two users and if one user modify something from UI and the other user or users should be notified in the UI. This could be implemented by using websocket or server-side push events. But we are not sure if Thingworx internally support this kind of functionality.
If so, could you help point out where could we start?
Thanks,
Kaiqin
The UI does not support push, but the system itself does. You can only poll from the UI, possibly with the auto refresh widget.
Just an idea:
On a save/commit, you can mark a 'dirty' flag somewhere appropriate, and maybe note a user or last changed date. It really depends on your use case.
Then in the UI, you can poll every second or so for that dirty bit/timestamp/user then you can instruct the user to refresh, or overwrite.
Thanks Jason for your response.
Is there any road map for server-side push event support instead of polling?
Cheers,
Kaiqin
I don't know myself, I work for a partner.Would love to know though.
In theory, it may be possible to create a "Listener" widget that interacts with the backend model somehow to then fire an event when data has changed, which you could then wire into whatever you need. But this might just be overkill, since you would be polling from that widget anyway. Probably not worthwile.
Thanks again Jason for your info!