[OPEN] How does the applet decide to upload or not?

Support and feedback for NetherPanel
AKA java UniUploader

[OPEN] How does the applet decide to upload or not?

Postby mfoley » Fri Sep 21, 2007 11:58 am

I noticed that simply loading the app, sometimes, will not upload the LUA file. Can the developer give a quick breakdown of the logic flow that determines if a file will be uploaded or not?

I'm confused about the "unless automatic uploading is enabled". I can't seem to find a UniAdmin setting that corresponds to "automatic uploading"...as such I don't believe it is turned on and am confused that clicking on "The Works" does not upload the character data.

Thanks for any info.

Cheers
Last edited by mfoley on Sun Sep 30, 2007 4:52 am, edited 1 time in total.
User avatar
mfoley
WR.net Apprentice
WR.net Apprentice
 
Posts: 55
Joined: Tue Aug 08, 2006 11:27 am

How does the applet decide to upload or not?

Postby mfoley » Sat Sep 22, 2007 9:52 am

Reason why I ask is, I would think that if I acquired a new item (i.e. purchased from AH) then move it to my bags, then "Save" from CP, then logout, that "The Works" would upload the new LUA file.

Sure enough, the timestamp on the LUA file was updated.

I'm trying to avoid instructing my guildies to do a forced upload since that will take them to a page in the app I'd rather they not go. A big button on the default page would be ideal. I thought "The Works" was this button but I'm at a loss as to why, when the LUA file had an updated timestamp, that clicking on "The Works" did not upload my new LUA file.
User avatar
mfoley
WR.net Apprentice
WR.net Apprentice
 
Posts: 55
Joined: Tue Aug 08, 2006 11:27 am

How does the applet decide to upload or not?

Postby zanix » Sat Sep 22, 2007 10:54 am

