Views: 19,986,354 |
Home
| Forums
| Uploader
| Wiki
| Object databases
| IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search |
04-18-24 01:01 AM |
Guest: |
0 users reading Using the object database in your tools | 1 bot |
Main - Archived forums - SMG hacking tools development - Using the object database in your tools | Hide post layouts | New reply |
Arisotura |
| ||
Star Mario in this room you have a pile of apple pies Level: 163 Posts: 156/9019 EXP: 56211745 Next: 275899 Since: 07-03-12 From: in a box Last post: 6 days ago Last view: 1 day ago |
If you wish to make your tools use the ObjectDB, here's a quick guide about how to download it from your code. There are two possible methods.
1. Raw download Download from https://kuribo64.net/whitehole/objectdb.php. This gives you the XML file. 2. Clever download This is the technique used by Whitehole. For this, you download from https://kuribo64.net/whitehole/objectdb.php?whitehole&ts=<timestamp>. <timestamp> should be set to the timestamp of the local file if it exists ('timestamp' attribute of the root 'database' element), otherwise zero. If the latest ObjectDB edit is less recent than the provided timestamp, the server will return the string 'noupdate'. Otherwise it will return a CRC32 of the XML file, followed by a '|' character and the XML file itself. The CRC32 can be used to check that the received data is valid. If you add &gzip to your URL, the data past the CRC will be compressed using gzip (and the CRC will be on the compressed data). In both methods, the server sends Content-length headers that you can use to determine the length of the data to download. Have fun ____________________ NSMBHD - Kafuka - Jul melonDS the most fruity DS emulator there is zafkflzdasd |
Nadia |
| ||
Hi I'm a person Level: 37 Posts: 10/297 EXP: 335730 Next: 2523 Since: 07-07-12 From: Denmark Last post: 253 days ago Last view: 7 days ago |
Doesn't the object DB keep objects' revisions?
If it does, you could even make the update (with a timestamp) only send the differences, resulting in faster updates and less bandwidth consumption. |
Dirbaio |
| ||
Retired staff Level: 30 Posts: 49/184 EXP: 163716 Next: 2153 Since: 07-07-12 From: Spain Last post: 3739 days ago Last view: 2137 days ago |
...and resulting in a code that's a mess to maintain, and resulting in databases being corrupted staying corrupted even if the user does an update.
I already told Mega-Mario this isn't a good idea IMO. ____________________ Cool Stuff: Dirbaio.net (my boring site) - The NSMB Hacking Domain - Kuribo64 - ABXD DevBoard |
Arisotura |
| ||
Star Mario in this room you have a pile of apple pies Level: 163 Posts: 162/9019 EXP: 56211745 Next: 275899 Since: 07-03-12 From: in a box Last post: 6 days ago Last view: 1 day ago |
Well basically the ObjectDB download script used to support that, until Dirbaio came up with these very arguments.
Supporting it on the server side is really easy. It's just matter of only selecting the objects that were edited past the local timestamp. Supporting it on the client side, however, gets tricky. Instead of just being able to copy the received data right into the new file, you have to parse it and merge the XML tree with the existing one. Nothing impossible, it's just uh, trickier. As for the 'corrupt database stays corrupt' part, there can be an option to redownload the whole database... ____________________ NSMBHD - Kafuka - Jul melonDS the most fruity DS emulator there is zafkflzdasd |
Dirbaio |
| ||
Retired staff Level: 30 Posts: 50/184 EXP: 163716 Next: 2153 Since: 07-07-12 From: Spain Last post: 3739 days ago Last view: 2137 days ago |
Posted by Mega-Mario Yea but then it could get confusing for users... I'd say keep it the way it is now. You can always implement this later if there's lots of people complaining that updates are slow. (Which probably won't happen) ____________________ Cool Stuff: Dirbaio.net (my boring site) - The NSMB Hacking Domain - Kuribo64 - ABXD DevBoard |
Arisotura |
| ||
Star Mario in this room you have a pile of apple pies Level: 163 Posts: 163/9019 EXP: 56211745 Next: 275899 Since: 07-03-12 From: in a box Last post: 6 days ago Last view: 1 day ago |
>which probably won't happen
Not everyone has tons of money and an uberfast connection. Here, a full ObjectDB download takes around 10s (the file is 791KB). Yes, it is done in the background, but hey, it still takes a while... ____________________ NSMBHD - Kafuka - Jul melonDS the most fruity DS emulator there is zafkflzdasd |
Dirbaio |
| ||
Retired staff Level: 30 Posts: 51/184 EXP: 163716 Next: 2153 Since: 07-07-12 From: Spain Last post: 3739 days ago Last view: 2137 days ago |
If you gzip the file it gets down to 53kb.
That's more than a 10x compression ratio Maybe you should take into account. Also there's a class on Java for gzip/ungzip I think. ____________________ Cool Stuff: Dirbaio.net (my boring site) - The NSMB Hacking Domain - Kuribo64 - ABXD DevBoard |
Arisotura |
| ||
Star Mario in this room you have a pile of apple pies Level: 163 Posts: 164/9019 EXP: 56211745 Next: 275899 Since: 07-03-12 From: in a box Last post: 6 days ago Last view: 1 day ago |
Main - Archived forums - SMG hacking tools development - Using the object database in your tools | Hide post layouts | New reply |
Page rendered in 0.087 seconds. (2048KB of memory used) MySQL - queries: 26, rows: 206/206, time: 0.013 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |