43 Commits
Author SHA1 Message Date
MrAlders0n 7d759d0a0f perf: known_routes retention, digest identity, and a working batched reconfirm (#98)
* fix: cascade channel_messages on packet delete

* rebuild known_routes keyed on (iata, path_key)

* add route retention delete, batch reconfirm, path_key upsert

* compute route path_key in store, add DeleteOldRoutes

* add routes retention config

* wire route retention into cleanup, batch reconfirm

* prune routes in reconfirm task, not cleanup

* expand routes retention docs in example config
2026-08-12 09:30:03 -04:00
MrAlders0n c6d23a2b52 fix: cascade channel_messages on packet delete 2026-08-11 12:59:10 -07:00
Enot (ded) Skelly b44cae89d7 add neighbor message parsing
closes #94
2026-07-30 13:19:18 -07:00
Enot (ded) Skelly d8371f04d0 feat: split top adverts into flood/direct
closes: #90
2026-07-24 13:49:40 -07:00
Enot (ded) Skelly 3f2506fc8b feat: add geojson for iatas
closes #66
2026-07-24 12:59:48 -07:00
MrAlders0n cbde3d02da perf(stats): matview-back top talkers and advertisers 2026-07-24 12:07:05 -07:00
MrAlders0n bc3a375816 perf(stats): bucket payload & observer matviews by hour for windowed queries
The payload-breakdown and top-observers matviews stored a single 7-day
total per group, so the 24h/7d/30d selector did nothing: payload ignored
the window entirely (the store discarded `since`) and top-observers only
varied which rows cleared the last_heard cutoff, never the counts.

Bucket both views by hour over a 30-day horizon and sum the buckets in
range, mirroring mv_hourly_iata_stats. The stats endpoints now honour the
requested window while still reading a small precomputed table.
2026-07-24 12:07:05 -07:00
MrAlders0n b93ce7aba6 serve top observers from a matview instead of scanning per request 2026-07-24 12:07:05 -07:00
MrAlders0n d8ff7d0542 track payload_type on observations and serve the breakdown from a matview 2026-07-24 12:07:05 -07:00
MrAlders0n 63c0b9779d perf(routes): index known_routes(last_seen)
The routes list orders by last_seen with no index, so every page
seq-scanned and sorted ~150k rows. Same fix as the packets list got
in 008.
2026-07-24 12:07:05 -07:00
MrAlders0n 42edcdeb7b perf(scopes): stop cross-joining packets in scope stats
GetScopeStats left-joined packets, observer_scopes and nodes at once,
multiplying rows into the millions before COUNT(DISTINCT) deduped them
(~10s per call). Count each table on its own and index packets(scope_id).
2026-07-24 12:07:05 -07:00
MrAlders0n a84112f7fb fix(traces): review fixes for trace_iatas
Refresh last_heard on duplicate observations too, capped at hourly, so
steady traffic can't age a trace out of the filter (dedup key has no
heard_at). Drop the unused last_heard index column so upserts stay HOT,
and share one retention cutoff across the cleanup deletes.
2026-07-24 12:07:05 -07:00
MrAlders0n 457747b353 perf(traces): track trace activity per IATA in its own table
The trace list joined every trace packet to ~50M observations to apply
the IATA filter; the parallel hash join overran docker's 64MB /dev/shm
and the filtered list errored. Keep a small trace_iatas table at ingest
(like channel_iatas) and group packets by tag instead. Filtered stats
are now per tag rather than per matching packet.
2026-07-24 12:07:05 -07:00
MrAlders0n ba0e85c44e fix(channels): review fixes for channel_iatas
Refresh last_heard on duplicate observations too, capped at hourly, so
steady traffic can't age a channel out of the filter while its packets
stay retained (dedup key has no heard_at). Guard the seed join against
the docker /dev/shm cap like the trace one, and drop the unused
last_heard index column so the upserts stay HOT.
2026-07-24 12:07:05 -07:00
MrAlders0n dff9c6cf00 perf(channels): track channel activity per IATA in its own table
The IATA filter ran a correlated EXISTS over packets/observations with
ILIKE, which skipped the iata index and took ~7s live. Keep a small
channel_iatas table at ingest (like node_iatas) and filter against it.
Also honor the iatas= param so multi-site regions stop getting the
global list. Filter now ages out with packet retention rather than
matching any retained packet.
2026-07-24 12:07:05 -07:00
Enot (ded) Skelly 8e2798612b feat: add clock drift tracking
closes #71
2026-07-23 13:34:41 -07:00
Enot (ded) Skelly ac67308f21 fix: dont log empty status from observers
closes #79
2026-07-23 08:43:26 -07:00
MrAlders0n b8665ebd66 perf(db): index packets(last_heard_at)
The packet list sorts by last_heard_at, so every page was a seq scan
plus sort over all packets. Cheap to maintain now that presence writes
are coalesced.
2026-07-20 09:07:05 -07:00
Enot (ded) Skelly 420a43172b fix(ingest): dedupe unknown channel hashes 2026-07-02 08:08:54 -07:00
Enot (ded) Skelly 25316a3474 fix(observations): drop heardAt from packet_observation unique constraint
this was causing duplicates and each obersver heard a given
packet hash or it didn't, there are not more observations of
the same hash from one observer
2026-06-24 08:04:04 -07:00
Enot (ded) Skelly 7b39160ff5 feat(neighbors): add optional snr column 2026-06-16 12:54:31 -07:00
Enot (ded) Skelly 8b7bc21b28 fix(neighbors): don't record neighbors that are not room or repeater 2026-06-12 09:51:06 -07:00
Enot (ded) Skelly 5315af205c feat(traces): embed max-hop observation path and SNR in list response 2026-06-11 15:45:08 -07:00
Enot (ded) Skelly c3bf6d7e0d feat: add auto db migration in binary 2026-06-11 15:39:07 -07:00
Enot (ded) Skelly 880536905f chore(migrations): rename drop single hope route migration to be clear 2026-06-11 15:06:01 -07:00
Enot (ded) Skelly 73fa0be858 fix(routes): don't store single hop routes
migration to remove old single hop routes included
2026-06-11 14:09:10 -07:00
Enot (ded) Skelly 14cb9e6e2d docs: add APGL3 license 2026-06-08 15:46:01 -07:00
Enot (ded) Skelly 68c254ce04 feat: add observation count to routes 2026-06-08 10:59:46 -07:00
Enot (ded) Skelly 7d25b8480f feat: node neighbors
limited to repeaters and room servers

