Replies: 3 comments 1 reply
-
Spatie maintains it for a huge app. They can't share details but they have shared the size in an interview or something or other. Multi tenant, millions of rows per tenant. Concurrency is an issue I don't think was ever completely solved. If you need it I recommend keeping your projectors synchronous and manually dispatching your own jobs with some sort of locking mechanism. Projections (read model) performance in entirely dependent on you as they are not read from the "stream", they are just regular pieces of state, like database entries, that written on event occurrence. Aggregate reads and retrieval is your "keep up model" and retrieval can slow down over time if you use the keep up method. Snapshot functionality is provided to mitigate this and is effective when applied correctly. However huge aggregates are a bit of an anti-pattern. You usually should only use this technique for smaller and short lived aggregates (think shopping cart). The package doesn't provide any functionality to help with horizontal scaling, but you could easily divide your app onto many micro services, say one per aggregate. I'm not aware of any benchmarks being documented by anyone regarding this package. |
Beta Was this translation helpful? Give feedback.
-
Hey! I'm particularly interested in the concurrency part you mentioned. Could you explain a bit more about "manually dispatching your own jobs with some sort of locking mechanism"? I'm not sure how to implement this, especially considering our setup: We're plugging into Kafka for our events How would you recommend handling concurrency in this scenario? Any tips or examples for implementing the locking mechanism you mentioned? |
Beta Was this translation helpful? Give feedback.
-
Thanks @inmanturbo I will check it |
Beta Was this translation helpful? Give feedback.
-
I'm exploring spatie/laravel-event-sourcing for a potentially high-volume project and have questions about its scalability:
Any insights or real-world experiences would be valuable. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions