cvc
Posts: 0
Joined: Sat Nov 09, 2013 5:12 am

Real time Sync

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?

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Real time Sync

Hello,

How many records does your service return?

cvc
Posts: 0
Joined: Sat Nov 09, 2013 5:12 am

Real time Sync

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.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Real time Sync

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/...

cvc
Posts: 0
Joined: Sat Nov 09, 2013 5:12 am

Real time Sync

Hi Katya

are you insinuating that real time sync is not possible. Isn't there a manual way of achieving this?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Real time Sync

Hi,

It's possible. But as you mentioned speed is low, this depends on channel speed, you can't just increase its value.

cvc
Posts: 0
Joined: Sat Nov 09, 2013 5:12 am

Real time Sync

so how can I achieve realtime sync?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Real time Sync

Real time sync has to be coded by you.. for instance, you could try using http://pusher.com/

cvc
Posts: 0
Joined: Sat Nov 09, 2013 5:12 am

Real time Sync

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.

Return to “Issues”