Time interval between commands

Post here your questions about the Objective-C API for SFS2X

Moderators: Lapo, Bax

Post Reply
arnieterm
Posts: 7
Joined: 06 Aug 2011, 12:25

Time interval between commands

Post 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
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
arnieterm
Posts: 7
Joined: 06 Aug 2011, 12:25

Post 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
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post 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.
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply