Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Messages: Add new message fields to message spec #210

Merged
merged 3 commits into from
Nov 8, 2024

Conversation

splindsay-92
Copy link
Contributor

@splindsay-92 splindsay-92 commented Oct 10, 2024

Updated Message class in the textile/features.textile file to support new message fields related to materialisation.

Additions to the Message class:

  • Added the action field to represent the type of the message, using the MessageAction enum. (
  • Introduced the serial field to store the serial number of the message.
  • Added refSerial and refType fields for messages that reference other messages.
  • Included updatedAt and updateSerial fields to track the update and deletion ordering.
  • Added the operation field, which is a object containing optional fields such as clientId, description, and metadata.

@splindsay-92 splindsay-92 changed the title materialization: Add new message fields to message spec Messages: Add new message fields to message spec Oct 10, 2024
textile/features.textile Outdated Show resolved Hide resolved
textile/features.textile Outdated Show resolved Hide resolved
@splindsay-92 splindsay-92 force-pushed the materialisation/support-new-message-fields branch from 32a69df to 151d71f Compare October 18, 2024 13:43
@splindsay-92 splindsay-92 force-pushed the materialisation/support-new-message-fields branch from 151d71f to ec04d4e Compare October 23, 2024 12:26
@splindsay-92 splindsay-92 requested a review from AndyTWF October 23, 2024 12:27
@splindsay-92 splindsay-92 force-pushed the materialisation/support-new-message-fields branch from ec04d4e to bf88949 Compare October 25, 2024 13:35
@splindsay-92 splindsay-92 force-pushed the materialisation/support-new-message-fields branch from bf88949 to cc0073d Compare October 25, 2024 17:22
textile/features.textile Outdated Show resolved Hide resolved
textile/features.textile Outdated Show resolved Hide resolved
textile/features.textile Outdated Show resolved Hide resolved
textile/features.textile Outdated Show resolved Hide resolved
textile/features.textile Outdated Show resolved Hide resolved
textile/features.textile Outdated Show resolved Hide resolved
textile/features.textile Outdated Show resolved Hide resolved
textile/features.textile Outdated Show resolved Hide resolved
@splindsay-92 splindsay-92 force-pushed the materialisation/support-new-message-fields branch from cc0073d to b25f641 Compare October 31, 2024 10:25
…documentation

- Added @action@ enum field in the message structure, which specifies the type of the message action. It includes a series of predefined actions (CREATE, UPDATE, DELETE, etc.).
- Added additional fields `serial`, `refSerial`, `refType`, `updatedAt`, `deletedAt`, and `operation` to the Message data type.
- Update the Message class to reflect the new members.
- Added section on REST and Realtime publish that now requires the message action field to be set on publish.
@splindsay-92 splindsay-92 force-pushed the materialisation/support-new-message-fields branch from b25f641 to edaf89c Compare October 31, 2024 10:39
Copy link
Member

@SimonWoolf SimonWoolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a couple small further changes, but pre-approving after you make those.

*** @(TM2N2)@ @description@ string
*** @(TM2N3)@ @metadata@ object - used to contain any arbitrary key value pairs of type string.
** @(TM2O)@ @updatedAt@ time in milliseconds since epoch at which an operation occurred. This field is always populated on messages received with an @action@ of @MESSAGE_UPDATE@ or @MESSAGE_DELETE@..
** @(TM2P)@ @updateSerial@ string - an opaque string that uniquely identifies the operation. This field is always populated on messages received with an @action@ of @MESSAGE_UPDATE@ or @MESSAGE_DELETE@.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • the spec uses the convention that the letters in spec items other than the initial section name (eg the p in TM2p) is lowercase
  • you reference a TM5 from the IDL that lists the actions, where is it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made the case changes and included TM5.

…documentation

- Added @action@ enum field in the message structure, which specifies the type of the message action. It includes a series of predefined actions (CREATE, UPDATE, DELETE, etc.).
- Added additional fields `serial`, `refSerial`, `refType`, `updatedAt`, `updateSerial`, and `operation` to the Message data type.
- Update the Message class to reflect the new members.
@splindsay-92 splindsay-92 force-pushed the materialisation/support-new-message-fields branch from 18d3c8f to fef29bc Compare November 8, 2024 13:53
@AndyTWF AndyTWF merged commit 5ae823a into main Nov 8, 2024
2 checks passed
@AndyTWF AndyTWF deleted the materialisation/support-new-message-fields branch November 8, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants