SamCooper / COM_SPEC_RIDS

1 stars 0 forks source link

COM Object time mismatch Time vs. FineTime #88

Open CesarCoelho opened 8 years ago

CesarCoelho commented 8 years ago

The COM Object time is not clearly defined if it uses the structure Time or FineTime. I understand that time is defined as a "may be" for the Arrchive service and that is not explicit that a COM object contains time. Archive Object Identification: "Additionally, each object may be tagged by a timestamp"

The structure in the ArchiveDetails contains the field timestamp defined as FineTime. But the structure used to send the Events: UpdateHeader, contains the field timestamp defined as Time. This means that there might exist conversions between both and this might cause the loss of information regarding time.

Suggestion: Use the same time structure for both objects to avoid loss of information during conversions between them.

CesarCoelho commented 6 years ago

From experience, the proposed time structure to be used should be MAL::Time. Reasons:

  1. Because it is used in the UpdateHeader.
  2. Because it is less data to be stored in the COM Archive
  3. Because the time for most of the COM Objects is does not to be stored with high precision. And in case high precision is needed, a dedicated COM Object with a timestamp field on the structure present on the Object Body could be created.

Concretely, from this RID there are two changes:

  1. Clearly define what is a COM Object and what MAL Data Type should be used for its timestamp. (On the current book, the COM Object fields and respective data types are not explicit)
  2. Change the timestamp field of the ArchiveDetails structure, from MAL::FineTime to MAL::Time