Expiration : can keys / values expire ?

19 views
Skip to first unread message

adr...@gmail.com

unread,
Nov 14, 2013, 10:20:02 AM11/14/13
to scal...@googlegroups.com
Hello,

I'm wondering if there is key or data expiration semantic in scalaris.
In some dbms one can do :
ok = hanoidb:put(Tree, <<"foo">>, <<"bar">>, 2), % 2 sec
{ok, <<"bar">>} = hanoidb:get(Tree, <<"foo">>),
ok = timer:sleep(3000), % 3000 ms
not_found = hanoidb:get(Tree, <<"foo">>)

grep'ing for "expire" in scalaris' source I have only found dht_node_db_cache.erl
Is it an expiration thing like above ? (I don't think so) If yes I think the db_backend API needs some more function specs.

What do you think about such an expiration feature ?
Have fun

Pierre M.

Nico Kruber

unread,
Nov 14, 2013, 12:53:42 PM11/14/13
to scal...@googlegroups.com
Hi Pierre,
in Scalaris there is no such thing as key/data expiration.
You'd need to implement this feature in your application instead.

In general, I'm not quite sure whether a transactional datastore aiming for
consistent storage should provide that. Also I expect some difficulties
regarding distributed setups...


Nico
signature.asc

adr...@gmail.com

unread,
Nov 22, 2013, 4:58:30 AM11/22/13
to scal...@googlegroups.com
Le jeudi 14 novembre 2013 18:53:42 UTC+1, Nico Kruber a écrit :
On Thursday 14 Nov 2013 07:20:02 adr...@gmail.com wrote:
> Hello,
>
> (snip)

>
> What do you think about such an expiration feature ?
> Have fun
>
> Pierre M.

Hi Pierre,
in Scalaris there is no such thing as key/data expiration.
You'd need to implement this feature in your application instead.

In general, I'm not quite sure whether a transactional datastore aiming for
consistent storage should provide that. Also I expect some difficulties
regarding distributed setups...


Nico

 Hello Nico,

thank you for explaining.
I understand the feature can be implemented at the application level.
And it is good if it makes it simpler to have transactions in a distributed cluster.

Have fun

Pierre M.
Reply all
Reply to author
Forward
0 new messages