I think it checks the file every minute or so (I'm not sure)
And if the file is different, it uploads
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

How does the applet decide to upload or not?

Postby mfoley » Wed Sep 26, 2007 9:16 pm

I'm hoping to get a detailed, straight up response here. I'm trying to get my guild to use this but there are people that, as far as they know, have updated their CharacterProfiler.lua file, logged out, exited the game then invoked jUniUploader (which we have hosted on our site.)...yet...no character data is uploaded.

Sometimes it works, sometimes it doesn't and I'm trying to determine what's going on in those times it doesn't work.

So...anyone? Is there any reason why, when the LUA file's contents have indeed changed (as evidenced by a timestamp) why jUniUploader would not upload the LUA file to the site when clicking on "The Works".

I really need some guidance here as people are going to give up on using it if they sense it's going to be a pain and get inconsistent results. Not everyone that plays WoW is a PHP or Java developer or whiz kid computer geniuses. ;) This needs to work for everyone, know what I'm saying?
Last edited by mfoley on Wed Sep 26, 2007 9:17 pm, edited 1 time in total.
User avatar
mfoley
WR.net Apprentice
WR.net Apprentice
 
Posts: 55
Joined: Tue Aug 08, 2006 11:27 am

How does the applet decide to upload or not?

Postby lhunath » Sat Sep 29, 2007 12:48 am

First of all; let me appologize for my very late response. I've been without internet access for a month .. ;x

Basically when automatic uploads are enabled, every x minutes all files marked for upload have their MD5 calculated and checked against the last known MD5. If the checksums differ the file is considderred to have changed and the file is uploaded.

I haven't got the code available right now so I can't walk over it in detail with you right here but this is the essence.

Timestamps are not checked. Please check whether the file size has also changed when you notice the file is not being uploaded. Every time you log out WoW will update all your SVs, meaning their timestamps will probably change; whether their content has been changed or not.

Then there's the MD5 checksum. Basically; it takes the file, pushes each byte through a mathematical algorythm to end up with a hexadecimal number of 8 bytes (I think). Those bytes are called a checksum for the file and when two files are the same their checksum will always be identical. Two different files can of course have the same checksum but the chance for a file to be modified in such a manner that its checksum would end up being the same as its original's checksum is so increadibly small you're more likely to die within the next 3 minutes (sorry).

If you would like me to, soon I'll provide you a more detailed explanation to the way jUU works on this area. If you have more questions; don't hesitate to ask. I definately agree that the application needs to work, and always work, for anyone. So please back up your file, go into WoW, add something to your bags, log out, and if it still doesn't upload; send me the backup and the new version of your CP.lua.

Cheers,
Lhunath
"OK, so ten out of ten for style, but minus several million for good thinking, yeah?"
-- Zaphod Beeblebrox


= NetherPanel: home - launch - tickets =
User avatar
lhunath
UA/UU Developer
UA/UU Developer
 
Posts: 201
Joined: Sat Jul 22, 2006 12:32 pm

How does the applet decide to upload or not?

Postby lhunath » Sun Sep 30, 2007 4:50 am

Here's the logic:

  • For every account selected, do the following:
  • For every Saved Variable selected, find it in the directory of that account and do the following with it:
  • Check if it exists; if not, skip to the next saved variable.
  • Check if we're doing a forced upload, if so; don't bother checking the MD5s (skip the next four steps).
  • Check if the saved variable is a file (so not a directory.. ;x).
  • Read the saved variable in and calculate its MD5 sum.
  • Compare the MD5 sum we calculated with the last known one for that file; if they are equal; skip to the next saved variable.
  • Save the new MD5 as being the old MD5 so that the next time we check the file we compare against the current MD5.
  • If the saved variable is "CharacterProfiler.lua", try splitting it up into chunks. This prevents out-of-memory bugs on the WoWRoster server's lua parser.
  • If it isn't; or if the splitting up of the file didn't go well; mark the whole file for upload. If we managed to split the "CharacterProfiler.lua" file up; mark each chunk for upload.
  • Once all saved variables in all accounts have been checked, we do this:
  • Go over each file that was marked for upload and:
  • Upload them to the server, one by one; passing additional upload variables that are configured in the settings.
Last edited by lhunath on Sun Sep 30, 2007 4:50 am, edited 1 time in total.
"OK, so ten out of ten for style, but minus several million for good thinking, yeah?"
-- Zaphod Beeblebrox


= NetherPanel: home - launch - tickets =
User avatar
lhunath
UA/UU Developer
UA/UU Developer
 
Posts: 201
Joined: Sat Jul 22, 2006 12:32 pm

[OPEN] How does the applet decide to upload or not?

Postby mfoley » Tue Oct 02, 2007 8:59 am

Waits three minutes....

...

Whew! Still alive!

I found out, that in one case, the person trying to upload had two accounts. She moved the dir structure of the one account (another family member) and the file uploaded as expected.

So my question, based on my limited knowledge of her scenario, how does jUniUploader decide which account to load from initially? The first directory encountered?

I understand that one can choose which account to load from via the config page...and perhaps for some people, they will have to do this, but I'm trying to stick with the "click the link and that's all you have to do approach" if possible.

Thoughts?
User avatar
mfoley
WR.net Apprentice
WR.net Apprentice
 
Posts: 55
Joined: Tue Aug 08, 2006 11:27 am

[OPEN] How does the applet decide to upload or not?

Postby lhunath » Tue Oct 02, 2007 3:34 pm

It's probably so that currently jUU only selects the first account in the account list if none were selected before (eg. Initial Run). If I understand well; the file was uploaded when in one account but not when in the other. Then I take it that only the latter account was indeed selected in the list.

Furthermore, would you be satisfied if I modified jUU such that initially all known accounts are selected for uploading?

Keep in mind that; even with that modification in place; when at a later date you make a new account it will not be enabled for upload by default. Only the very first time you run jUU all known accounts will be selected (when there is no jUU config file on your pc yet).

The only way to avoid this pericle is to do a somewhat more significant code change in jUU and work with account exclusion lists instead of an account inclusion list.
"OK, so ten out of ten for style, but minus several million for good thinking, yeah?"
-- Zaphod Beeblebrox


= NetherPanel: home - launch - tickets =
User avatar
lhunath
UA/UU Developer
UA/UU Developer
 
Posts: 201
Joined: Sat Jul 22, 2006 12:32 pm


Return to NetherPanel

Who is online

Users browsing this forum: No registered users and 0 guests

cron