Debian Codegraph @

debian/control

raw symbols SCIP
1 Source: golang-github-bmatsuo-lmdb-go
2 Section: devel
3 Priority: optional
4 Maintainer: Debian Go Packaging Team <[email protected]>
5 Uploaders: Andreas Henriksson <[email protected]>
6 Build-Depends: debhelper-compat (= 13),
7 dh-golang,
8 golang-any,
9 golang-golang-x-net-dev
10 Standards-Version: 4.2.1
11 Homepage: https://github.com/bmatsuo/lmdb-go
12 Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-github-bmatsuo-lmdb-go
13 Vcs-Git: https://salsa.debian.org/go-team/packages/golang-github-bmatsuo-lmdb-go.git
14 XS-Go-Import-Path: github.com/bmatsuo/lmdb-go
15 #Testsuite: autopkgtest-pkg-go
16
17 Package: golang-github-bmatsuo-lmdb-go-dev
18 Architecture: all
19 Depends: ${misc:Depends},
20 golang-golang-x-net-dev
21 Description: Bindings for the LMDB C library
22 Go bindings to the OpenLDAP Lightning Memory-Mapped Database (LMDB).
23 Packages Functionality is logically divided into several packages.
24 Applications will usually need to import lmdb but may import other
25 packages on an as needed basis.
26 .
27 Packages in the exp/ directory are not stable and may change without
28 warning. That said, they are generally usable if application
29 dependencies are managed and pinned by tag/commit.
30 .
31 Developers concerned with package stability should consult the
32 documentation. lmdb GoDoc
33 (https://godoc.org/github.com/bmatsuo/lmdb-go/lmdb)
34 stable (#user-content-versioning-and-stability)
35 go import "github.com/bmatsuo/lmdb-go/lmdb"
36 .
37 Core bindings allowing low-level access to LMDB. lmdbscan
38 GoDoc (https://godoc.org/github.com/bmatsuo/lmdb-go/lmdbscan)
39 stable (#user-content-versioning-and-stability)
40 go import "github.com/bmatsuo/lmdb-go/lmdbscan"
41 .
42 A utility package for scanning database ranges. The API is inspired by
43 bufio.Scanner (https://godoc.org/bufio#Scanner) and the python cursor
44 implementation (https://lmdb.readthedocs.org/en/release/#cursor-class).
45 exp/lmdbpool GoDoc
46 (https://godoc.org/github.com/bmatsuo/lmdb-go/exp/lmdbpool)
47 experimental (#user-content-versioning-and-stability)
48 go import "github.com/bmatsuo/lmdb-go/exp/lmdbpool"
49 .
50 A utility package which facilitates reuse of lmdb.Txn objects using a
51 sync.Pool. Naively storing lmdb.Txn objects in sync.Pool can be
52 troublesome. And the lmdbpool.TxnPool type has been defined as a
53 complete pooling solution and as reference for applications attempting
54 to write their own pooling implementation.
55 .
56 The lmdbpool package is relatively new. But it has a lot of potential
57 utility. And once the lmdbpool API has been ironed out, and the
58 implementation hardened through use by real applications it can be
59 integrated directly into the lmdb package for more transparent
60 integration. Please test this package and provide feedback to speed
61 this process up. exp/lmdbsync GoDoc
62 (https://godoc.org/github.com/bmatsuo/lmdb-go/exp/lmdbsync)
63 experimental (#user-content-versioning-and-stability)
64 go import "github.com/bmatsuo/lmdb-go/exp/lmdbsync"
65 .
66 An experimental utility package that provides synchronization necessary
67 to change an environment's map size after initialization. The package
68 provides error handlers to automatically manage database size and retry
69 failed transactions.
70 .
71 The lmdbsync package is usable but the implementation of Handlers are
72 unstable and may change in incompatible ways without notice.
73 The use cases of dynamic map sizes and multiprocessing are niche and
74 the package requires much more development driven by practical feedback
75 before the Handler API and the provided implementations can be
76 considered stable. Key Features: Idiomatic API inspired by BoltDB
77 (https://github.com/boltdb/bolt) with automatic commit/rollback of
78 transactions. The goal of lmdb-go is to provide idiomatic database
79 interactions without compromising the flexibility of the C API.
80 .
81 NOTE: While the lmdb package tries hard to make LMDB as easy to
82 use as possible there are compromises, gotchas, and caveats that
83 application developers must be aware of when relying on LMDB to store
84 their data. All users are encouraged to fully read the documentation
85 (https://godoc.org/github.com/bmatsuo/lmdb-go/lmdb) so they are aware
86 of these caveats.
87 .
88 Where the lmdb package and its implementation decisions do not
89 meet the needs of application developers in terms of safety or
90 operational use the lmdbsync package has been designed to wrap lmdb and
91 safely fill in additional functionality. Consult the documentation
92 (https://godoc.org/github.com/bmatsuo/lmdb-go/exp/lmdbsync) for more
93 information about the lmdbsync package. API coverage The lmdb-go
94 project aims for complete coverage of the LMDB C API (within reason).
95 Some notable features and optimizations that are supported: • Idiomatic
96 subtransactions ("sub-updates") that allow the batching of updates.•
97 Batch IO on databases utilizing the MDB_DUPSORT and MDB_DUPFIXED flags.•
98 Reserved writes than can save in memory copies converting/buffering into
99 []byte. For tracking purposes a list of unsupported features is kept in
100 an issue (https://github.com/bmatsuo/lmdb-go/issues/1). Zero-copy reads
101 Applications with high performance requirements can opt-in to fast,
102 zero-copy reads at the cost of runtime safety. Zero-copy behavior is
103 specified at the transaction level to reduce instrumentation overhead.
104 .
105 ``` err := lmdb.View(func(txn *lmdb.Txn) error {
106 // RawRead enables zero-copy behavior with some serious caveats.
107 // Read the documentation carefully before using. txn.RawRead = true
108 val, err := txn.Get(dbi, []byte("largevalue"), 0) // ...
109 .
110 }) ``` Documentation Comprehensive documentation and examples
111 are provided to demonstrate safe usage of lmdb. In addition to
112 godoc (https://godoc.org/github.com/bmatsuo/lmdb-go) documentation,
113 implementations of the standand LMDB commands (mdb_stat, etc) can be found
114 in the cmd/ (cmd/) directory and some simple experimental commands can be
115 found in the exp/cmd/ (exp/cmd) directory. Aside from providing minor
116 utility these programs are provided as examples of lmdb in practice.
117 LMDB compared to BoltDB: BoltDB is a quality database with a design
118 similar to LMDB. Both store key-value data in a file and provide ACID
119 transactions. So there are often questions of why to use one database
120 or the other. Advantages of BoltDB• Nested databases allow for
121 hierarchical data organization.• Far more databases can be accessed
122 concurrently.• Operating systems that do not support sparse files do
123 not use up excessive space due to a large pre-allocation of file space.
124 The exp/lmdbsync package is intended to resolve this problem with
125 LMDB but it is not ready.• As a pure Go package bolt can be easily
126 cross-compiled using the go toolchain and GOOS/GOARCH variables.• Its
127 simpler design and implementation in pure Go mean it is free of many
128 caveats and gotchas which are present using the lmdb package. For more
129 information about caveats with the lmdb package, consult its documentation
130 (https://godoc.org/github.com/bmatsuo/lmdb-go/lmdb).Advantages of LMDB•
131 Keys can contain multiple values using the DupSort flag.• Updates can
132 have sub-updates for atomic batching of changes.• Databases typically
133 remain open for the application lifetime. This limits the number of
134 concurrently accessible databases. But, this minimizes the overhead of
135 database accesses and typically produces cleaner code than an equivalent
136 BoltDB implementation.• Significantly faster than BoltDB. The raw
137 speed of LMDB easily surpasses BoltDB. Additionally, LMDB provides
138 optimizations ranging from safe, feature-specific optimizations to
139 generally unsafe, extremely situational ones. Applications are free to
140 enable any optimizations that fit their data, access, and reliability
141 models.• LMDB allows multiple applications to access a database
142 simultaneously. Updates from concurrent processes are synchronized using
143 a database lock file.• As a C library, applications in any language
144 can interact with LMDB databases. Mission critical Go applications can
145 use a database while Python scripts perform analysis on the side.Build
146 There is no dependency on shared libraries. So most users can simply
147 install using go get.
148 .
149 go get github.com/bmatsuo/lmdb-go/lmdb
150 .
151 On FreeBSD 10, you must explicitly set CC (otherwise it will fail with
152 a cryptic error), for example: CC=clang go test -v ./...
153 .
154 Building commands and running tests can be done with go or with make:
155 make bin ; make test ; make check ; make all
156 .
157 On Linux, you can specify the pwritev build tag to reduce the number
158 of syscalls required when committing a transaction. In your own package
159 you can then do go build -tags pwritev .
160 .
161 to enable the optimisation. DocumentationGo doc The go doc documentation
162 available on godoc.org (https://godoc.org/github.com/bmatsuo/lmdb-go)
163 is the primary source of developer documentation for lmdb-go.
164 It provides an overview of the API with a lot of usage examples.
165 Where necessary the documentation points out differences between
166 the semantics of methods and their C counterparts. LMDB The
167 LMDB homepage (http://symas.com/mdb/) and mailing list (archives
168 (http://www.openldap.org/lists/openldap-technical/)) are the official
169 source of documentation regarding low-level LMDB operation and internals.
170 .
171 Along with an API reference LMDB provides a high-level summary
172 (http://symas.com/mdb/doc/starting.html) of the library. While lmdb-go
173 abstracts many of the thread and transaction details by default the rest
174 of the guide is still useful to compare with go doc. Versioning and
175 Stability The lmdb-go project makes regular releases with IDs X.Y.Z.
176 All packages outside of the exp/ directory are considered stable and
177 adhere to the guidelines of semantic versioning (http://semver.org/).
178 .
179 Experimental packages (those packages in exp/) are not required to adhere
180 to semantic versioning. However packages specifically declared to merely
181 be "unstable" can be relied on more for long term use with less concern.
182 .
183 The API of an unstable package may change in subtle ways between minor
184 release versions. But deprecations will be indicated at least one
185 release in advance and all functionality will remain available through
186 some method. License Except where otherwise noted files in the lmdb-go
187 project are licensed under the BSD 3-clause open source license.
188 .
189 The LMDB C source is licensed under the OpenLDAP Public License.
190 Linksgithub.com/bmatsuo/raft-mdb (https://github.com/bmatsuo/raft-mdb)
191 (godoc (https://godoc.org/github.com/bmatsuo/raft-mdb))
192 An experimental backend for github.com/hashicorp/raft
193 (https://github.com/hashicorp/raft) forked from
194 github.com/hashicorp/raft-mdb (https://github.com/hashicorp/raft-mdb).
195 github.com/bmatsuo/cayley/graph/lmdb
196 (https://github.com/bmatsuo/cayley/tree/master/graph/lmdb)
197 (godoc (https://godoc.org/github.com/bmatsuo/cayley/graph/lmdb))
198 Experimental backend quad-store for github.com/google/cayley
199 (https://github.com/google/cayley) based off of the BoltDB implementation
200 (https://github.com/google/cayley/tree/master/graph/bolt).
201
202 Package: lmdb-go-tools
203 Architecture: any
204 Depends: ${misc:Depends}, ${shlibs:Depends}
205 Built-Using: ${misc:Built-Using}
206 Description: utilities for command-line lmdb usage
207 This package contains tools like lmdb_cat, lmdb_copy, lmdb_stat and
208 testresize.