Sounds great. I'll have a look at this. 2011/11/15 Nathan Tran <nathant...@gmail.com>
> Nicolas, > > I am not sure if you are aware of the sendResponse() function on the > server. When you call the sendResponse() function the server automatically > injects the challenge ID into the response RAW. On the client side you can > acknowledge this response as a direct response to a particular command you > sent earlier. I used this on the client side (Lua not JS) to make > callbacks asynchronously. > > Hope this helps. > Nathan. > > > > On Tue Nov 15 15:17:04 2011, Nicolas wrote: > >> Hi, >> >> Great to see someone interested by the subject :) >> >> I am not delving into the APE js, because I am pretty sure it would >> take me too much time to figure it out and also because if they update >> it, I'll have to update my code too. >> >> I have just added a check_raw_id() function at the beginning of every >> onraw that I am interested in (the messages that I need to check). In >> this check_raw_id() function, I send the acknowledgement and also >> check that the raw_id is the one that I am expecting (because I want >> to receive them in order), not one that is too early or one that was >> sent (and actually received) twice. >> >> On the server side, I send the raws via a send_custom_raw() function >> that keeps track of the content of the raw and of its id (raw_id). >> When an ACK_REC is received from the client, it deletes the message in >> the storing array. Every x seconds, I test if there are "old" messages >> that have not yet received their ACK_REC and if so, I resend them. >> >> I could do something similar for the client to server exchanges, but >> is that really necessary? I am pretty sure that we can avoid this >> overhead as the information of whether the command was received by the >> server is pretty much there. The problem is that I don't really know >> how to extract it. Any ideas welcome? >> >> >> >> On 15 nov, 18:35, >> chrismdodson<christophermarkdo**d...@googlemail.com<christophermarkdod...@googlemail.com> >> > >> wrote: >> >>> Nicolas: >>> >>> This is great, that you are creating an assured delivery, and >>> maintenance of message order. Without this there are so many >>> applications that will not be able to use push - particularly those >>> that want to initially deliver state to a client - and then updates - >>> to avoid having to send state with each 'push', with all the extra >>> traffic this generates. >>> >>> Presume you are making changes to the Javascript client and the >>> backend code to enable this ? >>> >>> Brgrds, Chris >>> >>> On Nov 10, 2:39 pm, >>> Nicolas<ioa.guib...@**googlemail.com<ioa.guib...@googlemail.com>> >>> wrote: >>> >>> Hi, >>>> >>> >>> Is there a little bit of acknowledgement of receipt in APE? >>>> >>> >>> Client sending to server: >>>> I believe there is not much problem as the server returns something on >>>> every custom command sent by the client (and can even send an error >>>> code or whatever is needed) >>>> >>> >>> Server sending to client: >>>> That seems more complicated to me. Is there any way at all (without >>>> adding my own layer) to know that a command/message sent by the server >>>> has been received by the client. I have started to implement my custom >>>> acknowledgement of receipt but realize that there might already be >>>> some hidden indicator that would just let me know this, without much >>>> more trouble. >>>> >>> >>> In any case, any thoughts on this subject truly appreciated. >>>> >>> >>> I really need to check that a raw has been received. I am working on a >>>> board game server and I can't allow that a move gets lost in >>>> cyberspace, as it happens currently, with a relatively high frequency >>>> (maybe 1 out of 500 messages for some) for some unlucky players, >>>> resulting in one game out of 10 freezing for them. On my computer >>>> however, I have never seen a frozen game which confirms that the >>>> quality of the client Internet connection is the limiting factor here. >>>> >>> >>> Thanks in advance. >>>> >>> >>> Nicolas. >>>> >>> >> > > -- > You received this message because you are subscribed to the Google > Groups "APE Project" group. > To post to this group, send email to ape-project@googlegroups.com > To unsubscribe from this group, send email to > ape-project+unsubscribe@**googlegroups.com<ape-project%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/**group/ape-project?hl=en<http://groups.google.com/group/ape-project?hl=en> > --- > APE Project (Ajax Push Engine) > Official website : http://www.ape-project.org/ > Git Hub : http://github.com/APE-Project/ > -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to ape-project@googlegroups.com To unsubscribe from this group, send email to ape-project+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/ape-project?hl=en --- APE Project (Ajax Push Engine) Official website : http://www.ape-project.org/ Git Hub : http://github.com/APE-Project/