Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8750383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:51:17+00:00 2026-06-13T12:51:17+00:00

Observe I was trying to figure it out how cursor .observe runs inside meteor,

  • 0

Observe

I was trying to figure it out how cursor.observe runs inside meteor, but found nothing about it.
Docs says

Establishes a live query that notifies callbacks on any change to the query result.

I would like to understand better what live query means.

  • Where will be my observer function executed? By Meteor or by mongo?

Multiple runs

When we have more than just a user subscribing an observer, one instance runs for each client, leading us to a performance and race condition issue.

  • How can I implement my observe to it be like a singleton? Just one instance running for all.

Edit: There was a third question here, but now it is a separated question: How to avoid race conditions on cursor.observe?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:51:17+00:00Added an answer on June 13, 2026 at 12:51 pm

    Server side, as of right now, observe works as follows:

    1. Construct the set of documents that match the query.
    2. Regularly poll the database with query and take a diff of the changes, emitting the relevant events to the callbacks.
    3. When matching data is changed/inserted into mongo by meteor itself, emit the relevant events, short circuiting step #2 above.

    There are plans (possibly in the next release) to automatically ensure that calls to subscribe that have the same arguments are shared. So basically taking care of the singleton part for you automatically.

    Certainly you could achieve something like this yourself, but I believe it’s a high priority for the meteor team, so it’s probably not worth the effort at this point.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Was just thinking about this question while trying to figure out some code written
I'm trying to figure out how to observe just one particular section of the
I am trying to figure out if there is any difference in performance (or
I am trying to figure out what I am doing wrong with ActionMailer. I
I'm having a real pain trying to figure out why KVO is retaining all
I'm trying to figure out why I am getting this error when my Magento
I have been trying to figure out how to implement a simple xml rpc
I am trying to replot the following figure in a more legible way. Observe
I am new to PyEphem and I am trying to figure out what it
I am trying to figure out a way to log the changes when someone

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.