On Fri, 2025-10-10 at 14:39 +0100, Daniel Golle wrote:
> On Fri, Oct 10, 2025 at 03:12:24PM +0200, Martin Schanzenbach wrote:
> > On Fri, 2025-10-10 at 14:05 +0100, Daniel Golle wrote:
> > > On Fri, Oct 10, 2025 at 09:09:22AM +0200, Martin Schanzenbach
> > > wrote:
> > > > Hello,
> > > > 
> > > > this was done on purpose because we want to deprecate/remove
> > > > the
> > > > flat
> > > > file/heap DB implementations as they are slow and buggy and
> > > > hard to
> > > > maintain because not really used. I guess I forgot to delete
> > > > the
> > > > source
> > > > file.
> > > > Also, sqlite is pretty close already to a flat file
> > > > implementation
> > > > but
> > > > a lot faster than anything we will come up with.
> > > > What is the requirement to keep it from you?
> > > 
> > > Simply to not require libsqlite on very small hardware which
> > > anyway
> > > got only very very little persistent storage usable by GNUnet.
> > > I used it for my "GNUnet for IoT" project, ie. using GNUnet as a
> > > P2P
> > > way to allow (remote and local) access to typical IoT devices
> > > without
> > > requiring any vendor-operated cloud nonsense, nor needing dyndns
> > > or
> > > other privacy nightmares, neither needing complex gateway
> > > hardware
> > > providing some kind of VPN into the local network.
> > > 
> > > So imho it *is* useful somehow, and also having a plain file
> > > peerstore backend would be amazing ;)
> > 
> > 
> > I still do not 100% buy it. a libsqlite is what 1MB?
> > Looking at the dependencies if GNUnet I wonder if that is relevant
> > in
> > any capacity, GNUnet is not on the light side itself I think.
> > libgnunetutil is about the same size as libsqlite, for example.
> 
> On a device with 16 MB flash this makes a huge the difference. On our
> MIPS24Kc builds libsqlite3 got 530.5 KB, for example.
> 
> The whole gnunet base package, which includes libgnunetutil, got
> 651.6 KB as compressed APK package.
> 
> All of GNS support got 178.3 KB, gnunet-vpn got 50.6 KB. The
> communicators are ~ 17 KB each.
> 
> So on a minimal system which only runs communicators, GNS and VPN,
> you
> end up with less than 1 MB total. libsqlite3 would hence add more
> than
> 50% of the total size on top of that, which *is* significant,
> especially
> if you consider that there anyway isn't any space to store more than
> a
> few kB of runtime data, and we also don't want to waste any flash
> erase-cycles on frequently writing stuff.
> 
> Using the plain/heap backends is ideal in this case, I'd let them
> operate on a tmpfs, and occassionally check if what is stored there
> matches the version held on the flash, and if not, update it.
> 
> In the end, namecache is all about quick recovery of connectivity
> after
> a reboot, and not cricical at all.
> 
> Just take a look at
> https://downloads.openwrt.org/snapshots/packages/mips_24kc/packages/
> and [CTRL]+[F] "gnunet" to see what I'm talking about.
> 
> 
> > 
> > That being said I am not opposed to having the plugin per se, I am
> > just
> > not willing to code and maintain it.
> > If you are, then feel free to add it and I can also merge the
> > patch.
> 
> I'll try to take care of peerstore then.

I think the primary reason then when I decided to remove the heap
plugins was namestore.
Whenever the plugin API was changed (by me) I had to modify 3 plugins:
sqlite, postgres and heap.
I guess looking back it does not happen that often.

> 
> 
> > 
> > Best
> > Martin
> > 
> > 
> > > 
> > > > 
> > > > BR
> > > > Martin
> > > > 
> > > > On Fri, 2025-10-10 at 02:14 +0100, Daniel Golle wrote:
> > > > > Build flat namecache plugin which was dropped with the
> > > > > transition
> > > > > to
> > > > > meson, leaving behind the sourcecode without a way to build
> > > > > it.
> > > > > ---
> > > > >  src/plugin/namecache/meson.build | 10 ++++++++++
> > > > >  1 file changed, 10 insertions(+)
> > > > > 
> > > > > diff --git a/src/plugin/namecache/meson.build
> > > > > b/src/plugin/namecache/meson.build
> > > > > index f1600fcc6..3dee0c761 100644
> > > > > --- a/src/plugin/namecache/meson.build
> > > > > +++ b/src/plugin/namecache/meson.build
> > > > > @@ -29,6 +29,16 @@ shared_module(
> > > > >      install_dir: get_option('libdir') / 'gnunet',
> > > > >  )
> > > > >  
> > > > > +shared_module(
> > > > > +    'gnunet_plugin_namecache_flat',
> > > > > +    ['plugin_namecache_flat.c'],
> > > > > +    install_rpath: rpath_option,
> > > > > +    dependencies: [libgnunetutil_dep,
> > > > > libgnunetgnsrecord_dep],
> > > > > +    include_directories: [incdir, configuration_inc],
> > > > > +    install: true,
> > > > > +    install_dir: get_option('libdir') / 'gnunet',
> > > > > +)
> > > > > +
> > > > >  if pq_dep.found()
> > > > >      shared_module(
> > > > >          'gnunet_plugin_namecache_postgres',

Reply via email to