When designing a simple product manager for our website, we would like organize our products in categories.
Both product and category are aggregate roots. Each category has a product references property with a list of product identities. Products are unaware of the categories they belong to. Categories can be deleted without having to update products.
However some categories can have a large amount of references (over 50k). The events in the domain are fine-grained, so every reference being added, changed or deleted results in an event.
Currently we use a snapshot strategy to prevent having to read all events when loading a category, but we are wondering if there are better strategies to manage (large amounts of) references.
Curious about your ideas!