OstDB DEV Foosic: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
m (not finished)
mNo edit summary
Line 118: Line 118:


==== Querying a foosic fingerprint (don't add if unknown) ====
==== Querying a foosic fingerprint (don't add if unknown) ====
(used by external clients and the main server's cron job)
 
Used by:
* external clients  
* main server's cron job
* matching redirector (forwarded)


Client:
Client:
* MATCH ofid={int4 ostfile id}&foosic={str ascii hex representation of fingerprint}
* MATCH ofid={int4 ostfile id}&foosic={str ascii hex representation of fingerprint}&store=1
** the store=1 parameter is filtered out and interpreted by the matching redirector, only the main server's cron job is allowed to set store=1


Server Reply:
Server Reply:
* Matchings found
* Matchings found
: 200 MATCHED
: 200 MATCHED
: {int2 ident of matching server this fingerprint is stored on}
** this line is inserted by the matching redirector, the data is only interesting for the main server's cron job. Done only if store=1.
: {int result count}|{int compare count}|{int time taken in ms}
: {int result count}|{int compare count}|{int time taken in ms}
** this line will be suppressed by the matching redirector which processes it to decide where to store a new fingerprint (load balancing)
** this line will be suppressed by the matching redirector which processes it to decide where to store a new fingerprint (load balancing)
Line 132: Line 139:
* No matchings found
* No matchings found
: 300 UNMATCHED
: 300 UNMATCHED
: {int2 ident of matching server this fingerprint is stored on}
** this line is inserted by the matching redirector, the data is only interesting for the main server's cron job. Done only if store=1.
: {int result count}|{int compare count}|{int time taken in ms}
** this line will be suppressed by the matching redirector which processes it to decide where to store a new fingerprint (load balancing)




==== Submitting a new foosic fingerprint ====
==== Submitting a new foosic fingerprint ====
(this is only used by the main server's cron job, access is restricted)
 
Used by:
* matching redirector, access is restricted


Client:
Client:
Line 143: Line 156:
* Fingerprint was not yet in DB
* Fingerprint was not yet in DB
: 210 STORED
: 210 STORED
: {int2 ident of matching server this fingerprint is stored on}
** this line is inserted by the matching redirector, the data is only interesting for the main server's cron job


* Fingerprint was already in DB
* Fingerprint was already in DB
: 310 ALREADY STORED
: 310 ALREADY STORED
: {int2 ident of matching server this fingerprint is stored on}
** this line is inserted by the matching redirector, the data is only interesting for the main server's cron job




==== Submitting a new foosic fingerprint ====
==== Submitting a new foosic fingerprint ====
(this is only used by the main server's cron job, access is restricted)
 
Used by:
* main server's cron job, access is restricted
* matching redirector (forwarded), access is restricted


Client:
Client:
* DELETE ofid={int4 ostfile id}
* DELETE ofid={int4 ostfile id}[&{int2 ident of matching server this fingerprint is stored on}]


Server Reply:
Server Reply:
Line 167: Line 179:


==== Query the current server load/utilization ====
==== Query the current server load/utilization ====
(this is only used by the match redirector, access is restricted)
 
Used by:
* matching redirector, access is restricted


Client:
Client:

Navigation menu

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.