[RUS-WG] RUS IDL Comments /replaceUsageRecords)

Gilbert Netzer noname at pdc.kth.se
Fri Sep 21 06:54:10 CDT 2007


Dear Xiaoyu and RUS-WG members,

in this mail I wanted to comment only on the second issue raised.

See also tracker at https://forge.gridforum.org/sf/go/artf6015

After a little experimentation I have been able to use a single XQuery
update statement (in this case with the eXist XMLDB in version 1.1.1) to
replace the contents of several usage records, thus emulating the behaviour
of the old replaceUsageRecords operation:

for $new_ur in (<ur><id recId="1"/><val>New Value1</val></ur>, <ur><id
recId="2"/><val>New Value2</val></ur> ), $old_ur in /urs/ur
where $old_ur/id[@recId=$new_ur/id/@recId]
return (update replace $old_ur with $new_ur)

The previous statement replaces two usage records in the collection with
new contents supplied via the query. It is written in the eXist variant of
XQuery update, the current W3C draft variant would look the same but the
word "update" replaced with "do".

While this demonstrates that the replaceUsageRecords operation can be
moddeled using the modifyUsageRecords operation, the issue of including a
replaceUsageRecords operation into the specification is still open.

To further elaborate on the discussion, I want to post the following questions:

- Does your application use (or would use) the replaceUsageRecords
operation and how frequent do you thing will this operation be?

- If yes is should this go into the RUS Core or RUS Advanced specification?

- Should this be a separate operation or should the modifyUsageRecords
operation be extended with a query dialect that allows presenting a list of
usage records with replacements for existing records (the match would be
done via the unique record identity attribute that may not be changed)?

Thanks in advance for your comments!

Best Regards
Gilbert Netzer


Xiaoyu Chen wrote:
> Dear RUS chairs and members:
>  
>         Here are my comments on RUS IDL spec (https://forge.gridforum.org/sf/go/artf6015?nav=1)  submitted by Glibert recently:
>  
>         1). The service interface description should be clarified in a consistent way as defined in IDL spec especially in following particular points:
>  
>          RUS:extractUsageRecords need to re-defined as IDL spec. How about RUS:extractUsageRecordIds? This is an important operation as I can see. An example usage scenario would be query specific usage record using urf:UsageRecord/urf:RecordIdentity/@recordId as a context node within xpath statement. The client won't know the recordId value before querying. An auxiliary operation, RUS:extractUsageRecordIds would be helpful. For users unfamilar with xpath statement, would it be better to have RUS:extractSpecificUsageRecords with a set of recordId values as parameters?
> 
>         2). Most of modification operations (updates and deletions) defined within RUS v1.7 specs are reduntant. I totally agree to remove most of them, except RUS:replaceUsageRecords. It is difficult to replace existing usage records using a single RUS:modifyUsageRecords operation.
> 
>        kind regards!
> 
>  
> School of Engineering and Design
> Mobile: Mobile: ++44(0)7871876894
> X. Chen
> --
>   rus-wg mailing list
>   rus-wg at ogf.org
>   http://www.ogf.org/mailman/listinfo/rus-wg
> 



More information about the rus-wg mailing list