2

Store Multiple Events To 1 Collection

  • Held for moderation
  • Open

J
jorions

Currently every new event listener for each contract requires a new MongoDB collection.

MongoDB recommends against having more than 10,000 collections, regardless of the size of each individual collection, as it begins to mess with the Tiger Engine's index traversal speed, causing a sharp decline in performance.

We have an architecture built upon factory contracts which create clones, each of which emit their own events. We are going to rapidly hit the 10,000 collection limit because of this.

Ideally, we would be able to store the same event from each clone contract to the same MongoDB collection.

A