How does Trello show history so quickly?

后端 未结 3 762
自闭症患者
自闭症患者 2021-01-30 11:23

Trello shows a historial log of everything that any user has done since the board\'s inception. Likewise, if you click on a specific card it shows the history of anything anyone

3条回答
  •  花落未央
    2021-01-30 12:08

    I'm on the Trello team. We use an Actions collection in our MongoDB instance, with a compound index on the ids of the models to which it refers (a Card is a model, and so is a Member) and the date when the action was performed. No fancy caching or anything, except inasmuch as the index and recently used documents are kept in memory by the DB. Actions is by far our biggest collection.

    It is worth mentioning that most of the data needed to display an action is stored denormalized in the action document, so that speeds things up considerably.

提交回复
热议问题