View Issue Details

IDProjectCategoryView StatusLast Update
0003059GNUnetobsoletepublic2024-05-03 12:02
ReporterMatthias Wachs Assigned Tootarabai Due Date
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 15:29

reporter   ~0008212

Last edited: 2014-04-08 16: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 15:29

reporter   ~0008213

More required?

otarabai

2014-04-18 14: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 11:46

reporter   ~0008536

Persistent per peer storage implemented in PEERSTORE service.

Issue History

Date ModifiedUsernameFieldChange
2013-10-07 08:58Matthias WachsNew Issue
2013-10-07 09:29Christian GrothoffStatusnew => confirmed
2013-10-07 09:29Christian GrothoffProduct Version => Git master
2013-10-07 20:01Christian GrothoffPrioritynormal => low
2014-04-07 13:16Christian GrothoffAssigned To => otarabai
2014-04-07 13:16Christian GrothoffStatusconfirmed => assigned
2014-04-08 15:29Matthias WachsNote Added: 0008212
2014-04-08 15:29Matthias WachsNote Added: 0008213
2014-04-08 15:29Matthias WachsStatusassigned => feedback
2014-04-08 16:07Matthias WachsNote Edited: 0008212
2014-04-18 14:20otarabaiNote Added: 0008260
2014-07-28 11:46otarabaiNote Added: 0008536
2014-07-28 11:46otarabaiStatusfeedback => resolved
2014-07-28 11:46otarabaiResolutionopen => fixed
2014-09-30 08:31Christian GrothoffFixed in Version => 0.11.0pre66
2014-09-30 08:31Christian GrothoffTarget Version => 0.11.0pre66
2018-06-06 22:25Christian GrothoffStatusresolved => closed
2024-05-03 12:02Christian GrothoffCategorypeerinfo service => obsolete