Comment

Nick Newman

You need to do some more testing on the MYSQL side and how much it will save performance there.

I have a forum using FluxBB and I setup simple PHP Websockets. I authenticated the user using fluxbb's method so the authenticated users are stored in my $users temporary array over the socket. While the user's are in there, when making mysql changes I don't need to authenticate the user per refresh as with AJAX, or other mysql/login scripts; because I can just store their user_id in the $users array. This helps tremendously because for my RPG Game, you can drag and drop your items around in your inventory. I was using ajax per each item dropped on a new slot, but just moved to sending a socket packet instead. This way, each time the users moves an item around, it will use the users already authenticated $users array for verification instead of grabbing for that each time on refresh from cookie validation.

Hope this helps, looking forward for you to do something similar with MYSQL though, I think it will be very beneficial.