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

How to store events

SOLVED
byutz
Newbie

How to store events

We have a gateway in the field that will be sending up events as they happen, and example would be an estop pressed, or a solenoid actuated.  With each event there will be sent a start time and a duration.  What is the best way to store these events?  I would like a general events infotable for each "thing" that holds the name of the event, time, and duration.  Should a new row be added as each event occurs, or should I use a stream and just replace the existing row with the most current event? 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to store events

What I did when facing a similar situation recently was create an infotable type logged property on my thing with a datashape containing the fields I wanted to trap from the event (e.g. maybe for you it is event name, event duration/value, event timestamp... if the value stream timestamp is somehow not appropo). That would give you an ongoing history of events you could query from the value stream (and perhaps purge over time ultimately too).

I then subscribed to data changes on that property and generated whatever property updates and events I want for performing more specific actions on particular types of event names that are received.

View solution in original post

1 REPLY 1

Re: How to store events

What I did when facing a similar situation recently was create an infotable type logged property on my thing with a datashape containing the fields I wanted to trap from the event (e.g. maybe for you it is event name, event duration/value, event timestamp... if the value stream timestamp is somehow not appropo). That would give you an ongoing history of events you could query from the value stream (and perhaps purge over time ultimately too).

I then subscribed to data changes on that property and generated whatever property updates and events I want for performing more specific actions on particular types of event names that are received.

View solution in original post

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.