envato / event_sourcery

A library for building event sourced applications in Ruby
MIT License
84 stars 10 forks source link

Introduce the concept of already actioned events to skip side effects in reactors #118

Closed twe4ked closed 7 years ago

twe4ked commented 7 years ago

This is a WIP and may be force pushed still.


Changes

Process

This is probably better explained by the code or by @vonconrad's comment here: https://github.com/envato/event_sourcery/issues/24#issuecomment-297965493 (See 3.2).

TODO

Fixes https://github.com/envato/event_sourcery/issues/24.

twe4ked commented 7 years ago

Based on the Buildkite agent tags we're running Postgresql 9.3 (postgresql=9.3). Sounds like JSONB support was added in 9.4 so we will need to upgrade if we want to test with JSONB.

orien commented 7 years ago

I know of a few Event Sourcery applications with reactors that emit events via commands/aggregates. How can we support this use case?

twe4ked commented 7 years ago

I know of a few Event Sourcery applications that emit events via commands/aggregates. How can we support this use case?

@orien I may be misunderstanding but unless they're doing that in reaction to an event I don't think this applies.

orien commented 7 years ago

@twe4ked I had edited that comment to be more clear. But I mean exactly that, from a Reactor.

I know of a few Event Sourcery applications with reactors that emit events via commands/aggregates. How can we support this use case?

twe4ked commented 7 years ago

Ah, so you mean the reactors don't use emit_event? Not sure of an easy way to handle that off the top of my head.

orien commented 7 years ago

Yeah, exactly. Sorry to throw a spanner.

twe4ked commented 7 years ago

Closing this as it's really related to https://github.com/envato/event_sourcery-postgres at this point. Also there still seems to be some unsolved problems and differing opinions over how this should work. Until another time! Thanks for all the reviews.