encapsulation mongodb ( realtime & not realtime )