redis-oplog icon indicating copy to clipboard operation
redis-oplog copied to clipboard

disableMongo configuration for Vent-only mode

Open edemaine opened this issue 3 years ago • 10 comments

Adds a disableMongo configuration option for disabling all the Mongo overrides, but still connecting to the Redis server, which I gather from #359 and #361 is useful for just using Vent.

I thought about naming this overrideMongo to parallel the old overridePublishFunction (and can change if desired), but given #357, I feel like it could be helpful to override Mongo even when Redis isn't being used, so felt like this was a more accurate name.

Fix #359, fix #361, and sort of relevant to #323.

edemaine avatar Sep 23 '20 14:09 edemaine

@edemaine thanks. I had a test and it works perfectly!

afrokick avatar Sep 23 '20 15:09 afrokick

@edemaine This is perfect timing, I was wanting to use Vent but wasn't quite ready to switch to full mongo redis-oplog. I have already done a quick test and it works great. Thanks.

jamesgibson14 avatar Sep 23 '20 18:09 jamesgibson14

I would rather use the verbose version ( "extendMongoCollection: bool") + you also have to add to the documentation about a "Vent Only Solution". the problem with this is that we have overridePublishFunction and disableMongo. Something doesn't fill uniform about this. "DisableMongo" makes me think of something bad like disabling the database all together.

theodorDiaconu avatar Sep 24 '20 02:09 theodorDiaconu

@edemaine could you please finish it?

afrokick avatar Sep 24 '20 22:09 afrokick

@theodorDiaconu OK, I did the suggested rename -- that is a better name. I also added a small section to docs/vent.md. Let me know if you'd like this moved somewhere else.

Keep in mind that overridePublishFunction doesn't exist anymore, as redis-oplog no longer overrides Meteor.publish in any situation (as far as I can tell).

edemaine avatar Sep 25 '20 20:09 edemaine

Right, observeChanges is what is overridden now. It sends directly to the regular callbacks in Meteor's publish. My feeling is what we should have a separate package for redis-only events. This package is becoming bloated.

ramezrafla avatar Sep 25 '20 21:09 ramezrafla

@ramezrafla I want to use only Vent because another features require a lot of time to refactor project. So, I’ll adopt project step by step.

afrokick avatar Sep 26 '20 16:09 afrokick

@theodorDiaconu seems like @edemaine finished the work. Could you please review and merge it?

afrokick avatar Sep 29 '20 09:09 afrokick

We'll have to fix the tests. To be able to merge.

theodorDiaconu avatar Oct 06 '20 08:10 theodorDiaconu

I have been using this option for a couple of years now on some prod apps, its great for real-time redis data through ddp and Vent. It would be nice to get it into the next release.

jamesgibson14 avatar Sep 22 '22 19:09 jamesgibson14