如何Trello显示历史如此迅速? [英] How does Trello show history so quickly?

查看:186
本文介绍了如何Trello显示历史如此迅速?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Trello显示自董事会成立以来,任何用户所做的一切的史传日志。同样,如果你点击一个特定的卡上它显示了什么人的历史已经做了相关的卡。

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 has done related to that card.

保持每一次改变/添加/删除被无限期保留必须收集大量的数据资料,并且还就写入历史跟踪日志(假设它会立即写入到各种各样的数据存储)潜在的瓶颈的轨道。我的意思是,这是不喜欢它们存储在日志文件中小号$ P $垫对面,他们只收集,当他们需要找到一些解析服务器1000的一切 - 他们显示了所有这些信息的所有的时间。

Keeping track of every change/addition/deletion that is kept indefinitely must collect a ton of data and also potentially bottleneck on writing to the history trail log (assuming it is written immediately to a data store of sorts). I mean, it isn't like they are storing everything in log files spread across 1000's of servers that they only collect and parse when they need to find something -- they are displaying all of this info all the time.

我知道这是不是提供了这样的事情的唯一服务,但你将如何去架构这样的系统?

I know this isn't the only service that provides something like this, but how would you go about architecting such a system?

推荐答案

我在Trello团队。我们使用一个操作集合在我们的MongoDB实例,对模型的ID来它是指(A卡是一种模式,所以是一个会员)和日期执行操作时,一个复合索引。没有花哨的缓存或任何东西,除了因为作为指数和最近使用过的文件由DB保存在内存中。行动是迄今为止我们最大的集合。

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.

这篇关于如何Trello显示历史如此迅速?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