Page 1 of 3
Real time Sync
Posted: Sun Jan 26, 2014 3:46 pm
by cvc
I'm creating a chatting app. How do I achieve real time sync. What I have done currently is to invoke list service every 3 seconds on page show event like this:
function reList() {
list.execute({});
setTimeout(runCode,3000);
$('.ui-loading div.ui-loader').css('display', 'none');
}
reList();
this seems to slow down the app a lot.
Is there a better way to do this?
Real time Sync
Posted: Sun Jan 26, 2014 4:32 pm
by Igor
Hello,
How many records does your service return?
Real time Sync
Posted: Sun Jan 26, 2014 9:17 pm
by cvc
service returns all records available at the moment. I intend to limit that to 20 each time. I wonder how the number of records returned would affect real time syncing. especially as it is a chat app.
Real time Sync
Posted: Mon Jan 27, 2014 3:37 pm
by Kateryna Grynko
Hello,
You can't increase speed this way. Passing data between client and server takes some time. This can be helpful: https://getsatisfaction.com/apperyio/...
Real time Sync
Posted: Mon Jan 27, 2014 3:57 pm
by cvc
Hi Katya
are you insinuating that real time sync is not possible. Isn't there a manual way of achieving this?
Real time Sync
Posted: Mon Jan 27, 2014 9:57 pm
by Alena Prykhodko
Hi,
It's possible. But as you mentioned speed is low, this depends on channel speed, you can't just increase its value.
Real time Sync
Posted: Tue Jan 28, 2014 10:23 pm
by cvc
so how can I achieve realtime sync?
Real time Sync
Posted: Tue Jan 28, 2014 10:31 pm
by maxkatz
Real time sync has to be coded by you.. for instance, you could try using http://pusher.com/
Real time Sync
Posted: Tue Jan 28, 2014 11:47 pm
by cvc
Thanks for sharing! I'm currently trying to use Firebase. I'll see if it works. If I need help? I'll let you know.
Real time Sync
Posted: Tue Jan 28, 2014 11:47 pm
by cvc