Re: [Opencdn-devel-it] Ri-aggiornamento
Brought to you by:
aalef
From: Alessandro F. <aa...@li...> - 2005-05-01 20:25:31
|
Scusatemi se accumulo ritardo nelle risposte, ma ancora non mi sento "a pieni giri".. anzi ho la sensazione che mi ci vorra' ancora un po :-( Il giorno gio, 28-04-2005 alle 12:10 +0200, Pierluigi Vittori ha scritto: > Ho lavorato in questi giorni al resto delle modifiche e aggiunte da far= e per la=20 > realizzazione della selezione del LH pi=F9 vicino tramite le ormai famo= se=20 > immaginette :-) >=20 > Dunque ho modificato il comportamento della funzione find_best che ades= so, se=20 > viene chiamata con un parametro nuovo (l'ip del client, appunto), mette= nella=20 > stringa del probe proprio questo dato, facendo capire al nodo sotto pro= be:=20 > "mandami il tempo di download del client". come "glielo fa capire" ? purtroppo il formato del probe e' nato in modo un po' "naif", spesso ho pensato che forse sarebbe stato il caso di formattarlo in XML, ma poi non l'ho mai fatto. Dato nel probe che c'e' gia' il "program" che puo' esserci o meno, non vorrei la presenza di un ulteriore parametro opzionale (l'IP del client) causasse problemi nel parsing.... > In base ai dati ricevuti, aspettando che siano tornate almeno tutte le = risposte=20 > dei nodi contenuti in una stessa FP, find_best decide qual'=E8 il LH pi= =F9 prossimo=20 > al client e lo restituisce al chiamante. >=20 > Per fare ci=F2, ho modificato anche il comportamento del figlio che ris= ponde al=20 > probe in modo che adesso, se nel probe in arrivo =E8 contenuto l'ip del= client di=20 > cui si vuole il tempo di download, il probe di risposta contiene anche = questo=20 > dato che, una volta "servito", viene cancellato dal DB_file. nel frattempo mi era anche venuto in mente, che potrebbe anche succedere che il probe arrivi prima ancora che sia stata scaricata del tutto l'immaginetta. A parte il caso di un viewer particolarmente frettoloso, ci sono poi i motori di ricerca, che "non guardano in faccia a nessuno". Credo che in tal caso, il comportamento piu' corretto sia di rispondere comunque subito al probe, senza restituire nessun tempo. E se chi ha spedito diversi probe, non riceve tempi da nessuno, deve comportarsi come prima che venisse introdotta questa nuova feature. Dico bene ? > Ho fatto un po' di prove tra il mio server e il portatile e devo dire c= he i=20 > risultati sono incoraggianti: viene addirittura selezionato il LH da cu= i il=20 > client ha scaricato l'immagine pi=F9 rapidamente! :-) juhuuu !! Il giorno ven, 29-04-2005 alle 12:14 +0200, Pierluigi Vittori ha scritto:=20 > Sempre nell'ambito del problema immaginette, ho modificato anche la pro= cedura=20 > di registrazione del nodo. giusto. > In particolare ho aggiunto una variabile $image_port al NodeConfig.pm e= questa=20 > variabile viene comunicata all'rrdm al momento della registrazione del = nodo. >=20 > Il valore di $image_port viene poi utilizzato dal nuovo metodo GetLH ch= e=20 > adesso, oltre a restituire l'indirizzo ip del nodo, manda anche la port= a su cui=20 > il demone http =E8 in ascolto per servire le immagini. per capire: quando il nodo si registra, manda anche la URL dell'immagine, del tipo http://indirizzodelnodo:portaperimmagine/nomeimmagine.gif ? e questa stessa url, viene restituita da GetLH, in modo che il portale la usi per generare la pagina da far vedere al viewer ? oppure http://indirizzodelnodo lo aggiunge il portale, mentre la registrazione contiene solo portaperimmagine/nomeimmagine.gif, che e' quello che sta scritto nel config ??? > Ovviamente, visto che messo mano a parecchi file e ho praticamente "dev= astato"=20 > il mio cvs locale, non vorrei fare altrettanto con quello di sourceforg= e, per=20 > cui, in attesa di ulteriori prove e verifiche, ancora non ho mandato su= alcuna=20 > modifica. temo solo il momento in cui verranno messe contemporaneamente sia le modifiche tue, che quelle di Massimo... per questo, penso che sarebbe meglio fare dei commit frequenti, con piccole modifiche ogni volta, cercando di lasciare il codice in uno stato sempre e comunque funzionante ! --=20 Alessandro Falaschi - aa...@li... MSN: aa...@li... ICQ: 156691142 Yahoo: aalef_59 Jabber: aal...@ja... |