Skip to main content
1-Visitor
November 11, 2015
Question

Does Thingworx support websocket or server-side push events?

  • November 11, 2015
  • 1 reply
  • 2154 views

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

1 reply

November 11, 2015

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.

ksun1-VisitorAuthor
1-Visitor
November 11, 2015

Thanks Jason for your response.

Is there any road map for server-side push event support instead of polling?

Cheers,

Kaiqin

November 11, 2015

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.