This project is read-only.

Synchronizing data between the ingame and web interfaces

Dec 19, 2011 at 7:30 PM

After some thought, I realized that data from the web interface would need to be received and cached in the ingame interface. Out of all the reasons, the biggest is to ensure the ingame interface works even with the web interface down (well, it will have to go from up to down).

Another reason is to synchronize the server lists.

Another is to synchronize the admin list. This isn't as much of an issue, as a request to the web interface could return true. Of course, see first paragraph.

So here's an idea (still open to more ofc): have something that tracks the time of the last admin list/server change and the last sending of these changes to the ingame interface. When the change time is greater than the send time, the server is sent, along with each admin list. The ingame interface will poll for this information every so often (can be a short time because these changes don't occur often) and the server will either send nothing or all of that data.

Dec 23, 2011 at 6:38 PM

Since there hasn't been any input, I guess I'll be going ahead with this model.

Dec 23, 2011 at 6:54 PM

First, note that only changes in the admin list will be sent, not who's logged on or not (because the ingame interface can determine this from the admin list).

Anyway, a new project will be creates that contains the serializable models for the server list and admin list. A model, which is the one being sent, will contain a list (or something) of those models. When sending, the main model will be serialized with binary serialization and be sent as application/octet-stream (note to myself so I don't forget again D:). On the ingame interface's side, these will be deserialized. This way, both sides can work with this data in object form, rather than doing something like reading/writing XML.