You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PawnDB is an open source embedded DBMS that is designed to be ultra fast and secure. Some of the features of PawnDB:
9
+
A lightweight, type-safe in-memory database optimized for OLTP workloads.
11
10
12
-
#### In memory
11
+
##Features
13
12
14
-
The whole database, including a built-in buffer pool, resides in the static section of the memory. PawnDB **DOES NOT** request any heap memory from the OS, and only uses the internal buffer table to manage temporary buffers. However, this also limits the tuple size; the current PawnDB only supports tuples that are less than 65535 bytes, which is also the maximum UDP packet size on a Linux localhost network interface.
13
+
### Memory Management
14
+
- Zero heap allocation design
15
+
- Static memory allocation
16
+
- Built-in buffer pool management
17
+
- RAII buffer object with reference counting
18
+
- Maximum tuple size: 65535 bytes (UDP packet size limit)
15
19
16
-
#### Lock Scheme: Strict 2-PL
20
+
### Transaction Management
21
+
- Strict 2-Phase Locking (2PL)
22
+
- Tuple-level shared/exclusive locks
23
+
- Support lock promotion
24
+
- ACID compliance
25
+
- Single record operations
26
+
- Deadlock prevention.
17
27
18
-
PawnDB follows the strict 2-PL rule for transactions. However, there is an exception: a transaction can give up its shared lock on a tuple (only at the shrinking phase), which indicates transaction will only read a snapshot of the resources and does not care about the future values of the resources.
PawnDB is intended to be used as an OLTP (Online Transaction Processing) database, so it is designed with tuple-level shared/exclusive locks.
23
-
24
-
PawnDB only supports fetching/adding/removing one record at a time; this ensures it is free from the ghost record problem, which can typically be solved by adding a table lock.
25
-
26
-
#### Strong Type
27
-
28
-
PawnDB code is type-safe; all the tables and tuples must be defined in the code to use during runtime. The PawnDB code also has **NO** dynamic dispatch code, and **NO** virtual functions.
29
-
30
-
#### Portable
31
-
32
-
PawnDB code only uses C++ standard library objects, such as `std::array`, `std::mutex`, and `std::condition_variable`, etc.
33
-
34
-
There is no 3rd party library used in PawnDB, also making it suitable for commercial projects which require no restrictive copyright terms.
35
-
36
-
For the socket connection part, it uses the UNIX domain socket which is available on most POSIX systems such as various Linux distributions
37
-
38
-
#### Simple & Lightweight
39
-
40
-
PawnDB is designed to be able to run on the most tiny SoCs, including those embedded systems.
41
-
42
-
The memory footprint of PawnDB is very small, even though it has tuple level locks, the overhead of these locks are as low as ~1 bytes per tuple.
28
+
### Type Safety
29
+
- Compile-time type checking
30
+
- Zero dynamic dispatch
31
+
- No virtual functions
32
+
- Strong type system
43
33
44
34
## Language
45
35
46
36
* PawnDB is written in [ISO C++17](https://isocpp.org/std/the-standard), without compiler extensions.
0 commit comments