W3C home > Mailing lists > Public > semantic-web@w3.org > November 2012

Re: Incrementing a literal

From: Tim Berners-Lee <timbl@w3.org>
Date: Wed, 14 Nov 2012 12:38:02 -0500
Cc: Semantic Web <semantic-web@w3.org>
Message-Id: <7BD97D92-7FEE-42E4-B1B3-D59A8DB2544B@w3.org>
To: Melvin Carvalho <melvincarvalho@gmail.com>
Responding to the original message, we saw this as a need in general to be able to
do something indivisible, for generating cloakroom tickets or next ids or
whatever. In general, distributed systems must have some form of P/V flag.
So the plan is currently:

	DELETE { :c1 :value } INSERT DATA { c1 :value  23} 

must then give an error if the value has already been incremented by 
someone else.  Then the client rolls back, re-reads the RDF resource,
and tries again in a moment.
 
See  "Note 409 conflict"  section of http://www.w3.org/DesignIssues/ReadWriteLinkedData.html

Tim



On 2012-11 -10, at 06:54, Melvin Carvalho wrote:

> Is there a pattern for incrementing a literal counter?
> 
> Alice stores turtle in http://example.org/counter
> 
> The initial operation should generate something like
> 
> <#> <#counter> 1.
> 
> Then the subsequent operation
> 
> <#> <#counter> 2.
> 
> And after that.
> 
> <#> <#counter> 3.
> 
> And so on ...
> 
> Is there a neat way to do this in  distributed way?  SPARQL update?   Maybe using Etags?  
Received on Wednesday, 14 November 2012 17:38:12 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 21:45:52 GMT