spotweb / spotweb

Decentralized community
BSD 3-Clause "New" or "Revised" License
545 stars 183 forks source link

Request: Save full spots gzipped #208

Closed ghost closed 4 years ago

ghost commented 7 years ago

Usenet indexers save NZBs in a gzipped format which saves a ton of diskspace. Would be nice of Spotweb could do that and maybe gzip previously saved NZBs too.

mesa57 commented 7 years ago

Related to this pull request : https://github.com/spotweb/spotweb/pull/126

mesa57 commented 7 years ago

The pull request #126 appears to have to many errors, sorry.

Sweepr commented 7 years ago

I've got the ZipCache working on the older Master and Media branch version's which i still had running on my VM's, but with the latest (composer enabled) version i run into an issue.

Probably a path issue, maybe due to the Composer, does anyone know how to fix this?

If we can tackle this then we can implement the ZipCache.

Fatal error: Class 'Dao_Base_FlatCacheStore' not found in C:\xampp\htdocs\masterlatest\lib\Bootstrap.php on line 42

Fatal error: Class 'Dao_Base_ZipCacheStore' not found in C:\xampp\htdocs\masterlatest\lib\Bootstrap.php on line 42

To me it looks like the latest branch is unable to locate Dao_Base_FlatCacheStore.php and Dao_Base_ZipCacheStore.php from \lib\dao\Base\

mbirth commented 7 years ago

@Sweepr Could you try running (with composer installed):

./composer.phar dumpautoload

This should rescan the lib/ folder for new classes.

If you don't have composer, use these 3 lines to get it:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === 'aa96f26c2b67226a324c27919f1eb05f21c248b987e6195cad9690d5c1ff713d53020a02ac8c217dbf90a7eacc9d141d') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
Sweepr commented 7 years ago

@mbirth, ofcourse, why didn't i think of that.

It's working..

Sweepr commented 7 years ago

It's working, but needs some additional testing, because there's a minor diff somewhere between Media and Master branch, this diff causes the image's to not display on the Master branch, Media branch loads fine.

I'll see if i can tackle this tomorrow, i'm not seeing it anymore -_-

ghost commented 7 years ago

Sounds good

ghost commented 7 years ago

Any updates on this?

Sweepr commented 7 years ago

@Fossil01

For the Media and Master branch i've got the ZipStore working, but for the Master branch there seems to be an issue where the image fails to load when hovering over the spot, so untill i find out what's causing that i cannot create a pull request.

The isn't the case with the Media branch, i can push that but i'll need to do a little bit more testing first.

ghost commented 7 years ago

Alright nice work. I'm running the master branch.

Sweepr commented 7 years ago

I have pushed to Media-branch using the ZipCache to my remote fork:

https://github.com/Sweepr/spotweb/tree/zipcache

If you want you could test it, later i'll be working on the Master branch, trying to get it to work

dsadsdadsadsadsds commented 7 years ago

Jay, this really ads a lot of performance! :)

ghost commented 7 years ago

Was this added to master branch?

mesa57 commented 7 years ago

Not yet, there is still a little issue whuch @Sweepr should resolve.

MrHappy commented 7 years ago

What's the status on this, 'cause I would like to have some more diskspace available... ;)

mesa57 commented 7 years ago

No progress

MrHappy commented 7 years ago

Too bad... Any way we can help to resolve the issue, @Sweepr ??

Sweepr commented 7 years ago

Zipcache is fully functional and working for the media branch, For the master i had the zipstore working aswell, but the problem keeping me from pushing to the masterbranch is the fact that the imagepreview/spotimage won't show when switched to zipstore, rootcause unknown.

Because i have a huge lack of time it caused me to put this project in hold for now.

Hopefully i can pick this up very shortly.

MrHappy commented 7 years ago

I figured it wouldn't be straight forward... You'd expect it would be logged if something went wrong. If I can help you with testing let me know.

MrHappy commented 5 years ago

@Sweepr and @mesa57 any news on this by any chance?

Sweepr commented 5 years ago

Nothing much, i'll see if i can pick this up the coming weeks..

MrHappy commented 5 years ago

Nothing much, i'll see if i can pick this up the coming weeks..

Any progress?

mesa57 commented 5 years ago

I am not going to spend time on this as it is my opinion that retrieving full spots is nonsense. Spots can as wel be retrieved from usenet when needed. I was even thinking about removing that whole option.

ghost commented 4 years ago

Any update? Maybe don't remove it, leave the option there for high traffic sites.

ghost commented 4 years ago

Found a better solution in the mean time. Use ZFS with LZ4 compression on the filesystem level :-)

mesa57 commented 4 years ago

Better not to retrieve full spots. Why do you use that anyway ?

ghost commented 4 years ago

Boatload of users. Might try it without, haven't done that since 2015 or so.

mesa57 commented 4 years ago

Ok, I understand. That would be the only valid argument.

Sweepr commented 4 years ago

Going to archive this, since it will never be implemented.