crowdtap/promiscuous — pull request #9 by nviennot (2012-10-08 10:49:34+00:00)
Title: Deferrable updates for mongoid3

Deferring updates is a trade-off:
* It is essential to prevent races with two writers (without having
to use a locking service).
* It reduces the number of published messages since only the latest
update will be sent in a batch, so that's good for performance.
* But it introduces a new kind of issue: messages are no longer
guaranteed to be in order: The subscribers will have to be immune to
receiving out of order updates.

Performance wise, it is not worth it to serialize message by the
updated_at field across collections.

Because of this drawback, we do not defer publishing model creation.
But that's just fine because the two first points are not affected
during model creation.