Jump to content

Sending data from master server to slave server.

Recommended Posts

Data communication can be divided into two kinds: one is between the server and the client, the other is between the main and secondary servers.
The first, use net_variable form the server to the client , use rpc from the client to the server.
Second, use shard_network from master server to slave server, but what is the way to send data from slave server to master server?
And I found a small problem that shard_network can not send frequently modified data, such as a variable in 1 second modified 2 times, it will only be the last modified value sent in the past.
If I have a variable that needs to be synchronized in multi-server real-time, how can I synchronize the value to the master server after modifying the variables in the slave server? Is there a generic function? For example, I said a word in the slave world, the master world to obtain data, but it seems to be achieved with c++, I would like to ask how to do in lua?
I have been very confused, searched the forum but did not find the answer, hoping to get help. @PeterA @Ipsquiggle
By google translation.

Link to comment
Share on other sites

I've managed to have the forest and cave shards sent data to each other via the io and dofile functions. If I want data to be sent from one shard to another, I have one of them write a lua file which contains the information, then have the receiving shard read the file. I've no clue if this is efficient performance-wise, but it works.



Edited by JohnWatson
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...