I’m currently working on a rendition of DepthHUD Inline, but lately I was quite bothered by something :
I know some people don’t like to use SVN and stuff, yet I want to keep my addon updated at all times for the users since it may be getting a lot of updates rapidly.
So I come up with a little aside project that would help me doing this, which is “DepthHUD Lite :: Cloud Loader”.
I have two explanations, one for end-users and one for those who want to see the technical points.
Here is a simple explanation :
If you want this addon, please note that
installing both Cloud Loader and Locale will conflict
. You DON’T need to install both to enable Cloud updating, the Locale has an integrated Cloud Loader made to fit with the Locale.
Locale as a SVN :
Technical explanation :
Let me remind you that the addon is exclusively clientside so we’re not talking about serverside working models.
Yet I don’t know if it’s a reliable project model so let me expose it to you :
So basically, the client gets an addon with two main files : The DHLITE Cloud Loader and the Locale Script.
The Cloud Loader attempts to catch the list of files from the web, which is a SVN,(using http.Get) and stores it into a string. It runs some little verifications to check if the data is corrupt or not what expected, then get all the files again into strings and execute them.
If it runs fine, then the the end user will be using the latest version of the script. Otherwise, it will run the version that the end user acquired locally (Locale Script) along with the addon.
The flowchart looks approximately like this :
It doesn’t store Lua script into text files at any moment, the end user will need to either acquire from time to time the latest version by downloading it so that he can play with the latest version offline. Which is quite sad, but which may be part of some sort of security in which I don’t even know the effectiveness :
Since the script caught from the Cloud is not stored offline into a text file, and http.Get being strictly enclosed in the addon : If the files were to be stored in text files to be used offline, servers could eventually modify the contents of the text files, breaking down the verification system, to use the Cloud Loader as a hub to autorun annoying scripts.
For the time being I’ve coded the theoretical part of the addon closely tied to DepthHUD Lite (I didn’t code the version check though…), downloadable here :
Please note that this version of the Cloud Loader is not provided along with a Locale Script, that means if the Cloud Loader fails, no default Locale files will be loaded up.
(If you fiddle in the Lua files you will easily find the public SVN URL that of the project that is :
…but I don’t know if the project model is worth being made extensible so that other clientside addons could be run using the exact same model but this time in an arbitrary model that is :
Write an addon to fit a Cloud model, enter the URL over to the Initialitation file of your Cloud Addon into the Cloud Loader, then you can use the addon using an UNIQUE Cloud Loader Addon (that means this Loader can run several addons at the same time over different URLs)… Thing is, this way, some servers could eventually take control on the Cloud Loader (as http.Get would be based on stored strings) and append unwanted Cloud Addons URLS and stuff so I don’t know.
Could I get some advice or opinions over this ? It really serves as an experimental project for the time being.
Thanks for reading!
(PS : I know this thing doesn’t fit the “Cloud” definition but whatever)