How to Dev - From Data Modeling to Entity Messages


Warning message

  • You can't delete this newsletter because it has not been sent to all its subscribers.
  • You can't delete this newsletter because it has not been sent to all its subscribers.


Thumb Rules on Snap4City from Data Modelling to Messages.

Figure: Example of relationships among Entity Model (IoT Device Model), Entity Instance (IoT Device),
Entity Messages (IoT Device Messages), according to the Snap4City terminology of 2023

In Snap4City:

  • The relationships among models, entities/devices and messages are depicted in the previous Figure
  • the Entity Models (IoT Device Models) can be simply instantiated from:
  • the Entity Models can be customized.
  • Each Entity Models / IoT Data Model is a template to produces Entity Instances / IoT Devices by registration (virtual or physical, does not matter). In the model creation one can specify static attributes describing
    • nature/sub-nature
    • a number of static variables, just defined once at the device creation.
    • if the device can move or not (be mobile device or not), changing GPS data
    • if the device is a certified one via BlockChain (beta version)
  • Each Entity Models / IoT Data Model can
    • Be modified in terms of attributes, variable, etc., without creating any change in the Entities Instances / IoT devices already produced in the past from the model.
  • The Entity Instances / IoT Devices can be classified into
    • Physical Entities (token, on board unit on the vehicle, device for assessing the drive attention, etc.). All Physical Entities are sending data on the platform on server via some Broker or other data ingestion process, for example via some local application, third party service, Edge solution, etc.
    • Virtual Entities (Vehicle, Driver, DriverHealthiness, VehicleEvent, DriverEvent, DriverAnalysis). Virtual Entities are managed on server side for managing data and providing a set of user interface views for data entry (registering data) and for data rendering visualization.
  • Entity Instances / IoT Devices can be created in Snap4City by means of:
  • Entity Instances / IoT Devices
    • Can be modified in terms of variables and variable types without affective the Entity Model, neither the lost of pass data from Entity Messages.
    • Cannot be modified in term of Entity/device name which is unique forever.
    • Can be canceled, but actually the cancelation is not a physical delete of data and device, it is only a change of status on deleted, so that from administrator you can recover the case.
  • Entity Messages are data messages sent over time changing the value of the Entity. They have to compliant with the Entity Instance, and may create Time Series as described in the next Figures.