Welcome to the new Diaspora forums, please let us know if you see anything broken! Notice: Some users may need to reupload their avatars due to an issue during forum setup!
[Alpha] Time Sharing Between Servers
Nielk1
Registered, Administrator Posts: 252
Before someone else f*cks this up, I work with databases at work and I am doing the sqlite3 portion of a class project for Android phones. I know how these things work. I will look at it in 2 or 4 weeks.
Probable structure:
Basic use of cached data, attempting to sync to server when a person joins. Data since last sync also kept to allow for a delta on both servers to apply to the central storage without issue.
Complexity: minimal
Dev-time: minimal
Tech risk: medium, need to find exactly how lua does DB stuff. I might need to write a custom DLL for this. This could slow down dev time with research time.
Will probably involve replacing UTime entirely. Come up with a name.
Probable structure:
Basic use of cached data, attempting to sync to server when a person joins. Data since last sync also kept to allow for a delta on both servers to apply to the central storage without issue.
Complexity: minimal
Dev-time: minimal
Tech risk: medium, need to find exactly how lua does DB stuff. I might need to write a custom DLL for this. This could slow down dev time with research time.
Will probably involve replacing UTime entirely. Come up with a name.
Comments
I could custom write a front end too and do basic interface over socket if you think that the only option. Many many options.
I digress, in all likelihood, a DLL is not needed. I will just socket a web interface, authenticate, and get the data that way. Easy as hell.
Basics:
When you join a server, it is keeping track of two values, your base time and delta time. When a sync occurs, the delta time is added to the value in the external server and then set to 0 and the base time is set to what is now the remote value. This means that the base is the cache of the external server and the delta is the change. Another option is to directly write the new value instead of a 'delta', but deltas are better in understanding the concept.
If this is available, can someone contact me by PM, private admin area, or steam to get it to me? For now I will work on getting the system to expect an online DB that is abstracted out and stubbed to just return their current full total hours from a supplementary read only sqlite3 file. Unless I somehow do it all in one day.
I will be playing around on DEV with this when I get home. I will need to talk to Paperclip about getting a 2nd DB on this site. I say 2nd so we can prevent a security exploit in one from compromising the other. Both would have their own user with write access and the forum could somehow be given read access to the time db. If I could talk to Paperclip about getting access to said DB to set it up, it would be a great acceleration to this plan rather than doing it though him or another by proxy.
this is only partialy true, you cant upload DLLs yourself, most of the gmod server hosters though will add them for you if you ask them to, just be sure to send them the release thread, and if the source code isn't there, send them a link to the source code aswell