tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: libnv



Joerg Sonnenberger <joerg%bec.de@localhost> wrote:
> > 
> > Here is patch to import the FreeBSD's libnv library:
> > 
> > http://www.netbsd.org/~rmind/libnv.diff
> 
> I don't think anything has changed since the last time this was
> discussed, so I consider this a really, really wrong idea going forward.
> The only advantage libnv has over proplib is being somewhat simpler. It
> doesn't address any other concern like lack of schemas.

I do not think there was any conclusion either, or a conclusion that
we always want to have static serialisation with a schema (IMO, there
are pros and cons in both cases).  Worth noting that there are multiple
libraries already: we already imported libnvpair (with tons of other
code for ZFS and DTrace) and nobody complained; we still have XDR.

While libnv is not a panacea, it solves some actual problems: it has
intuitive reference counting (symmetric API), it supports accumulated
error handling, it provides more efficient binary encoding, it does not
have shared structures with internal locking, it does not have awkward
API.  As a side note, it also makes code sharing with FreeBSD (as well
as illumos) much easier.  Meanwhile, there has been little action on
improving proplib or proposing a tangible replacement of it.

Anyway, I am not proposing that everybody should use libnv.  However,
it is is quite lightweight and self-contained.  I am already using libnv
in the upstream NPF.  The conversion to libnv made the code simpler,
shorter and easier to read.  And I am not planning to maintain proplib
version: it causes too much headache and the differences are too vast.

-- 
Mindaugas


Home | Main Index | Thread Index | Old Index