Skip to content

Question: Why it is not allowed to mix :any and integer version?Β #1924

@volodymyr-mykhailyk

Description

@volodymyr-mykhailyk

While writing my event sourced app encountered this limitation (inability to mix :any and integer version). Setting aside implementation of gem - on conceptual level - why you designed such limitation?

In my mind from business prespective - it is ok to have a stream that stores a collection of random events related to one entity while there is certain point in a lifecycle of this entity I want to synchronize (lock) across threads.

So my assumption was that I can publish events with any, and then at some point get last event from a stream and use it position as optimistic locking mechanism to prevent concurrent updates of the entity. I know I can have a separate stream for such synchronization but I hesitate to pollute my app with dozen/hundreds of streams

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions