2010/1/15 flipkick <[email protected]> > you don't want to use synchronous requests because this will block your > whole module with all users until the sql for one user has returned. > and in the idea of cadrach for instance: > > And as said before, it's not an issue for my own project's constraints.
> is horrible, this could use up to 100% cpu only for one user, able to slow > down your whole server just for one single SQL request. That's why I think having two APIs to access MySQL (one synchronous, one asynchronous) would be definitely the best solution. > there's a reason why there is no sleep-function in javascript. > > Because historically, Javascript was only designed for browser needs ; we are not in the same context here. > get used to asynchronous handling. Being used to develop networked apps, that's not the problem here. 2010/1/15 Cadrach <[email protected]> > Maybe what we should have asked is: Why having the SQL request > processed and the result sent on another raw is an issue for you? > > Because in my own project, saving bandwidth is more important than responsiveness for the whole server; Note there could be lot's of other reasons, depending of the particular needs of the project you're working on. For example, responsiveness for the user that sent the command itself would be better with a synchronous scheme (in case of 'long polling transport mode', closing the TCP connexion and waiting for the next one before sending the query result implies lot more latency, ...) 2010/1/15 Anthony Catel <[email protected]> > Just for information : > > You can delay any command using "return -2" : > > Many thanks, this is the tip I was waiting for :-) Best regards, nouk²
-- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] 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/
