본문으로 건너뛰기
0

이 레슨은 당분간 영어로 제공돼요.

Be told, do not keep asking

A new high score is saved, and three things should happen at once: friends get a notification, a cache is refreshed and a search index is updated. You could ask the database every few seconds anything new?, but that wastes work and is always late. A change stream lets MongoDB push every insert, update and delete to you the moment it happens.