colyseus / proxy

🔀⚔ Proxy and Service Discovery for Colyseus 0.10 ~ 0.14 (Not recommended on 0.15+)
https://docs.colyseus.io/scalability/
MIT License
37 stars 25 forks source link

how does this proxy work #24

Closed lyh1091106900 closed 2 years ago

lyh1091106900 commented 2 years ago

I read the sourcecode,I see the createRoom function has a Ipc call that means if there is one proxy instance A and two severs instance B and C when player live in B but he maybe create Room in C sever. but with my test when this player reconnect he could get failed because of room not found. so it means that our developer need do something to reconnect sever that player connect first time ,is it ? so when any severs instance failed player reconnect handler could get influence

lyh1091106900 commented 2 years ago

thanks, I think got the principle of proxy,its not that I think before that different player can live in different proccessId sever. with proxy,client connect to sever as a socket and it then this socket is between proxy and client ,proxy create new connect between proxy and sever and this socket is between proxy and sever, that two socket is a line that client and sever can connect. so broadcast is call all socket is between proxy and sever to send message.