2 Replies Latest reply on Apr 29, 2016 11:37 AM by byutz RSS
    byutz Apprentice

    Proper Method of Storing Data

    I have an application where we are logging several properties on different pieces of equipment.  I originally set them up with value streams because its a very quick and easy way to log data.  However, we now require that all of the properties be logged at precisely the same time, so that we can have a file with a row having 1 timestamp and all of the property values at that time.  Should I be using a regular Stream for this so that I can control the logging?   I have never used one before and it seems like the documentation talks a lot about Value Streams and very little about Streams.  Thank you!

      • Re: Proper Method of Storing Data
        jasong Creator

        A stream would be a better choice, yes. All you need is to look for the Add / Update / Delete StreamEntries services on the stream.

         

        But keep in mind the current ThWx limitations: Where Should I Store My Thingworx Data?

         

        We sometimes create a Stream for each device, so that we can keep the number of rows low, rather than store all data for all devices in a single stream. Regardless, if you are going to keep more than 1/2 a million rows in a single stream, which is not really that much, you should offload that to SQL and use the Database ThingTemplate to wire it in.

          • Re: Proper Method of Storing Data
            byutz Apprentice

            Jason, thanks for the info!  You already answered another question of mine on creating one stream or one per object.  Do you just create service on the thing template to handle adding the entries to a stream using the AddStreamEntry service that's built into the stream?