View Issue Details

IDProjectCategoryView StatusLast Update
0003059GNUnetpeerinfo servicepublic2018-06-07 00:25
ReporterMatthias Wachs Assigned Tootarabai  
PrioritylowSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.11.0pre66Fixed in Version0.11.0pre66 
Summary0003059: Implementation of a persistent per peer storage
DescriptionMultiple components need to store per-peer information and retrieve these information after gnunet restart.

To provide this functionality in a central manner, an idea is to modify the peerinfo service, storing only hello information, to a "peerstore" service to persistently store per-peer information in a key-value mapping.

Clients will to store a value under a key (e.g. the subsystem name) and pass a pointer to the data and size information and peerstore will store this data in a backend. Peerstore will be agnostic of the data.

Peerstore will provide functions to store and retrieve this data.

We suggest the usage of an api backend to provide the possibility to use a database engine in addition to file base storage.
Steps To ReproduceTo move from peerinfo to peerstore, we have to modify current functionality focused on storing HELLO messages and provide a way to retrieve the HELLO messages
TagsNo tags attached.

Activities

Matthias Wachs

2014-04-08 17:29

manager   ~0008212

Last edited: 2014-04-08 18:07

Required functions are:

struct GNUNET_PEERSTORE_Handle *
GNUNET_PEERSTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);

void
GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h);

/* Iterate */

struct GNUNET_PEERSTORE_IteratorContext *
GNUNET_PEERSTORE_iterate (struct GNUNET_PEERSTORE_Handle *h,
                         const struct GNUNET_PeerIdentity *peer, /* can be NULL */
                         struct GNUNET_TIME_Relative timeout,
                         GNUNET_PEERSTORE_Processor callback, void *callback_cls);

GNUNET_PEERSTORE_iterate_cancel (struct GNUNET_PEERSTORE_IteratorContext *ic);


/* Watch */

struct GNUNET_PEERSTORE_NotifyContext *
GNUNET_PEERSTORE_notify (const struct GNUNET_CONFIGURATION_Handle *cfg,
            const struct GNUNET_PeerIdentity *peer, /* can be NULL */
                  const char *key, /* can be NULL */
                        GNUNET_PEERSTORE_Processor callback, void *callback_cls);

void
GNUNET_PEERSTORE_notify_cancel (struct GNUNET_PEERSTORE_NotifyContext *nc);

/* Store */

struct GNUNET_PEERSTORE_AddContext *
GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h,
                       const struct GNUNET_PeerIdentity *peer,
               const char *key,
               const void *value,
               size_t size,
               GNUNET_PEERSTORE_AddContinuation cont,
               void *add_cont_cls);

void
GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_Handle *h,
                       struct GNUNET_PEERSTORE_AddContext *ac);
/* Get */

struct GNUNET_PEERSTORE_GetContext *
GNUNET_PEERSTORE_get (struct GNUNET_PEERSTORE_Handle *h,
                       const struct GNUNET_PeerIdentity *peer,
               const char *key,
               GNUNET_PEERSTORE_GetContinuation cont,
               void *get_cont_cls);

void
GNUNET_PEERSTORE_get_cancel (struct GNUNET_PEERSTORE_Handle *h,
                       struct GNUNET_PEERSTORE_GetContext *gc);

Matthias Wachs

2014-04-08 17:29

manager   ~0008213

More required?

otarabai

2014-04-18 16:20

reporter   ~0008260

Christian's comment:

Clients will store value under a PeerIdentity and a subsystem name,
so the key is both "char * + PublicKey", not just the subsystem name.

So the 'const char *subsystem/key' argument needs to be passed to the
'GNUNET_PEERSTORE_iterate' call as well.

Also, you never defined the GetContinuation/AddContinuation/Processor
callbacks.

otarabai

2014-07-28 13:46

reporter   ~0008536

Persistent per peer storage implemented in PEERSTORE service.

Issue History

Date Modified Username Field Change
2013-10-07 10:58 Matthias Wachs New Issue
2013-10-07 11:29 Christian Grothoff Status new => confirmed
2013-10-07 11:29 Christian Grothoff Product Version => Git master
2013-10-07 22:01 Christian Grothoff Priority normal => low
2014-04-07 15:16 Christian Grothoff Assigned To => otarabai
2014-04-07 15:16 Christian Grothoff Status confirmed => assigned
2014-04-08 17:29 Matthias Wachs Note Added: 0008212
2014-04-08 17:29 Matthias Wachs Note Added: 0008213
2014-04-08 17:29 Matthias Wachs Status assigned => feedback
2014-04-08 18:07 Matthias Wachs Note Edited: 0008212
2014-04-18 16:20 otarabai Note Added: 0008260
2014-07-28 13:46 otarabai Note Added: 0008536
2014-07-28 13:46 otarabai Status feedback => resolved
2014-07-28 13:46 otarabai Resolution open => fixed
2014-09-30 10:31 Christian Grothoff Fixed in Version => 0.11.0pre66
2014-09-30 10:31 Christian Grothoff Target Version => 0.11.0pre66
2018-06-07 00:25 Christian Grothoff Status resolved => closed