yii-node-socket
yii-node-socket copied to clipboard
Performance issues
Hello, I'm facing some performance issues, when sending userframes, my script takes some 150ms extratime for each user to be notified. So the time can quickly become very long. What can I do to help out ?
I'm would also like to know how to use the createAuthenticationFrame, because for now if the user is being logged in for a long time, he doesn't receive notifications anymore. He has to login again to receive them again.
Thanks for your help.
Regards, David
Hi, did you try to send several frames by the one request?
- and you can use queues if you want does not block main request
Here example of using createAuthenticationFrame https://github.com/oncesk/yii-node-socket#client-authorization , to know, authentication frame is a simple command which tells to nodejs create association logged user => session id, in case when your server down nodejs lost all data (because it stored in memory, best case use redis)) and in your yii app use will be logged in but in nodejs he is not logged
2016-01-26 4:19 GMT+03:00 David-Julian BUCH [email protected]:
Hello, I'm facing some performance issues, when sending userframes, my script takes some 150ms extratime for each user to be notified So the time can quickly become very long What can I do to help out ?
I'm would also like to know how to use the createAuthenticationFrame, because for now if the user is being logged in for a long time, he doesn't receive notifications anymore He has to login again to receive them again
Thanks for your help
Regards, David
— Reply to this email directly or view it on GitHub https://github.com/oncesk/yii-node-socket/issues/72.
Hello,
yes I'm using multiple frames when possible, have you an example of queues ?
Have you an example of using Redis ? What is I launch createAuthenticationFrame on every request ?
Thanks a lot
2016-01-26 9:41 GMT+01:00 oncesk [email protected]:
Hi, did you try to send several frames by the one request?
- and you can use queues if you want does not block main request
Here example of using createAuthenticationFrame https://github.com/oncesk/yii-node-socket#client-authorization , to know, authentication frame is a simple command which tells to nodejs create association logged user => session id, in case when your server down nodejs lost all data (because it stored in memory, best case use redis)) and in your yii app use will be logged in but in nodejs he is not logged
2016-01-26 4:19 GMT+03:00 David-Julian BUCH [email protected]:
Hello, I'm facing some performance issues, when sending userframes, my script takes some 150ms extratime for each user to be notified So the time can quickly become very long What can I do to help out ?
I'm would also like to know how to use the createAuthenticationFrame, because for now if the user is being logged in for a long time, he doesn't receive notifications anymore He has to login again to receive them again
Thanks for your help
Regards, David
— Reply to this email directly or view it on GitHub https://github.com/oncesk/yii-node-socket/issues/72.
— Reply to this email directly or view it on GitHub https://github.com/oncesk/yii-node-socket/issues/72#issuecomment-174891529 .
when i said use queue i mean that you can use queue like (gearman, rabbitmq, benstalkd and etc)
sorry, but i do not have example with redis (( instead of using redis you can write data to file and etc... sending createAuthenticationFrame on every request will reduce performance