[chord] About dhash.

adrian at softnet.tuc.gr adrian at softnet.tuc.gr
Sat May 22 03:39:26 EDT 2004


Hi,

I have rode test_types.C and I am still a little confused.
In my apps, dictionary, I need a kind of "light" authorization, so if
you can rough explain me the properties of each
one(PUB_KEY,CONTENT_HASH,NOAUTH), that will be very helpfull. Mainly,
differences between last two.

I have already seen a post,  Date:17/7/2003 by mwalish at lcs.mit.edu and
some replies, but still I am not sure about what is really true.

To be more precisely, the problem is that I haven't completely
understood the properties of each value of dhash_ctype.


Another one problem.
I uncomment the code-block in NOAUTH but when i run : $make typetest I
had the following results :

add at freedom:~/courses/Dip/chord-build/devel$ make typetest g++
-DHAVE_CONFIG_H -I. -I../../src/sfsnet/devel -I.. -I/usr/include/gtk-2.0
-I/ usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/pango-1.0 -I/usr/i nclude/freetype2 -I/usr/X11R6/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2. 0/include     -I../svc
-I../../src/sfsnet/proxy -I../../src/sfsnet/lsd -I../../s rc/sfsnet/svc
-I../../src/sfsnet/sfsrodb -I../../src/sfsnet/dhash -I../../src/sf
snet/dhc -I../../src/sfsnet/chord -I../../src/sfsnet/merkle
-I../../src/sfsnet/u tils  -I/usr/local/sfs-build-0.7.2/
-I/usr/local/sfs-build-0.7.2//../src/sfs-0.7 .2/async
-I/usr/local/sfs-build-0.7.2//../src/sfs-0.7.2/arpc -I/usr/local/sfs-bu
ild-0.7.2//../src/sfs-0.7.2/crypt
-I/usr/local/sfs-build-0.7.2//../src/sfs-0.7.2 /sfsmisc
-I/usr/local/sfs-build-0.7.2//svc -I/usr/local/include -I/usr/local/inc
lude -DSLEEPYCAT  -g -O2 -Wall -Werror  -c
.../../src/sfsnet/devel/test_types.C ../../src/sfsnet/devel/test_types.C:
In function `int main(int, char **)':
.../../src/sfsnet/devel/test_types.C:300: no matching function for call
to `dhash client::insert (bigint, char[8192], size_t,
refcounted<callback_2_1<void,dhash_s
tat,ptr<insert_info>,dhashclient>,scalar> *, dhash_ctype)'
.../../src/sfsnet/dhash/dhashclient.h:61: candidates are: void
dhashclient::inser t(const char *, unsigned int,
ref<callback<void,dhash_stat,ptr<insert_info>,void > >,
ptr<option_block> = 0) ../../src/sfsnet/dhash/dhashclient.h:69:
       void dhashclient::inser t(bigint, const char *, unsigned int,
ref<callback<void,dhash_stat,ptr<insert_in fo>,void> >,
ptr<option_block> = 0, dhash_ctype = DHASH_CONTENTHASH)
.../../src/sfsnet/dhash/dhashclient.h:76:                 void
dhashclient::inser t(bigint, sfs_pubkey2, sfs_sig2, keyhash_payload &,
ref<callback<void,dhash_stat ,ptr<insert_info>,void> >,
ptr<option_block> = 0) make: *** [test_types.o] Error 1
add at freedom:~/courses/Dip/chord-build/devel$

Thanks,
Adrian.


> Adrian,
>
> On Fri, 21 May 2004 at 01:33 (+0300), adrian at softnet.tuc.gr wrote:
>> I want to store a string dictionary in CHORD, like :
>>     adrian  -> ad
>>     john    -> jo
>>
>> Is it possible to be done without i hack any file of dhash
>> or dhash library can store only files?
>
> DHash is designed as a block store and can certainly
> store short values like "adrian" or "jo".  You should
> be able to use devel/type_tests.C as a guide to how to
> store blocks using the dhashclient interface.  (Also check
> dhash/dhashclient.h that has a few comments in the public
> interface.)
>
> You may want to use NOAUTH blocks, so that the DHash key will
> be the SHA-1 of "adrian"; if you use CONTENTHASH blocks,
> the DHash key would be the SHA-1 of "ad".
>
> We're working on cooking up a python interface that should
> make it easier to write DHash applications but that probably
> won't be releasable for a few weeks.
>
> --
> Emil Sit / MIT LCS PDOS / http://pdos.lcs.mit.edu/chord/






More information about the chord mailing list