Tornado Sockets PHP/MySql Dialog Confirmation -
i creating application uses combination of tornado web server , symfony.
the tornado part uses sockets , queries database every 1000ms , checks see if different stored in cache (sort of redis or memcache)
if there different in key value pair triggers javascript query deliver new information symfony application , triggers jquery ui dialog "hey it's turn" , waits input user change mysql database , starts whole process again , sends "somethings changed" message other user.
the issue having dialog not trigger because receiving "somethings changed" message blank.
i think happening because symfony , tornado both manipulating database "somethings changed" message firing before dialog pops in symfony app
what trying figure out way know if specific jquery dialog has been opened during update , if has not been opened send message update again.
one idea database update in tornado random number when dialog opens set cookie random number. if cookie matches database entry means proper dialog has been seen. if not match trigger push update again.
am way off base here? theory close way it?
this last part of application , works 8 9 times out of 10
any ideas or suggestions appreciated
Comments
Post a Comment