Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,14 @@ that contains both context and data).
* Constraints:
* REQUIRED
* MUST be a non-empty string

### ordinal
* Type: `String`
* Description: Value expressing the relative order of the event. This enables
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would we need to say what its relative to? Also, are there any uniqueness constraints? Could a source just put "1" for all events and still be compliant?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@duglin - good call, I should've included that it must be increasing contiguously

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think requiring it to increase contiguously would be too limiting, not all sources of events could guarantee that - particularly if you had something that was filtering events, to output a contiguous sequence, it would need to keep track of all ordinal sets in order to renumber the ordinal field and have to implement atomic increments of the field etc. In contrast, if it's monotonically increasing, then such a filter could be stateless.

Copy link
Copy Markdown
Author

@BenBeattieHood BenBeattieHood May 25, 2018

Choose a reason for hiding this comment

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

If you're filtering events, then you need to be projecting to a new stream, something like:
event -> consumer -> command (incl validation) -> new_event
because your validation and reprojection changes. Filtering and writing directly into a new stream without validation (unless an explicit pass-thru) would break the stream's truth.
Contiguous events are simple to do if you're validating events - events can't validate without a validating state, and a validating state represents a projection at an ordinal (..ie so you already need to have the ordinal).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Another way of thinking about it is that one can filter commands, but not events.

interpretation of data supercedence.
* Constraints:
* REQUIRED
* MUST be a non-empty lexicographically-orderable string

### source
* Type: `URI`
Expand Down