Ruby, JavaScript
Speed up aggregate roots loading with snapshot events Rails Event Store 2.7 is coming in a few days with a new experimental feature: AggregateRoot::SnapshotRepository.
Sometimes it’s worth to test your framework features Rails 6 introduced upsert_all which was a great alternative to raw SQL for inserting or updating multiple records at once. There were gems providing this feature for earlier versions of Rails like activerecord-import, it did a great job in Rails Event Store.
Handling third-party webhooks with Rails Event Store Lately, one of our clients asked us to review his Rails Event Store-based application. We helped him, as RES mentoring is one of the key fields of our professional activity. What caught our attention was the way of handling incoming webhooks from third-party services.
Take advantage of Turbo Streams in event handlers It’s been a time since Rails 7 came with Turbo and its Turbo Streams. At first, I was skeptical because the idea of broadcasting view updates as a sort of Active Record callbacks. Sorry, I’m simply not buying the idea of mixing WebSockets calls into a data model. However, rejecting the concept of Turbo::Broadcastable concern, I see Turbo Stream as a great tool, and I’m sure there is a proper place for it in the Rails app architecture.
Hi, we're Arkency and it's our blog with meaty content.
The final trick when moving from Rails CRUD to Event SourcingFrom CRUD to EventSourcing Did you ever wonder how to actually switch the model from the CRUD one to EventSourcing? There’s one thing you should consider. The initial event that has to be published for existing data. Also called the migration event.
Hi, we're Arkency and it's our blog with meaty content.
Hi, we're Arkency and it's our blog with meaty content.
Hi, we're Arkency and it's our blog with meaty content.
Hi, we're Arkency and it's our blog with meaty content.
Hi, we're Arkency and it's our blog with meaty content.
My previous post on read models intended to address something different, but I decided to focus on read model part and leave the other topic for a different one. There’s one thing which I dislike in the implementation. Using primitives to calculate the scores.
Recently I faced interesting challenge in one of our customer’s application. Imagine that you take a test after which you get a personalised reports about your skills level. Existing mechanism for that was time and resource consuming. People had to wait for e-mail delivery with PDF-generated report several hours due to several constraints, which I would prefer not to dive into.