3 ms·
I've noticed that on Android, WhatsApp and Gmail sync their data on a periodic basis (probably using WorkManager or something like that). What is an efficient
by fareesh 6y ago
I've noticed that on Android, WhatsApp and Gmail sync their data on a periodic basis (probably using WorkManager or something like that).
What is an efficient architecture for something like this?
Are millions of devices hitting some gateway->load balancer everytime the Workmanager wakes up and polling for whether new messages have arrived?
For example, if my phone does a "sync" 3 minutes from now, as do millions of others around the world, do we all get routed to our respective box that's keeping a queue of our pending messages in memory? If we happen to receive these messages in between the poll intervals via persistent socket or push notification, then the system wipes the in-memory queue.
Am I imagining this correctly or is there a more optimal architecture for something like this?