Important: Please read the Qt Code of Conduct -

QtRO - few RO with many properties vs many RO with few properties

  • Hello everybody,

    I have much information to be transferred periodically like thousands of sensor states and other info.

    In general, would it be better to have few remote objects with many properties representing a lot of sensors or many remote objects representing one sensor each with few properties?

    thanks in advance for your input!
    best regards

  • Qt Champions 2017

    Are they same sensor types or different sensor types ?

  • @dheerendra Hi and thanks for your reply!
    There are several sensor families with different kind of properties.
    Example Temperature Sensor with temp, state and name properties,
    Pressure Sensor with pressure, state, name and location properties etc.
    There will be a bunch of others but I don't have the exact info yet.

  • Qt Champions 2017

    You are better off to make the different sensor types with appropriate properties. It will be helpful for you segregate the data properly & also for troubleshooting.

  • @dheerendra I totally agree concerning the sensor type approach, that is standard object approach. But I wonder if it would be better to have one RO that holds a list of TempSensors, a list of PressureSensors etc. or to have each and every sensor be its own RO. I guess that one approach will have better performance than the other. for info, the client app will use the RO directly in QML.
    In one case we will have more info to be transmitted in one connection and in the other we'l have more connections.
    Any idea which is the better one?

Log in to reply