Question

I wanted to sync the text box content to different clients through Angular + Firebase. I have doubt that whenever i type each letter, will the firebase sync with the database?

Will it affect the network bandwidth? Basically How it works?

Was it helpful?

Solution

If you use AngularFire's 3-way data binding (i.e. the $firebase(ref).$bind method), then each letter you type will be synced with Firebase. The bandwidth requirement will scale with each keystroke.

If bandwidth is a concern and you don't want synchronization per keystroke, there are a couple of other options:

  • Use explicit bindings with AngularFire that only sync to Firebase when you call certain methods like $set() or $save()

  • Use a OT library like Firepad that implements granular collaborative text editing: http://www.firepad.io

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top