mirror of
https://github.com/dpup/meshstream.git
synced 2026-08-07 17:22:54 +02:00
feat(cache): priority-based eviction with age protection and Bélády approximation
Replace the flat circular buffer with NodeAwareCache, a smarter eviction strategy for historical mesh packet data: - Packets younger than 1 hour are never evicted (recent traffic preserved) - Under pressure, evict from the lowest-priority type first (neighbor-info outlasts node-info; chat messages outlast everything) - Within a priority tier, evict from the most recently active source node — that node will resend soonest, so its old packet is cheapest to lose (Bélády approximation; protects flaky/distant node history) - Node retention window still applies: silent nodes' packets are excluded from GetAll and pruned proactively before priority eviction runs Also: - Add --cache-retention flag (default 3h) and raise --cache-size default to 5000 - Fix decoder error strings (replace verbose Go errors with short codes) - Add HTTP security headers middleware to server - Fix broker dispatchLoop deadlock on source channel close - Fix make gen-proto scanning web/node_modules for .proto files - Fix tools target always reinstalling protoc-gen-go (handles stale arch binary) - Move server port from 8080 to 5446; update Dockerfile, docker-compose, moat.yaml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -16,7 +16,7 @@ MESHSTREAM_SITE_DESCRIPTION=Development instance - Meshtastic activity in Bay Ar
|
||||
|
||||
# For local development, point to local server
|
||||
# (empty for production where API is on same domain)
|
||||
MESHSTREAM_API_BASE_URL=http://localhost:8080
|
||||
MESHSTREAM_API_BASE_URL=http://localhost:5446
|
||||
|
||||
# Google Maps API configuration - required for maps to work
|
||||
# Get keys at: https://developers.google.com/maps/documentation/javascript/get-api-key
|
||||
@@ -36,7 +36,7 @@ MESHSTREAM_MQTT_TOPIC_PREFIX=msh/US/bayarea
|
||||
|
||||
# Server configuration
|
||||
MESHSTREAM_SERVER_HOST=0.0.0.0 # Listen on all interfaces
|
||||
MESHSTREAM_SERVER_PORT=8080 # Standard web port
|
||||
MESHSTREAM_SERVER_PORT=5446 # Standard web port
|
||||
MESHSTREAM_STATIC_DIR=/app/static
|
||||
|
||||
# Logging and debugging
|
||||
|
||||
Reference in New Issue
Block a user