Page 1 of 1

Time interval between commands

Posted: 01 Sep 2011, 15:42
by arnieterm
I am using SmartFox pro for an iOS application that needs to send small amount of data frequently based on user interaction. The data is in the form of NSDictionary. I would like to know whether there should be some minimum time interval between two calls to a method in smartfox client that sends this data. Do I need to construct some queuing mechanism that sends the data after some minimum time interval.
Thanks
Arnieterm

Posted: 09 Sep 2011, 13:04
by Lapo
No, in general the queuing process is handled by the server.
As regards the minimum interval... this is dictated by the physical limits of network connections. Typically a very good connection has a lag of at least 50-60ms so we recommend to send with a frequency < 20msg/sec.

This is valid for desktops/web apps. Mobile connections are usually not this fast so I would go down to 5-6 msg/sec.

hope it helps

Posted: 17 Sep 2011, 11:38
by arnieterm
Thanks for your reply
I an sending 2-4 NSDictionary object(s) per second. The NSDictionary objects are small ones. But my problem is that when I go for sending 4 NSDictionary objects then I only receive two objects and third one arrives after some time. Can you tell why there is such delay? Also there seems to be no way of determining whether "- (void)sendObjectToGroup:(NSMutableDictionary *)obj userList:(NSArray *)userList roomId:(NSInteger)roomId" method of smartfox client is successful or any failure occured.

Please help.
Thanks & Regards
Parvez Qureshi

Posted: 18 Sep 2011, 13:38
by Lapo
WIthout seeing the code is quite difficult and even with the code it's not going to be easy, if it's a network issue. You should add more details on how this test is done. (type of network, type of client, network latency...)

Try testing locally (LAN) and if you get the data without delays it's definitely a network issue.