perfsonar-dev - Re: LS Register Action question -- [Fwd: [I2G2-Proto] New algorithm of LS Registration]
Subject: perfsonar development work
List archive
Re: LS Register Action question -- [Fwd: [I2G2-Proto] New algorithm of LS Registration]
Chronological Thread
- From: Herbert Souza <>
- To: Maciej Glowiak <>
- Cc:
- Subject: Re: LS Register Action question -- [Fwd: [I2G2-Proto] New algorithm of LS Registration]
- Date: Tue, 15 Aug 2006 17:50:57 -0300 (ART)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.br; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=kaLrOq1JB1GE3TgKghMXhY5ykDEgGvjI5wTjONWBFAFgxkW2egoODTgrILoh+Yq10weC3qNJEJUCJi3A1G5FOTUY8GxtHMBmTutC73OcN/LVpHpoufK2D/W04+cMBZCu5+mRkr828ZgiAnpS1Tgk3K7yp77eiEbNb3+hZ28++P0= ;
Hi Maciej,
I get the head of SVN files. And attached the part of the code that I am speaking.
I make the follow test with the my perfSONAR v1.0 installation:
I am register one service using the LSRegisterRequest.xml message.
In answer I received the key.
I get this key and insert in the LSRegisterRequest.xml message to use the message like Update Action message.
I get the error: LSRegisterAction: key from request [key] not found in the storage. Can't UPDATE such data, because can't determine what data should be updated
This would not have to occur because the key is registered in the BD.
The error occurs because in the part of Update Action in the test where you check the key if it's already been in the DB. If the method checkIfKeyIsRegistered return true is because the key is registered and you consider like not found key in DB.
I find that the correct test would have to be: if (!checkIfKeyIsRegistered(keyValue, xmlStorageManager)
Thanks and best regards!
//========check metadata========
//check keyValue
if (keyValue == null) { //REGISTER
//let the key value be accesspoint
logger.debug("LSRegisterAction: key = accessPoint");
keyValue = accessPoint;
} else { //UPDATE
//always enable register especially if data is registered!
allowReplaceIfAlreadyRegistered = true;
//but check the key if it's already been in the DB
if (checkIfKeyIsRegistered(keyValue, xmlStorageManager)) {
String m = "LSRegisterAction: key from request [" + keyValue +
"] not found in the storage. " +
"Can't UPDATE such data, because can't determine what data should be updated";
logger.debug(m);
throw new DataFormatException("error.ls.update.key_not_found", m);
}
}
Maciej Glowiak <> escreveu:
Herbert Souza napisa³(a):
>
> In the class "LSRegisterAction.java" in the check metadata part exists a
> test: "if(checkIfKeyIsRegistered (keyValue))". If this test return
> "true" the Key is registered and this service must be updated rigth? If
> yes, why in test when the result is "true" you consider that the Key was
> not found?
>
> The correct would be: if(!checkIfKeyIsRegistered (keyValue))?
>
> Regards and thanks!
Herbert,
I'll investigate it, but now I am on "holidays" and am unable to do it.
Please find attached the algorithm that was send on the mailing list
last year. From that time there were slight changes but LS still works
very similar as depicted on the attached diagram.
I guess that if key is already registered in the database, then the
Update action will be performed. Update and Register work exactly the
same, but different conditions must be tested. So maybe the condition
you wrote is if someone wants to update lookup information that doesn't
exist in the database! So then the update action cannot be done, because
there is nothing to update (or the key sent is wrong)
Best regards.
Maciej
-------- Wiadomo¶æ oryginalna --------
Temat: [I2G2-Proto] New algorithm of LS Registration
Data: Thu, 27 Oct 2005 17:00:16 +0200
Nadawca: Maciej Glowiak
Firma/Organizacja: Poznan Supercomputing and Networking Center
Adresat: Prototype-JRA1
Hi!
I send new algorithm containing Updates and Keepalives.
Simple registration is implemented.
I wait for your opinion.
The "set time" block means setting the time of the last update of Lookup
Information. It'll be stored internally (probably as nmwg:parameters),
but in different database collection than Metadata and Data blocks of
Lookup Info.
In the future I can imagine that we have three different collections
(like 3 different tables in SQL database): one for Metadata blocks, one
for Data blocks (because of AA) and one for control data (such as
time-of-the-last-update)
Maciej
--
--------------------------------------------------------------------
| Maciej Glowiak Network Research and Development ||
| Poznan Supercomputing and Networking Center ||
| (+48 61) 858 2109 http://monstera.man.poznan.pl/ ||
====================================================================
Herbert Monteiro Souza
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
- Re: LS Register Action question -- [Fwd: [I2G2-Proto] New algorithm of LS Registration], Maciej Glowiak, 08/15/2006
- Re: LS Register Action question -- [Fwd: [I2G2-Proto] New algorithm of LS Registration], Herbert Souza, 08/15/2006
Archive powered by MHonArc 2.6.16.