-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
As a reminder, the message formats are described in the task list:
I have some questions and remarks concerning the SNEWSObservation model:
- Should we use only one dataclass for the three tiers of message? I believe it is difficult for a dataclass to have optional fields, so that would mean leaving some fields blank when sending the message. If we do so, do we add an identifier for the tier of the message?
- When creating a SNEWSObservation object, a
message_idfield is required. The documentation indicates that it is “for the purpose of recording and tracing messages for SNEWS usage”, but this raises the question: should every id of every message be unique?
If so that would mean that every experiment should listen to the SNEWSOBSERVATION topic and record the ids to avoid duplicates, in this case an id that is given server side would surely be more efficient.
Another possibility is that the id is unique for a given experiment (meaning that experiments need to keep track of the number of alerts they sent). - I believe letting each field containing an arbitrary string is a bad idea (perhaps it was done that way waiting for the decision of the proper format). By restricting what the model can be, errors can be avoided and the handling of message should be easier server-side.
One possibility is to verify each string (either by verifying they are in a list of authorized strings, or by parsing them to verify the format) at the creation of the object.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels