Connect server extension as client to another server
Posted: 13 Mar 2017, 03:39
Hello. I want to have two different SmartFox servers communicating with each other.
Here's a diagram
[Master server] <--> [Slave server] <--> [Slave clients]
The way I thought about doing it was to have the [Slave server] act as a Client and connect itself to the [Master server]. I imagine this is possible if I include the SFS Java Client API in my Java extension for [Slave server] and start a connection from there. Maybe it's not super clean, but it should work. Right?
Alternatively, is there any way to start a client connection from the SFS Server API, without having to include the Client API?
Also, is there any reason why I shouldn't do this, or maybe take a different approach? I'll be exchanging entity positions between the two servers, which is why I didn't want to use HTTP or something between the two servers. I'm also not looking forward to use TCP/UDP/lower level stuff, because having SFSObjects eases the communication implementation quite a lot.
Here's a diagram
[Master server] <--> [Slave server] <--> [Slave clients]
The way I thought about doing it was to have the [Slave server] act as a Client and connect itself to the [Master server]. I imagine this is possible if I include the SFS Java Client API in my Java extension for [Slave server] and start a connection from there. Maybe it's not super clean, but it should work. Right?
Alternatively, is there any way to start a client connection from the SFS Server API, without having to include the Client API?
Also, is there any reason why I shouldn't do this, or maybe take a different approach? I'll be exchanging entity positions between the two servers, which is why I didn't want to use HTTP or something between the two servers. I'm also not looking forward to use TCP/UDP/lower level stuff, because having SFSObjects eases the communication implementation quite a lot.