Message gurantees on rapidly updated entities in Firebase -
i'd understand how firebase , listening clients behave in situation large number of updates made entity in short amount of time, , client listening 'value' changes on entity.
say have entity in firebase simple data.
{ "entity": 1 }
and value of "entity" updated rapidly. below code writes 1000 integers.
//pseudo-code making 1000 writes possible for(var = 0; < 1000; i++) { ref.child('entity').set(i) }
ignoring transient issues, listening client using 'on' api in browser receive 1000 notifications containing 0-999, or firebase have throttles in place?
first off, it's important note firebase realtime database state synchronization service, , not pub/sub service.
if have location updating rapidly, service guarantees state consistent across clients, not intermittent states surfaced. @ 1 event fire every update, server free 'squash' successive updates same location one.
on client making updates, think current behavior every change propagates local event, wrong , notable exception.
in order achieve guaranteed delivery of every intermediate state, it's possible push
(childbyautoid
in objective-c) onto list of events @ database location instead of updating value directly. check out firebase rest api docs on saving lists of data
Comments
Post a Comment