Q
Q
QQ2015-09-27 02:45:38
MongoDB
QQ, 2015-09-27 02:45:38

How to do two-way reacting to data change in MongoDB (AngularJS) DB?

Hello.
Actually a question in a subject.
It is necessary that when changing it in the database (via the admin panel), immediately react and change the data on the page. After timeout, check and make requests every n-th number of seconds. not an option, it loads a lot. Is there some kind of trigger that pulls MongoDB when something changes in the database, on which you can hang an event? Or what's the solution?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lega, 2015-09-27
@lega

Via oplog is a dirty hack.
You have a code that writes to the database, so let it "notify" about changes, delivered via websocket.

B
Bohdan Shtepan, 2015-09-27
@virtyaluk

hiddentao.github.io/robe/#oplog

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question