You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use mongoose in a game server development. Mongoose has ability to track data change and sync to database.Now I want to sync data to client at data change.But this sync mechanism can't use mongoose's build-in.Because the sync opportunity is various(database'data is cached in memory and sync to database at player offline)
The text was updated successfully, but these errors were encountered:
Not that I know of. Node's Object.observe() function may be helpful, but I'm not sure how well that'll work with mongoose documents. I would try: Object.observe(doc._doc, function() {});
Not very extensible I'm afraid. At a high level, mongoose uses Object.defineProperty() to define custom getters/setters for every field you define in your schema and uses those to track changes on documents.
I use mongoose in a game server development. Mongoose has ability to track data change and sync to database.Now I want to sync data to client at data change.But this sync mechanism can't use mongoose's build-in.Because the sync opportunity is various(database'data is cached in memory and sync to database at player offline)
The text was updated successfully, but these errors were encountered: