-
Notifications
You must be signed in to change notification settings - Fork 0
270 lines (243 loc) · 10.9 KB
/
docs.yml
File metadata and controls
270 lines (243 loc) · 10.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
name: Generate Documentation
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz cmake g++ python3-pip
pip3 install sphinx breathe sphinx_rtd_theme
- name: Create Documentation Structure
run: |
mkdir -p docs/doxygen
mkdir -p docs/images
- name: Generate Doxygen Documentation
run: |
doxygen Doxyfile
- name: Create Index Page
run: |
cat > docs/doxygen/html/index.html << 'EOF'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>maph - High-Performance Memory-Mapped Key-Value Database</title>
<meta name="description" content="maph is a high-performance memory-mapped database with O(1) lookups using perfect hash functions. Sub-microsecond access for JSON key-value storage.">
<meta name="keywords" content="database, key-value, memory-mapped, mmap, perfect-hash, O(1), json, high-performance, approximate-data-structures">
<meta name="author" content="maph contributors">
<meta property="og:title" content="maph - Memory-Mapped Approximate Perfect Hash">
<meta property="og:description" content="High-performance key-value database with guaranteed O(1) lookups">
<meta property="og:type" content="website">
<meta property="og:url" content="https://yourusername.github.io/rd_ph_filter/">
<link rel="canonical" href="https://yourusername.github.io/rd_ph_filter/">
<style>
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; line-height: 1.6; color: #333; max-width: 1200px; margin: 0 auto; padding: 20px; }
header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 2rem; border-radius: 8px; margin-bottom: 2rem; }
h1 { margin: 0; font-size: 2.5rem; }
.subtitle { opacity: 0.95; margin-top: 0.5rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.feature { background: #f7f7f7; padding: 1.5rem; border-radius: 8px; }
.feature h3 { color: #667eea; margin-top: 0; }
.buttons { display: flex; gap: 1rem; margin: 2rem 0; }
.btn { display: inline-block; padding: 0.75rem 1.5rem; background: #667eea; color: white; text-decoration: none; border-radius: 5px; transition: transform 0.2s; }
.btn:hover { transform: translateY(-2px); background: #5a67d8; }
.btn-secondary { background: #48bb78; }
.btn-secondary:hover { background: #38a169; }
code { background: #f4f4f4; padding: 2px 6px; border-radius: 3px; font-family: monospace; }
.performance { background: #e6fffa; padding: 1.5rem; border-radius: 8px; margin: 2rem 0; }
.performance h2 { color: #234e52; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid #ddd; }
th { background: #f7f7f7; font-weight: 600; }
</style>
</head>
<body>
<header>
<h1>maph</h1>
<p class="subtitle">Memory-Mapped Approximate Perfect Hash</p>
<p>High-performance key-value database with guaranteed O(1) lookups</p>
</header>
<div class="buttons">
<a href="annotated.html" class="btn">API Documentation</a>
<a href="https://github.com/yourusername/rd_ph_filter" class="btn btn-secondary">GitHub Repository</a>
<a href="files.html" class="btn">Source Code</a>
</div>
<section>
<h2>🚀 Key Features</h2>
<div class="features">
<div class="feature">
<h3>O(1) Lookups</h3>
<p>Guaranteed constant-time operations with perfect hash optimization</p>
</div>
<div class="feature">
<h3>Memory-Mapped Storage</h3>
<p>Zero-copy access via mmap for minimal memory overhead</p>
</div>
<div class="feature">
<h3>Lock-Free Operations</h3>
<p>Atomic operations for thread-safe concurrent access</p>
</div>
<div class="feature">
<h3>JSON Native</h3>
<p>Built-in support for JSON key-value storage</p>
</div>
<div class="feature">
<h3>REST API</h3>
<p>Production-ready HTTP interface with web UI</p>
</div>
<div class="feature">
<h3>SIMD Optimized</h3>
<p>AVX2 acceleration for batch operations</p>
</div>
</div>
</section>
<section class="performance">
<h2>⚡ Performance</h2>
<table>
<tr>
<th>Operation</th>
<th>Throughput</th>
<th>Latency</th>
<th>Notes</th>
</tr>
<tr>
<td>GET</td>
<td>10M ops/sec</td>
<td><100ns</td>
<td>O(1) with perfect hash</td>
</tr>
<tr>
<td>SET</td>
<td>8M ops/sec</td>
<td><150ns</td>
<td>Lock-free atomic updates</td>
</tr>
<tr>
<td>Batch GET</td>
<td>50M ops/sec</td>
<td>-</td>
<td>SIMD optimized</td>
</tr>
<tr>
<td>Scan</td>
<td>100M items/sec</td>
<td>-</td>
<td>Sequential memory access</td>
</tr>
</table>
</section>
<section>
<h2>📚 Documentation</h2>
<ul>
<li><a href="annotated.html">API Reference</a> - Complete API documentation</li>
<li><a href="files.html">Source Files</a> - Browse source code</li>
<li><a href="modules.html">Modules</a> - Component organization</li>
<li><a href="namespaces.html">Namespaces</a> - Namespace reference</li>
<li><a href="pages.html">Related Pages</a> - Guides and tutorials</li>
</ul>
</section>
<section>
<h2>🔧 Quick Start</h2>
<h3>C++ Usage</h3>
<pre><code>#include <maph.hpp>
auto store = maph::Maph::create("mystore.maph", 1000000);
store->set(R"({"user": "alice"})", R"({"score": 95})");
auto value = store->get(R"({"user": "alice"})"); // O(1) lookup</code></pre>
<h3>REST API</h3>
<pre><code>curl -X POST http://localhost:8080/stores \
-d '{"name": "products", "slots": 1000000}'
curl -X PUT 'http://localhost:8080/stores/products/keys/"sku:12345"' \
-d '{"name": "Laptop", "price": 999}'</code></pre>
</section>
<section>
<h2>📊 Comparison with Other Systems</h2>
<table>
<tr>
<th>System</th>
<th>Lookup</th>
<th>Space</th>
<th>Persistence</th>
<th>Use Case</th>
</tr>
<tr>
<td><strong>maph</strong></td>
<td>O(1)</td>
<td>Optimal</td>
<td>mmap</td>
<td>High-perf K/V</td>
</tr>
<tr>
<td>Redis</td>
<td>O(1) avg</td>
<td>10x overhead</td>
<td>AOF/RDB</td>
<td>Cache</td>
</tr>
<tr>
<td>RocksDB</td>
<td>O(log n)</td>
<td>Compressed</td>
<td>SST files</td>
<td>Large data</td>
</tr>
<tr>
<td>Memcached</td>
<td>O(1) avg</td>
<td>In-memory</td>
<td>None</td>
<td>Simple cache</td>
</tr>
</table>
</section>
<footer style="margin-top: 4rem; padding-top: 2rem; border-top: 1px solid #ddd; text-align: center; color: #666;">
<p>© 2024 maph contributors | <a href="https://github.com/yourusername/rd_ph_filter">GitHub</a> | <a href="annotated.html">API Docs</a></p>
</footer>
</body>
</html>
EOF
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'docs/doxygen/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
# Optional: Build and test the project
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake g++
- name: Build
run: |
mkdir build
cd build
cmake .. -DBUILD_TESTS=ON
make -j$(nproc)
- name: Test
run: |
cd build
ctest --output-on-failure