Currently, I am in the process of creating an application utilizing mongo and sails. As part of my development, I am investigating how the real-time update feature in sails functions.
Although I am currently using sails 0.9.16, I am also curious about answers pertaining to sails 0.10.
My goal is to have a list automatically updated whenever new documents are added to the corresponding collection. This functionality works smoothly when I insert documents using sails sockets by sending a post message. In this scenario, I can observe other clients receiving notifications and the list on their end being refreshed.
The challenge arises from an external service that writes directly to the mongo database, causing the collection to continuously grow. Unfortunately, any new elements created through the external service are not being notified to listening clients. As a result, users must manually refresh the web page to view these new elements.
In light of this situation, I have some questions:
- Is it expected for notifications regarding database creations to function even if they originate outside of sails?
- If so, does this necessitate specific configurations to be implemented?
- If not, what would be a recommended approach to maintain an up-to-date client-side listing of a collection with ongoing changes to the database?
Cheers!