Has anyone built a #Rubocop to assert that all #RailsEventStore event handlers are subscribed to the domain events they expect to receive? If not, I wrote something that might be extractable.
I found 5 event handlers out of 20 that expected some domain events but weren’t wired up properly!
PSA: Don't forget to restart your Rails web server (in development) if you edit `config/initializers/rails_event_store.rb`. I debugged this for an hour before realizing my mistake!
I wrote a #RailsEventStore event handler, and wrote specs for it. Unfortunately, I forgot to associate the event handler and the domain event in `config/intializers/rails_event_store.rb`.
Does anyone know of a Rubocop check that might have helped here?
I wrote a script, but it didn't detect that case. I think I'm almost ready to transform the script to a Rubocop check.
Thanks for any help!
We're using #RailsEventStore and have a slight issue with event handlers ordering.
In a web process, we publish a ReportPublished. This triggers 3 separate enrichment jobs to be launched (Sidekiq). Each of these job publish events: ReportBlueEnrichmentCompleted, ReportRedEnrichmentCompleted and ReportGreenEnrichmentCompleted.
An event handler is subscribed to the Report*EnrichmentCompleted events. It must wait for the 3 events before proceeding (this is the scatter - gather pattern). 1/n
We use #RailsEventStore. We have an Order model that has many Inspections. When inspections are scheduled, we publish an InspectionScheduled. Normally, we want to notify the customer that their inspection was scheduled, but there's a UI flag that allows us to skip notifications.
Right now, we added a boolean attribute on the InspectionScheduled domain event, but I feel like that attribute doesn't belong there.
1/n
I'm looking for a way to speed up a #RailsEventStore projection. What I'd love to do is be able to specify preloads, otherwise, I will be running N+5N queries to fetch all the data I need. If I could do it in N+5, that'd be grand
The query API offered by https://www.rubydoc.info/gems/ruby_event_store/RubyEventStore/Specification will allow me to read events in batches, and from there I can run other queries to fetch the data I need, but the data won't all be linked together, as if read by ActiveRecord.
Do you have pointers or ideas?
We found our first use-case for #RubyEventStore / #RailsEventStore projection at $DAYJOB: analytics.
We publish events regarding a certain process, and we want to derive metrics about the process. Since the events are already in the database, the projection allows us to go "back in time" and extract the metrics from the existing event stream.
In contrast, in a stateful system, the metrics would not be derivable for past objects, only for new changes happening in the system.
#rubyeventstore #railseventstore
A discussion that could have been a blog post: https://github.com/RailsEventStore/rails_event_store/discussions/1457#discussioncomment-4203584
I'll be rewriting some #railseventstore docs next week and event schemas deserve a clearer guide
I'm trying to mash up all kinds of things together at once:
#Hanami 2.0 RC1
#ROM
#RubyEventStore from #RailsEventStore
All of these are *designed* to work together, but the going is rough.
My current status is this patch: https://github.com/francois/LetsMeet/pull/1
The Hanami console boots, but I can't access the event store due to an `ArgumentError: missing keyword: :serializer`. Will sleep on it and see if I can get more progress tomorrow.
Yes, I am following the Hanami 2.0 guide to implement persistence
#hanami #rom #rubyeventstore #railseventstore
Looking now at a quick shell with a disposable postgresql database running in it, reachable by unix socket only. Sounds too good to be true, yet it will significantly improve #railseventstore CI pipelines
This week I've been constantly reminding myself of #nix fu, that I left unpracticed for years.
Back in the day I've contributed initial buildkite-agent.nix module. Today I'm using someone's else github-runner.nix 💚
In 2016 when we've invited Sander van der Burg to introduce #nix to Ruby audience at #wrocloverb, that all sounded exotic.
Today it feels maintsteam and one can play with #nix on #macos easily!
✨ #railseventstore CI is going to have a nice boost with self-hosted workers soon!
#nix #Wrocloverb #macos #railseventstore
Hey all! I’m François, hailing from Quebec, Canada. I deployed my first Rails app back in 2005, on Rails 0.13.1. I’m currently interested in #ddd, #domainstorytelling, #railseventstore and generally anything about designing applications.
Other than programming, I’m also big fan of #factorio, a #scout, and a dad.
Happy to be here!
#ddd #domainstorytelling #railseventstore #factorio #scout