javascript - What is the difference between making several simple subscriptions and a single complex one? -
is there practical difference between keeping several simple (plain) subscriptions , keeping single complex (many levels) one? (with publish-composite, example)
seems me there shouldn't difference, wanted sure. prefer sticking plain subs seems make code clearer in highly modular projects, if wouldn't bring performance or scalability issues.
so, can me?
there 2 key differences in doing several plain subscriptions vs. keeping complex composite subscription
1) exposure/privacy
a composite subscription allows perform joins/filters on server side ensure send data current user has authority see. don't want expose entire database client. keep in mind if ui not showing data, user can go console , grab data server publishes.
2) client performance
performing joins/filters on client can expensive if have large dataset. of course dependent on application. additionally, if database being updated, , updates should not visible user; need transfer updates client without deriving benefits network expense.
Comments
Post a Comment