cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

How to refresh widgets via a remote thing's event or property change

mfgpartner
12-Amethyst

How to refresh widgets via a remote thing's event or property change

I have a mashup that has a database thing service added to it. The service returns data from a external database table. Instead of adding a auto refresh widget to refresh at a set interval, I want the mashup to refresh when new data is added to that external database table. I can raise an event (on a remote thing that binds to a ThingWorx .NET SDK + database SDK) or I can update a boolean property to indicate a refresh is necessary, but how do I make the mashup react to the event?

I assume there's a way to make a loaded mashup respond to external events such as a subscription..?

Thanks,

Michael

ACCEPTED SOLUTION

Accepted Solutions

I don't think so, to do this, you will need a websocket open between the browser and the server, and there isn't.

You can do the poll to the boolean property you have ( every X seconds ), and if it's true then query for the real data.

View solution in original post

2 REPLIES 2

I don't think so, to do this, you will need a websocket open between the browser and the server, and there isn't.

You can do the poll to the boolean property you have ( every X seconds ), and if it's true then query for the real data.

Thanks Carles. Sounds like I won't be able to use ThingWorx as a real time visualization tool. Polling a property change would be better than an auto refresh of all the sp calls (load wise). I'll have to test it out to see what the load feels like with something checking a property every 30 seconds. :/

Announcements


Top Tags