View topic - XML-RPC searchapi on springfiles.com



All times are UTC + 1 hour


Post new topic Reply to topic  [ 78 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: 31 Jan 2011, 15:19 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
What you mean - if you can list custom mirrors in the downloads you can sure remove this one and add fixed one instead..

Jj assured me there are no php downloads and now you are saying me there are and cannot be turned off?


Top
 Offline Profile  
 
PostPosted: 31 Jan 2011, 15:34 
Spring Developer

Joined: 31 May 2009, 23:08
The /system url is made by drupal and can't be really switched of.

Disallow /system/files/downloads/spring/ is a bit ugly + may break other things and will make trouble after updates of drupal.

Even after removing the /system links from displaying, it will be still valid. As it isn't returned by the search-api, the /system links should be deleted from the plasma-service.

Best would be, if plasma detects the HTTP/500 error + mark the link as invalid / damaged.


Top
 Offline Profile  
 
PostPosted: 31 Jan 2011, 15:42 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
Valid links are not a problem if they are not linked. I can remove it from plasma no problem.

But atm its also primary download link on the site and this should be fixed.

I also think that disabling it in apache should be pretty safe.


Top
 Offline Profile  
 
PostPosted: 01 Feb 2011, 14:19 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
So please

1) do not link the php based drupal file downlaods

2) remove springfiles.planet-wars.eu from mirror list
Its identical server so there is no point mirroring it


Top
 Offline Profile  
 
PostPosted: 01 Feb 2011, 17:11 
User avatar

Joined: 01 Apr 2006, 18:03
Location: The Netherlands
1) They won't be linked for the RPC service. They are linked in the site itself because its a drupal thing and lots of modules depends on it. It takes a lot of time to alter it.

2) its not used anywhere.


Top
 Offline Profile  
 
PostPosted: 01 Feb 2011, 21:37 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
Cant you hide them or something? If not we should use apache rewrite rule to direct that request away from php.


Top
 Offline Profile  
 
PostPosted: 14 Mar 2011, 20:34 
Spring Developer

Joined: 31 May 2009, 23:08
the old links system/... are 301-redirected to real http-files by an apache rewrite-rule, manual-downloads are through a 302 redirect php script (for stats), so no more php-downloads.

when watching the xml-rpc logs, i saw that most of the file-searches won't return anything, only searching for the springname of a file will return a result... so... removing the "or filename" in a searchrequest in plasma would return the same files.

Shall i normalize the filenames in the results? that would mean generating the filename from springname + filetype? Afaik the filenames on mirrors arent always the same filename on springfiles.

something like:

getfilename(springname){
springname.tolower()
springname.replace specialchars with _
springname.addsuffix(springname.filetype)
}


@licho: did you see any problems with the searchapi?


Top
 Offline Profile  
 
PostPosted: 15 Mar 2011, 00:07 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
Or i dont understand much :)

I dont think there are problems, but after recent change mirror server count seems to go down.


Top
 Offline Profile  
 
PostPosted: 18 Mar 2011, 17:28 
Spring Developer

Joined: 31 May 2009, 23:08
with normalizing i mean:

in modinfo.lua: name="This is a awesome Game v1"
file will renamed to = This_is_a_awesome_Game_v1.sd7

(even it is uploaded with filename awesomegame.sd7)


there are currently only 3 active mirrors, so for new files you'll get at max 4 urls. i asked other sites for an ftp-access, if they give springfiles.com one, mirrors will increase.

i'm still thinking about how to make the system a bit more distributed. I dislike, that only the main server has the xml-rpc interface, but the mirrors shouldn't require a database. any idea about that, how lobby-clients can find the required files without relying on a single host?


Top
 Offline Profile  
 
PostPosted: 18 Mar 2011, 20:48 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
In rapid each repository has simple zipped text file with list of content published on web..

You could simply generate list.

Or, if the files are named exactly by internal name, you dont need any index.

Server would simply ask each mirror site for given file name ...


Top
 Offline Profile  
 
PostPosted: 18 Mar 2011, 20:50 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
Regarding normalization, please do not do it this way..

Either do it for all files at once and ommit random .sdz/.sd7 extension, or dont do it at all..

