Replies: 1 comment 2 replies
-
In this example, i would divide the problem. Even if they deal with billions of events, app is divided by "discord servers" - whether it physical servers or not - does not matter. Snapshots - in reSolve meaning they are not very usable here. Snaphot is a state of one aggregate. Snapshot is useful when aggregate has a lot of events. If aggregate has 10 events, it is faster to load these events and run reducer. So in Discord - if aggregate is a message, then it is usually has 1 event, rarely several. Regarding read models being duplication of data. In event-sourced Discord I would probably keep only recent chat history in read models, and compute anything older on-the fly from event store. Or keep those historic read models not in DB, but in files or S3 buckets. Again, ES/CQRS makes this quite easy - just set up read model that writes to files. |
Beta Was this translation helpful? Give feedback.
-
Lately I have been working my way through the Discord Engineering blogs just because its fascinating.
https://blog.discord.com/how-discord-stores-billions-of-messages-7fa6ec7ee4c7
It got me thinking, what are the limits of event sourcing?
Would Event Sourcing be an appropriate technology / usecase for a company like Discord? They want to store every message for all time which seems like a good usecase for Event Sourcing, but im wondering if you have a single event store with billions of eventsin it (growing 40 million events per day) then would it still be appropriate?
Im assuming snapshots would be essential in this case in which case the read models would be duplicating a bunch of data which would be expensive?
Anyways, just wondering what your thoughts are.
Beta Was this translation helpful? Give feedback.
All reactions