I am creating an application that uses a combination of Tornado Web Server and Symphony.
uses sockets and queries a database in every 1000ms and checks to see whether it is currently stored in the cache (such as radis or memcache), checks < / P>
If the key is somewhat different in the pair, it triggers a javascript query to give new information to the symphony app and triggers a jquery UI dialog to say "this is your turn" and User again Mysql waits for the database to change and then it restarts the entire process and sends the message "Somaten's Changed" to the other user.
The problem I have is that sometimes the dialog is not triggered because it is receiving a "somatings change" message which is empty.
I think what is happening because both the Symphony and Hurricanes are messed up in the database, "Somatings Changed" message is popping up before the NG pops up in the Symphony app
What I'm trying to do is to find out if a specific jquery dialogue has been opened during an update and if it has not been opened, then send it to update the message again.
An idea is to do a database update in Tornado with a random number, then when the dialog opens, that cookie will appear in that random number If the cookie matches the database entry, it means that the appropriate dialog has been seen. If it does not match, then trigger the push update again.
Am I away from the base here? Is this principle close to the method of doing it?
This is the last part of my application and it works 10 to 8 to 9 times
Any thoughts or suggestions greatly appreciated
No comments:
Post a Comment