Add WasmDB support and enhance query/cache/policy systems
Introduced WasmDB as a new IndexedDB backend for WebAssembly environments, replicating Badger's schema for compatibility. Enhanced the query caching system with optional configuration to improve memory usage efficiency. Improved the policy system with new permissive overrides and clarified read vs write applicability for better flexibility.
- `github.com/gorilla/websocket` - WebSocket server
- `github.com/gorilla/websocket` - WebSocket server
- `github.com/minio/sha256-simd` - SIMD SHA256
- `github.com/minio/sha256-simd` - SIMD SHA256
- `github.com/templexxx/xhex` - SIMD hex encoding
- `github.com/templexxx/xhex` - SIMD hex encoding
@ -686,8 +713,8 @@ Each level has these printer types:
## Performance Considerations
## Performance Considerations
- **Query Cache**: 512MB query result cache (configurable via `ORLY_QUERY_CACHE_SIZE_MB`) with zstd level 9 compression reduces database load for repeated queries
- **Query Cache**: Optional 512MB query result cache (disabled by default via `ORLY_QUERY_CACHE_DISABLED=true`) with zstd level 9 compression reduces database load for repeated queries; enable with `ORLY_QUERY_CACHE_DISABLED=false`
- **Filter Normalization**: Filters are normalized before cache lookup, so identical queries with different field ordering produce cache hits
- **Filter Normalization**: When query cache is enabled, filters are normalized before cache lookup, so identical queries with different field ordering produce cache hits
- **Database Caching**: Tune `ORLY_DB_BLOCK_CACHE_MB` and `ORLY_DB_INDEX_CACHE_MB` for workload (Badger backend only)
- **Database Caching**: Tune `ORLY_DB_BLOCK_CACHE_MB` and `ORLY_DB_INDEX_CACHE_MB` for workload (Badger backend only)
- **Query Optimization**: Add indexes for common filter patterns; multiple specialized query builders optimize different filter combinations
- **Query Optimization**: Add indexes for common filter patterns; multiple specialized query builders optimize different filter combinations
- **Batch Operations**: ID lookups and event fetching use batch operations via `GetSerialsByIds` and `FetchEventsBySerials`
- **Batch Operations**: ID lookups and event fetching use batch operations via `GetSerialsByIds` and `FetchEventsBySerials`
@ -699,8 +726,9 @@ Each level has these printer types:
ORLY has received several significant performance improvements in recent updates:
ORLY has received several significant performance improvements in recent updates:
### Query Cache System (Latest)
### Query Cache System
- 512MB query result cache with zstd level 9 compression
- Optional 512MB query result cache with zstd level 9 compression (disabled by default to reduce memory usage)
- Enable with `ORLY_QUERY_CACHE_DISABLED=false`
- Filter normalization ensures cache hits regardless of filter field ordering
- Filter normalization ensures cache hits regardless of filter field ordering
- Configurable size (`ORLY_QUERY_CACHE_SIZE_MB`) and TTL (`ORLY_QUERY_CACHE_MAX_AGE`)
- Configurable size (`ORLY_QUERY_CACHE_SIZE_MB`) and TTL (`ORLY_QUERY_CACHE_MAX_AGE`)
- Dramatically reduces database load for repeated queries (common in Nostr clients)
- Dramatically reduces database load for repeated queries (common in Nostr clients)
@ -771,7 +799,7 @@ Files modified:
3. GitHub Actions workflow builds binaries for multiple platforms
3. GitHub Actions workflow builds binaries for multiple platforms
4. Release created automatically with binaries and checksums
4. Release created automatically with binaries and checksums
## Recent Features (v0.31.x)
## Recent Features (v0.34.x)
### Directory Spider
### Directory Spider
The directory spider (`pkg/spider/directory.go`) automatically discovers and syncs metadata from other relays:
The directory spider (`pkg/spider/directory.go`) automatically discovers and syncs metadata from other relays:
@ -789,11 +817,21 @@ The Neo4j backend (`pkg/neo4j/`) includes Web of Trust (WoT) extensions:
- **WoT Schema**: See `pkg/neo4j/WOT_SPEC.md` for full specification
- **WoT Schema**: See `pkg/neo4j/WOT_SPEC.md` for full specification
- **Schema Modifications**: See `pkg/neo4j/MODIFYING_SCHEMA.md` for how to update
- **Schema Modifications**: See `pkg/neo4j/MODIFYING_SCHEMA.md` for how to update