stores high confidence matches from the nodes advert
packet path first hops
2026-06-08 09:36:20 -07:00
Enot (ded) Skelly 65cb8c9d61 add routes api
any route observer where all hops are high confidence
are now stored and available at /routes

you can also search for a src dest route and it will
return any recored route subset that can link the src
and dest hash
2026-06-05 15:57:08 -07:00
Enot (ded) Skelly f0c57fde45 add traces endpoint 2026-06-05 15:20:53 -07:00
Enot (ded) Skelly a943660778 rename to beacon 2026-06-05 08:10:43 -07:00
Enot (ded) Skelly fcc7bb1b23 add transport scopes
new config for transport scope keys seeded to db

new transport keystore to lookup matching keys and tag
- packets with scope key
- nodes with default scope
- observers with all supported scopes it forwards

allow filtering by region scope key on: packets, nodes, observers
2026-06-04 10:32:03 -07:00
Enot (ded) Skelly 8c71277de8 add radio-presets stats 2026-06-03 13:56:31 -07:00
Enot (ded) Skelly 49558c6dd0 add radio preset view
move refresh for materialized views into helper and call at boot
2026-06-03 13:46:44 -07:00
Enot (ded) Skelly 8addb401cc feat: add radio params to node summaries
observers and nodes now include Radio which is in the
format FreqMhz,BWKhz,SF (910.525,63.5,7)
2026-06-01 14:54:01 -07:00
Enot (ded) Skelly cb39913e40 fix: packet observation count
uses actual rows for packet observations for count, no
more counter
2026-06-01 10:20:14 -07:00
Enot (ded) Skelly ea582b6513 fix: materialized view for stats
missing unique index
2026-06-01 09:24:43 -07:00
Enot (ded) Skelly 0e82f8adbf api: packet: split header and payload 2026-05-29 12:16:23 -07:00
Enot (ded) Skelly 71f5cbae3b add stats api 2026-05-28 13:07:22 -07:00
Enot (ded) Skelly 5321151f7e fix hash only channel issue
the db was adding rows for any observation of a hash
without a known key
2026-05-26 10:53:49 -07:00
Enot (ded) Skelly 94786f9632 improve channel storage
changes channel storage to include the full key and a hashtag if isHashtag

this prevents some collision issues and will improve message lookup accuracy as well
as allow message search by hashtag channel, name or single byte hash in future
2026-05-23 09:31:15 -07:00
Enot (ded) Skelly 84df3949d1 init 2026-05-20 11:40:04 -07:00