1

I like how Meteor observe and observeChanges methods work. The problem is I use it on a background and need to have only one instance that observes and modifies data. Also it's hungry on CPU resources. My observers perform jobs on specific changes. Since that, I can not scale horizontally, having my observers in main app. That's why I'm looking for something lightweight for that purposes.

What is the best practice to observe mongo? Are there any other technologies?


I'm not aware of oplog tailing. This question is exactly about it. Some lightweight technology for oplog tailing.

ZuzEL
  • 12,768
  • 8
  • 47
  • 68
  • 1
    have you read about oplog? http://www.manuel-schoebel.com/blog/meteorjs-and-mongodb-replica-set-for-oplog-tailing. Seems like there are node.js packages to monitor the oplog directly, too: https://www.npmjs.com/package/mongo-oplog – Christian Fritz Feb 22 '16 at 19:50
  • @ZuzEL the observe functions can be CPU intensive when they are used in publishers, or when there's a lot of oplog traffic. Have you noticed CPU issues in your production app? – David Weldon Feb 22 '16 at 22:34
  • @DavidWeldon yes and it's huge. Since observers are kind of background tasks, I can not scale horizontally having my observers inside application. That's why I'm looking for something lightweight just to observe changes/tail oplog. – ZuzEL Feb 22 '16 at 22:47
  • @ChristianFritz thanks for the package, seems like what I'm looking for. – ZuzEL Feb 22 '16 at 22:48

1 Answers1

0

Want you are looking to monitor is the oplog. Tailing the oplog is part of how Meteor does it's reactivity, and the best option out there right now to do this sans Meteor by-far is mongo-oplog.

If you feel like getting your hands a little dirty, definitely read through the docs to better familiarize yourself with the oplog.