Reason is plasma server mirror checking. In fact it does what i suggested, in case RPC is offline, it queries each known mirror server for filename.

Filename is from the list of known filenames users had locally.

If you rename it on the server, this part would fail.


Top
 Offline Profile  
 
PostPosted: 20 Mar 2011, 23:46 
Spring Developer

Joined: 31 May 2009, 23:08
ok, i won't rename files. only stuff on todo is, to move files from old file-structure into new, for example:
2/*.sd7 -> downloads/spring/games/*.sd7

on some mirrors there are currently both file-structures :-/


i (re-)added www.tasdownloads.com and files.springrts.de as mirrors! :-) thanks to dave and very_bad_soldier! :)

mirrors for files should grow soon.


Top
 Offline Profile  
 
PostPosted: 22 Mar 2011, 17:23 
User avatar

Joined: 01 Apr 2006, 18:03
Location: The Netherlands
It shouldnt be a problem if there are multiple folder structures @ mirrors.

SpringFiles will index existing files when a mirror is added. For new uploads the new folder structure will be used.


Top
 Offline Profile  
 
PostPosted: 22 Mar 2011, 20:26 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
Jj, please run rsync and other synchronization tools (ftp copies) at low priority, use ionice -c 3 to prevent overloading server disk.


Top
 Offline Profile  
 
PostPosted: 22 Mar 2011, 22:00 
Spring Developer

Joined: 31 May 2009, 23:08
the upload-script can be easily "identified", as it runs as user jj and not as the apache-user.it runs already with nice -19 ionice -c3... so, lower priority isn't possible. it runs currently so long, because 3 mirrors were recently added, about ~90GB have to be uploaded, this takes some time, as only 10 files are uploaded at once and some mirrors allow uploading only at 200KB/s.
when mirrors are synced, it should only run a few secs.

the php-script should do few io, because the php script does a sql-query + reads only needed files for uploading (and doesn't a stat() on all files).

uploading by ftp would mean, to re-upload huge-parts of the files, as folder structure changed.

rsync/lftp have drawbacks, too: either they are invoked by cron, and don't know which files to upload and need to rescan all files or they know it (but this has to be written somewhere in a script too...) so why not upload it directly by the script?


Top
 Offline Profile  
 
PostPosted: 23 Mar 2011, 13:39 
Spring Developer

Joined: 31 May 2009, 23:08
hm, one thing is bad with plasma: if i disable a mirror, plasma still lists this site as mirror :-/

can you make plasma work like this:
-always request xml-rpc api (or cache it only for a few minutes), return this mirrors.
-if it doesn't return an answer, return all mirrors

currently evolutionrts.info seems to be overloaded, i already disabled it as file-mirror (isn't returned as result in xml-rpc interface), but plasma still uses it as mirror :-(

edit: reenabled it, as it had no effect :-/


Top
 Offline Profile  
 
PostPosted: 25 Mar 2011, 00:31 
Spring Developer

Joined: 31 May 2009, 23:08
i wrote a small script that moved all files from the old file structure in the new.

it looks like some files where deleted on springfiles but still exists on some mirrors:

http://files.springrts.de/2/

what to do with this files? re-add to springfiles.com?

imo deleting is a bad idea, think about engine devs try to debug a replay with a old map...


Top
 Offline Profile  
 
PostPosted: 25 Mar 2011, 12:28 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
I still see rsync running at full CPU and IO priorities under jj..
(nice 0, best effort 4)

Image

Image


Top
 Offline Profile  
 
PostPosted: 25 Mar 2011, 13:05 
Spring Developer

Joined: 31 May 2009, 23:08
sorry, forgot to set nice on the remote rsync.

(parameter for rsync is --rsync-path="nice -19 ionice -c3 rsync" if anyone else needs this)


Top
 Offline Profile  
 
PostPosted: 27 Mar 2011, 22:01 
Spring Developer

Joined: 31 May 2009, 23:08
hmm, BA 7.31 was uploaded at 18:39, plasma still doesn't list any mirrors :-/

searching should return results for "Balanced Annihilation v7.31" since 18:59... (how) can we improve that?


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 78 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.