You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a quick question related to the Workerman web-socket implementation.
From my tests, I see that all the messages are executed synchronously. Basically the callback from the onMessage method is run message after message. The problem I have is that on this onMessage callback I need to send something back to the customers, as some customers are far away from the server (in terms of distance->milliseconds) this takes time, and because of this I cannot have high performance in real-world, as I am waiting for 100-250 ms for each customer. Was wondering if there is a way in which I could fork or do something similar so that I could "talk" to more customers in a parallel way. Is this a setting that I could configure? Would it work if I fork inside the onMessage callback?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a quick question related to the Workerman web-socket implementation.
From my tests, I see that all the messages are executed synchronously. Basically the callback from the onMessage method is run message after message. The problem I have is that on this onMessage callback I need to send something back to the customers, as some customers are far away from the server (in terms of distance->milliseconds) this takes time, and because of this I cannot have high performance in real-world, as I am waiting for 100-250 ms for each customer. Was wondering if there is a way in which I could fork or do something similar so that I could "talk" to more customers in a parallel way. Is this a setting that I could configure? Would it work if I fork inside the onMessage callback?
What is best practice in such a case?
Thank you,
Beta Was this translation helpful? Give feedback.
All reactions