- Handle login send failure in AprsIsConnection instead of crashing - Close leaked sockets on login failure in Aprsme.Is (init + reconnect) - Keep rescheduling keepalive timer when disconnected to prevent permanent loss - Use supervised BroadcastTaskSupervisor instead of unsupervised Task.start for packet broadcasting - Remove racy Process.alive? check in StreamingPacketsPubSub; send/2 to dead PIDs is a no-op, :DOWN monitors handle cleanup - Add dateline wrapping to SpatialPubSub.point_in_bounds? matching StreamingPacketsPubSub behavior - Add bad_packets table cleanup to PacketCleanupWorker - Add TODO.md with remaining improvements
3.1 KiB
3.1 KiB
TODO
APRS-IS Connection
- Consolidate
AprsIsConnectionandAprsme.Isinto a single implementation — two separate APRS-IS clients with different reconnection strategies and error handling is a maintenance burden - Validate APRS-IS server login response — neither implementation checks if the server accepted the login (wrong credentials or invalid filter syntax goes undetected)
- Add APRS-IS login response validation — server sends
# logrespline indicating accept/reject - Cap circuit breaker half-open recovery — transition from
:opento:half_openis passive (only happens on call), not automatic
Packet Intake Pipeline
- Add retry logic for batch insert failures in
PacketConsumer.process_chunk/1— whenRepo.insert_allfails, packets are lost from real-time broadcast with no retry - Improve
PacketProducerbuffer drop logging —length(new_buffer)is O(n), no count of dropped packets, no telemetry emitted - Add backpressure mechanism — no global rate limiting if APRS-IS sends burst traffic; only defense is fixed-size buffer with silent drops
- Cluster packet distribution race —
PacketDistributor.distribute_packet/1only broadcasts if currently leader; leadership change between receipt and broadcast drops packets
Front-End Display
- Audit PopupComponent for XSS — verify HEEx auto-escaping covers
@commentand weather data fields from APRS packets (popup_component.ex) - Simplify coordinate extraction in
packets_live/index.html.heex:65-134— deeply nested conditional logic with multiple fallback chains - Fix memory leak in InfoMap hook —
setTimeoutatinfo_map.js:110reference never stored or canceled indestroyed() - Fix Leaflet bundle loading race —
app.js:67-97has two paths modifyingwindow.mapBundleLoadedwithout singleton pattern - Add loading indicator for real-time bounds updates — only
@historical_loadingtriggers spinner, not bounds filtering - Fix stale generation check bypass in
historical_loader.ex:100-108— nil generation skips stale check - Consolidate coordinate/bounds validation —
valid_coordinates?,within_bounds?,get_coordinatesduplicated acrosscoordinate_utils.ex,bounds_utils.ex,map_helpers.ex - Extract hard-coded zoom threshold (8) for heat map to a constant — duplicated in
display_manager.ex:17,33
Packet Purging
- Consider shorter default retention for APRS data — 365 days is very long for ephemeral APRS packets; most use cases need hours-to-days
- Run cleanup more frequently when backlog exists — 6-hour cycle with 5-minute time limit means large backlogs take days to clear
- Add cleanup telemetry — worker logs but doesn't emit telemetry events for monitoring dashboards
- Add partial index for cleanup queries —
WHERE received_at < cutoffscans full B-tree; a partial index on old packets would be smaller and faster - ETS PacketStore TTL mismatch — 2-hour TTL means expired packets get re-fetched from DB (still within 365-day retention), causing repeated queries