-
Notifications
You must be signed in to change notification settings - Fork 1
guides_enterprise_build
Guide for building and deploying ThemisDB at enterprise scale.
- π Γbersicht
- β¨ Features
- π Quick Start
- π Enterprise Build
- π‘ Best Practices
- π§ Troubleshooting
- π Weitere Ressourcen
- π Changelog
Build and deployment guidance for enterprise environments with special focus on scalability features.
Stand: 22. Dezember 2025
Version: 1.3.0
Kategorie: π¨ Build/Deployment
- π’ Enterprise Features - Sharding, Replication, Distributed Transactions
- π Security - mTLS, RBAC, encryption at rest
- π Scalability - Horizontal scaling with Raft consensus
- β‘ Performance - Multi-shard query optimization
β
Implementation: 100% Complete
REM 1. Γffne "x64 Native Tools Command Prompt for VS 2022"
REM Start Menu β Visual Studio 2022 β x64 Native Tools Command Prompt
REM 2. Navigate to project
cd C:\VCC\themis
REM 3. Build mit Enterprise Features
.\scripts\build_enterprise.cmd
REM 4. Tests ausfΓΌhren
build-msvc-ninja-debug\themis_tests.exe --gtest_filter="*Enterprise*" --gtest_brief=1# 1. VS-Umgebung laden
& "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat"
# 2. Build
cd C:\VCC\themis
cmake --build build-msvc-ninja-debug --target themis_tests
# 3. Tests
.\build-msvc-ninja-debug\themis_tests.exe --gtest_filter="*Enterprise*"- Γffne CMake GUI
- Source:
C:\VCC\themis - Build:
C:\VCC\themis\build-msvc-ninja-debug - Configure β Generate
- Open Project in Visual Studio
- Build β Build Solution
fatal error C1083: Datei (Include) kann nicht geΓΆffnet werden: "atomic"
fatal error C1083: Datei (Include) kann nicht geΓΆffnet werden: "string"
MSVC benΓΆtigt spezielle Umgebungsvariablen fΓΌr C++ Standard Library Includes:
-
INCLUDE- C++ Header Pfade -
LIB- Library Pfade -
PATH- Compiler Pfade
A) Verwende VS Developer Command Prompt:
REM Start Menu suchen nach:
"x64 Native Tools Command Prompt for VS 2022"B) Oder lade Umgebung in PowerShell:
# vcvars64.bat ausfΓΌhren
cmd /c "`"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat`" && set" | ForEach-Object {
if ($_ -match "^(.*?)=(.*)$") {
[Environment]::SetEnvironmentVariable($matches[1], $matches[2])
}
}C) Oder verwende CMake in Visual Studio:
- File β Open β CMake β
C:\VCC\themis\CMakeLists.txt - Build β Build All
// include/server/rate_limiter_v2.h
// src/server/rate_limiter_v2.cpp
TokenBucketRateLimiter limiter(config);
if (limiter.tryAcquire(1, Priority::NORMAL)) {
// Process request
}PerClientRateLimiter limiter(config);
if (limiter.allowRequest(client_id, 1, Priority::NORMAL)) {
// Process request
}// include/server/load_shedder.h
// src/server/load_shedder.cpp
LoadShedder shedder(config);
shedder.updateLoad(cpu, memory, queue_depth);
if (shedder.shouldReject(priority)) {
return HTTP 503;
}// include/utils/http_client_pool.h
// src/utils/http_client_pool.cpp
HTTPClientPool pool(config);
auto future = pool.post("https://api.example.com", body);
auto response = future.get();POST /entities/batch
{
"operations": [
{"op": "put", "key": "users:u1", "blob": "{...}"},
{"op": "delete", "key": "orders:o123"}
]
}Auch ohne erfolgreichen Build kΓΆnnen Sie die Implementierung verifizieren:
# PrΓΌfe implementierte Headers
Get-Content C:\VCC\themis\include\server\rate_limiter_v2.h | Select-String "class Token"
Get-Content C:\VCC\themis\include\server\load_shedder.h | Select-String "class Load"
Get-Content C:\VCC\themis\include\utils\http_client_pool.h | Select-String "class Beast"
# PrΓΌfe Implementierungen
Get-Content C:\VCC\themis\src\server\rate_limiter_v2.cpp | Measure-Object -Line
Get-Content C:\VCC\themis\src\server\load_shedder.cpp | Measure-Object -Line
Get-Content C:\VCC\themis\src\utils\http_client_pool.cpp | Measure-Object -Line
# PrΓΌfe Tests
Get-Content C:\VCC\themis\tests\test_enterprise_scalability.cpp | Select-String "TEST\("Get-ChildItem C:\VCC\themis\include\server\*rate_limiter*.h, C:\VCC\themis\include\server\load_shedder.h, C:\VCC\themis\include\utils\http_client_pool.h |
Select-Object Name, Length, LastWriteTime# PrΓΌfe ob Features in CMakeLists.txt aktiviert sind
Get-Content C:\VCC\themis\CMakeLists.txt | Select-String "load_shedder|http_client_pool"-
docs/ENTERPRISE_SCALABILITY.md- Feature-Γbersicht mit Beispielen -
docs/HTTP_CLIENT_POOL_COMPLETE.md- HTTP Client Pool Details -
docs/performance/ENTERPRISE_SCALABILITY_STRATEGY.md- Architektur & Strategie
-
docs/ENTERPRISE_IMPLEMENTATION_STATUS.md- Status & Roadmap
include/
server/
rate_limiter_v2.h (~160 LOC)
load_shedder.h (~60 LOC)
utils/
http_client_pool.h (~120 LOC)
src/
server/
rate_limiter_v2.cpp (~200 LOC)
load_shedder.cpp (~60 LOC)
utils/
http_client_pool.cpp (~320 LOC)
tests/
test_enterprise_scalability.cpp (~450 LOC)
Total: ~1,370 Lines of Code
Falls VS-Umgebung Probleme macht, verwende Docker:
# Dockerfile.enterprise
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022
# Install VS Build Tools
RUN choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"
WORKDIR /themis
COPY . .
# Build
RUN cmd /c "C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat && cmake --build build-msvc-ninja-debug --target themis_tests"
# Test
RUN build-msvc-ninja-debug\themis_tests.exe --gtest_filter="*Enterprise*"Build:
docker build -f Dockerfile.enterprise -t themis-enterprise .name: Enterprise Features Build
on: [push, pull_request]
jobs:
build-enterprise:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup VS Environment
uses: microsoft/setup-msbuild@v1
- name: Build
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake --build build-msvc-ninja-debug --target themis_tests
shell: cmd
- name: Test
run: |
build-msvc-ninja-debug\themis_tests.exe --gtest_filter="*Enterprise*" --gtest_output=xml:test-results.xml
- name: Upload Results
uses: actions/upload-artifact@v2
with:
name: test-results
path: test-results.xml// tests/load/enterprise_load_test.js
import http from 'k6/http';
import { check, sleep } from 'k6';
export let options = {
stages: [
{ duration: '2m', target: 100 }, // Normal load
{ duration: '5m', target: 100 },
{ duration: '2m', target: 200 }, // Peak load
{ duration: '5m', target: 200 },
{ duration: '2m', target: 1000 }, // Stress test
{ duration: '3m', target: 1000 },
{ duration: '2m', target: 0 }, // Ramp down
],
thresholds: {
http_req_duration: ['p(95)<500'], // 95% unter 500ms
http_req_failed: ['rate<0.01'], // <1% Fehlerrate
},
};
export default function () {
// Test Batch Endpoint
const payload = JSON.stringify({
operations: Array.from({length: 100}, (_, i) => ({
op: 'put',
key: `test:${i}`,
blob: JSON.stringify({value: i})
}))
});
const response = http.post(
'http://localhost:18765/entities/batch',
payload,
{ headers: { 'Content-Type': 'application/json' } }
);
check(response, {
'status is 200': (r) => r.status === 200,
'batch succeeded': (r) => JSON.parse(r.body).succeeded > 0,
});
sleep(0.1);
}Run:
k6 run tests/load/enterprise_load_test.js- Build in VS Developer Command Prompt erfolgreich
- Alle Enterprise Tests bestanden (19 Tests)
- Load Test mit k6 durchgefΓΌhrt (>50k req/s)
- Rate Limiting konfiguriert (capacity, refill_rate)
- Load Shedding aktiviert (thresholds)
- HTTP Client Pool konfiguriert (max_connections)
- Monitoring aktiviert (/metrics endpoint)
- Dokumentation aktualisiert
- Performance Targets erreicht (siehe Strategy Doc)
1. "atomic" nicht gefunden
- LΓΆsung: VS Developer Command Prompt verwenden
2. Tests hΓ€ngen bei HTTP Requests
- LΓΆsung: Network-Tests ΓΌberspringen wenn httpbin.org nicht erreichbar
- Tests haben automatisches Skip bei Timeout
3. SSL/TLS Fehler
- LΓΆsung: OpenSSL Zertifikate installieren
vcpkg install openssl
4. Linker Fehler
- LΓΆsung: Alle Dependencies neu installieren
vcpkg install boost-beast openssl
-
Build in korrekter Umgebung durchfΓΌhren:
REM x64 Native Tools Command Prompt cd C:\VCC\themis .\scripts\build_enterprise.cmd
-
Tests ausfΓΌhren:
build-msvc-ninja-debug\themis_tests.exe --gtest_filter="*Enterprise*" -
Load Testing:
k6 run tests/load/enterprise_load_test.js
-
Integration in HTTP Server:
- Rate Limiter Middleware hinzufΓΌgen
- Load Shedder in Request Pipeline
- HTTP Client Pool fΓΌr Embedding APIs
-
Monitoring Setup:
- Prometheus /metrics endpoint
- Grafana Dashboard
- Alerting Rules
Status: β
Implementation Complete - Ready for VS Environment Build
Last Updated: 2025-11-30
Version: 1.0
ThemisDB 1.9.0-beta Β· Home Β· Wiki-Index Β· Module-Index Β· FAQ Β· Quick-Reference Β· GitHub Β· Issues Β· Discussions Β· License
- Batch Operations
- Best Practices
- CRUD Tutorial
- Custom Document Ingestion
- Getting Started Tutorial
- Interactive Examples
- Schema Design
- Video Tutorials
- AQL Reference
- AQL Examples
- AQL Overview
- AQL Feature Roadmap
- AQL Geospatial Guide
- AQL LLM Migration Guide
- AQL API
- AQL Grammar (EBNF)
- AQL Root Overview
- AQL Examples (root)
- API Reference
- API Module README
- OpenAPI Overview
- Client SDK Overview
- SDK Overview
- Operations
- Operations Overview
- Operations Runbook
- Operations Handbook
- ThemisCtl Admin Guide
- Pipeline E2E SOPs
- Deploy Overview
- Docker Overview
- Docker Hub README
- Helm Overview
- Packaging Overview
- Operator Overview
- Security Policy
- Production Hardening Checklist
- Security Hardening Guide
- Encryption Key Management
- Access Control Framework
- Zero Trust Policy
- API Authentication & Authorization
- HSM Production Setup
- PKCS11 Integration
- DSGVO / SOC2 Checklist
- Access Model Runbooks
- Access Model Dashboard
- Maturity Automation Runbook
- Access Review Automation
- Access Model Dashboard
- Access Model Runbooks
- Rights Revocation
- Dr Checklists
- Dr Testing
- Incident Response Playbook
- Incident Response Testing
- GPU Oom Recovery
- Grammar Debugging
- Metrics Scrape Troubleshooting
- Model Swap Procedure
- Quota Tuning
- Subagent Deployment
- Logging Configuration
- Content Model
- Crypto & Keys
- Feature Flags Reference
- Modular Architecture Roadmap
- Modularization Guide
- Module Architecture Index
- PostgreSQL Wire Protocol
- Query Scheduling
- Raft Consensus Design
- Resource Pooling
- Source Directory Guide
- Unified Access Model
- E1 001 Layered Retrieval Design
- E1 002 Ann Abstraction Strategy
- E1 003 Tensor Summary Types
- E1 004 Lora Package Distinction
- E1 005 Model Switch Compatibility
- E1 006 Federated Tensor Summaries
- E2 001 Evaluation Framework Design
- E2 002 Hardware Profile Strategy
- E2 003 Query Planner Routing Model
- E2 004 Approximation Governance Rules
- E2 005 Cross Layer Fallback Confidence Policy
- E3 001 Distributed Tensor Design
- E3 002 Manifest Coordination Strategy
- E3 003 Recovery And Erasure Choice
- E3 004 Tensor Fabric Infrastructure
- Contributing
- Contributing (root)
- Code of Conduct
- Support
- Maintainers
- CTest Guide
- Build Quick Reference
- Developer Wiki Index
- Build / Test / CI
- Module Index
- Branching Strategy
- Disabled Stub Policy
- Docs PR Policy
- GA Promotion Sign Off
- Github Milestones Setup
- Maturity Claim Verification Checklist
- Maturity Evidence Registry
- Merge Gate Bot Config
- Merge Gate Status Live
- Phase 1 Closure Report
- Phase Closure Policy
- Phase Dependency Graph
- Phase3 Enforcement Runbook
- Plugin Submodule Rollback
- PR Version Targeting
- PR Version Targeting Backfill
- Production Ready 2026 Delivery Plan
- Query Module Status
- Readme
- Release Promotion Gate Policy
- Release Validation Checklist
- Security Module 5671 Evidence Summary
- Sharding P6 Residual Risk Acceptance
- Sourcecode Compliance Governance
- Updates Development Status Sign Off
- Wave C Implementation Complete
- Blob Storage
- Cuda
- Ethics Ai
- Exporters
- Huggingface
- Image Analysis
- Importers
- RPC
- Scraper
- Themisdb Ai Watermark Detector
- User Storage Encrypted
- Chimera Architecture
- Chimera Future
- Chimera Readme
- Chimera Roadmap
- Covina Fastapi Ingestion Architecture
- Covina Fastapi Ingestion Future
- Covina Fastapi Ingestion Roadmap
- Vcc Base Architecture
- Vcc Base Future
- Vcc Base Roadmap
- Vcc Clara Ingestion Architecture
- Vcc Clara Ingestion Future
- Vcc Clara Ingestion Roadmap
- Vcc Veritas Architecture
- Vcc Veritas Future
- Vcc Veritas Roadmap
- 01 Hello World
- 02 Todo App
- 03 Contact Manager
- 04 Inventory System
- 05 Time Series Monitor
- 06 Graph Social Network
- 07 Vector Search Documents
- 08 Dms Erp System
- 09 Iot Sensor Network
- 10 Drone Image Analysis
- 11 Blog Wiki
- 12 Expense Tracker
- 13 Recipe Manager
- 14 Ecommerce Catalog
- 15 Event Management
- 16 Kanban Board
- 17 Crm
- 18 Realtime Chat
- 19 Recommendation Engine
- 20 Smart Home
- 21 Coding Platform
- 22 AQL Diagram Tool
- 23 Traveling Salesman
- 24 Moral Philosophy Debates
- API Versioning
- Distributed Sharding
- Feedback Plugins
- Geo
- Gnn
- Image Analysis
- Legal Lora Training
- LLM
- Lora Sync
- Migration
- Nlp
- Performance
- Railway
- Replication
- Rope Visualization
- Sample Product Config
- Security
- Client SDK Overview
- Quickstart
- Sdk Enhancements
- Sdk Implementation Summary
- Test Suite Readme
- Go
- Java
- Javascript
- Php
- Python
- Ruby
- Rust
- Typescript
- 01 Grundlegende Operationen
- 02 AQL Queries
- 03 Graph Daten
- 04 Multimodell Anwendung
- 01 Quickstart Guide
- 02 AQL Referenz Kurzuebersicht
- 03 Datenmodellierung Guide
- 04 Uebungsaufgaben
- 05 Best Practices Guide
- Training Documents
- Training Overview
- 01 Einfuehrung Und Uebersicht
- 02 Datenmodelle Und Architektur
- 03 AQL Abfragesprache
- 04 Installation Und Setup
- 05 Anwendungsbeispiele
- Training Presentations
- Dependencies Readme
- Processmonitor Readme
- Themis.admintools.shared Readme
- Themis.aqlquerybuilder Readme
- Themis.aqlquerybuilder Roadmap
- Themis.auditlogviewer Readme
- Themis.auditlogviewer Roadmap
- Themis.classificationdashboard Readme
- Themis.classificationdashboard Roadmap
- Themis.compliancereports Readme
- Themis.compliancereports Roadmap
- Themis.gisviewer.controlpanel Readme
- Themis.gisviewer.controlpanel Roadmap
- Themis.impactanalysisviewer Readme
- Themis.impactanalysisviewer Roadmap
- Themis.ingestiontool Readme
- Themis.ingestiontool Roadmap
- Themis.keyrotationdashboard Readme
- Themis.keyrotationdashboard Roadmap
- Themis.piimanager Readme
- Themis.piimanager Roadmap
- Themis.retentionmanager Readme
- Themis.retentionmanager Roadmap
- Themis.sagaverifier Readme
- Themis.sagaverifier Roadmap
- Themis.usbadmintool Readme
- Themis.usbadmintool Roadmap
- CI Readme
- CI Roadmap
- Compiler Diagnostics Readme
- Compiler Diagnostics Roadmap
- Completion Readme
- Copilot Ollama Router Readme
- Copilot Ollama Router Roadmap
- Gnn Readme
- Gnn Roadmap
- Rope Visualizer Readme
- Rope Visualizer Roadmap
- Tco Calculator Readme
- Tco Calculator Roadmap
- Tests Readme
- Tests Roadmap
- Themis Config Wx Readme
- Themis Docs Builder Readme
- Wikipedia Ingestion Readme