Modelling variable components / quantities
Have a modelling best practices question - have a case where we need to manage/monitor devices within a process mfg setting that follow a standard thing template / thing shape hierarchy. The product family itself breaks down to 3 main product types. There is one additional aspect to consider - any specific device can have between 1-12 separate 'components' installed. Each device 'component' has it's own set of properties, and we need to store these component-specific property values and also maintain history of all component property values for all devices.
This to me seems a typical use case for 'componentization' - so we model each component as separate Things with their own template/shape, then relate these component things to their parent device thing.
So first question - is my above conclusion correct?
Second question - how best to relate the component things to their parent device? A few ideas spring to mind:
- Define an infotable property in the device thing template/shape – this infotable stores the ‘thing names’ for the related components
- Store relationship between device / components in TWX datatables
- etc
What I'd like to get to is a situation where we have scripted services written generically for managing component-specific properties on the devices that can be used via REST API, easily used in mashups etc. For example, a service that can take in a device id, a component id, and retrieve property history for that specific component.
Be interested in understanding past experiences.
Thanks in advance,
Roy

