ACDB  Log In Search
Random
Light/Dark Theme
Site Map
SMASH
or
PASS
Winter Theme and Image Server Dec 10, 2020 | Rei
I'm testing out the new SSD server at ami.animecharactersdatabase.com serving static images and visual search thumbs.

This might end up a better use of it than simply moving the entire website to the new server! Though it doubles my hosting costs, while making more bandwidth available and giving us a solid backup server.

If nothing else, this will be a bit of a stress test to make sure the hardware is well suited to FreeBSD.

----

Before moving the website to the new server, I had wanted to address a 12 year old problem ...

Namely, all of our images being in one, yes ONE, folder. This puts a fair bit of unnecessary IO overhead on each image request.

Solving it, is not so simple.


While I could start with every file in /uploads/ and move them to /i/[0-99]/imagename this brings up the following problems
- How are the images made ( new images would still be going into the wrong location )
- Broken links ( how would requests to the old location be redirected to the new location )

So many problems, each cycling back to another.

While I have many images stored in api_images, the file names are based on a rand() tag that has a collision incidence of 1 in ever 13000. I mitigated that using the uid as part of the file name, but the system sucks and needs to go.

Each image has a unique auto increment imgid, but this is also tied to type_id. So the imgid's are not even unique.

I could rebuild the table to just have ONE damn unique auto increment ID, but even then, how would I merge the data into the new table?

And then we have the problem of the reference in submits and characters ... these are text paths spanning 14 years of image systems.

In 2008 file names included the file name the user submitted! Characters I manually added are in folders and saved as the character name ...


Ultimately, it feels like I will need to take inventory of every image in use and store them in a proper table suited to the task.
Have a table that records their old name and new name.
Figure out a way for nginx to either convert the old path into the new, or maintain a set of the old images and serve away.
Update all code that makes images to use the new system.
And modify all hard paths to use the new file names.

And to think writing scripts to convert the images was the easy part. lol

-------

As part of addressing some security issues, GET and POST strings are now capped at 65535 characters in length. Sorry if you try making a big post, but it wouldn't have been stored even if it did go through. xD Also added some debug errors for people probing for XSS vuln's - which you can now more easily try at bbcode.php
The Heroic Legend of Arslan Episode 23 Quotes Dec 8, 2020 | Rei
Transcript - 306 new quotes

The Heroic Legend of Arslan

[Image]


See how well you know the characters by playing a Quote Trivia game.
Gintama Episode 1 Quotes Dec 6, 2020 | Rei
Transcript - 379 new quotes

Gintama

[Image]


See how well you know the characters by playing a Quote Trivia game.


Finally some Gintama quotes. I first watched this back when I was studying Japanese at University. Each episode is always good for a laugh.

Go Top

Anime Characters Database Logo Links

Contribute

This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use. Learn more [close]

Who Board | New Thread

Yesterday 11:50 pm
Anonymous
Who is this ?

Buy Me a Coffee at ko-fi.com

Increase your fun by becoming a member today! Login | Register

10 fun things to do on ACDB

Advertise - Ko-fi - Share - Mascot - Contact - Discord - API - Wiki - Site Map - Change Log - アニキャラベー - The Nature DB - Twitter - Instagram - Privacy Policy - Rules
All images are copyright of their respective owners. Copyright © Goral Software

Rendered in 27.4 ms. R-6-W-2-M-2998.46 KB