Im trying to communicate with 2 xmpp clients but this is not like messaging or chatting. It's more like event caused at one end and action performed at other (realtime). I wish there will not be any latency time when a Client A is trying to send packets to Client B. If available will there be any possible way to minimalize that it should be un noticed.? Is it possible to do this or by any other means?
Asked
Active
Viewed 683 times
1 Answers
0
First of all, that is still messaging.
As for you latency, there will always be some latency when sending data between processes. You haven't said what tolerance levels you are looking for as opposed to what you are getting so it is hard to say what you should do to improve them.
The biggest factors to any current latency you have will be message size and network speed. Of course direct point to point communication would remove one hop for you message, but without knowing your application there is no way of saying whether this is an acceptable direction.
A small message should be delivered in a few milliseconds on a fast network. If it is a slow network, then your problems lie outside of any communications protocol.

Robin
- 24,062
- 5
- 49
- 58
-
Hi Robin, Thanks for the reply. I do understand that there will be some latency. So here is my use case. The message size will be very less like only 3 characters each. Basically trying to develop something like this game http://www.youtube.com/watch?v=WRONDJO28mk "Draw Some Thing" sending the x and y coordinates of the person drawing surface values across server to another device to get updated and displayed there. You get the flow right?! Can you help me in this? – Wesley Apr 05 '12 at 19:17
-
Draw Something doesn't work in real time, it's an asynchronous game. I have done something similar to what you describe (synchronous, unlike Draw Something) and latency did not pose an issue. Have you actually tested this yourself to see how it performs? – Marc Apr 05 '12 at 19:36
-
Thanks Marc for the reply. Yes friend, I have tested smack with openfire for sending messages (basically a chat like app). But I thought if it would be same as to implement something to a game too. But now seeing your answer "Draw Something doesn't work in real time, it's an asynchronous game" - I have no idea for what an asynchronous game is! can you please help me in some pointers or clues to help me build something similar to draw something functionality that im looking for? (P.S - I have not tried it as a game yet but wanted to clear things up in getting some clear ideas) Please help. – Wesley Apr 05 '12 at 19:48
-
I don't see any issues with what you want to do. It is just a form of collaboration and XMPP is a good fit for this. It looks like draw something may simply be playing back what the other person has drawn, as opposed to doing it in realtime like you want to do. BTW, I have no idea what an asynchronous game is supposed to be either, that term doesn't make much sense to me. – Robin Apr 06 '12 at 18:06
-
You could always Google the term if you're not familiar with it... This link http://gamecareerguide.com/features/1060/game_design_challenge_.php explains it and even uses Draw Something as an example. Essentially, unlike a real-time multiplayer game where you watch te player is doing, it's a turn-based game. – Marc Apr 07 '12 at 12:04