cult-of-coders / redis-oplog

Redis Oplog implementation to fully replace MongoDB Oplog in Meteor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reduce code duplication by proposing to split up the mongo package

SimonSimCity opened this issue · comments

I've now dived quite much through the code-base and got the understanding that the following files also could be used as they are in the codebase of the meteor/mongo package:

  • mongo/lib/observeChanges.js
  • mongo/lib/ObserveMultiplex.js
  • mongo/lib/PollingObserverDriver.js

All these lines could be taken straight from the meteor-developed package. I think we should propose something to Meteor here:

We should implement a way to allow other classes to replace the OplogObserveDriver internally available in meteor/mongo and force the canUseOplog even if self._oplogHandle isn't set in https://github.com/meteor/meteor/blob/24865b28a0689de8b4949fb69ea1f95da647cd7a/packages/mongo/mongo_driver.js

This might require to put files like polling_observe_driver.js and oplog_observe_driver.js into their own packages, but it would also make this package a first-class-citizen - and not a dirty hook with a lot of copying of files.

E.g. we didn't get the benefit of meteor/meteor@86dba2b even if we could easily have had it in here.