Repository navigation
Faster telemetry writes and statistics, one upstream send path, shared nginx config - #520
Merged
Merged
Conversation
AddGarageStackData and AddDemoServices listed the same ten repositories and the upstream clients; demo mode swaps only the vehicle, telemetry and trip ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6DtW2eHhipteRopmy3cif
…ld time The frontend and all-in-one nginx configs repeated every location; both now set their own $api_upstream and include frontend/nginx-app.conf. The build writes a .gz beside every compressible file at the highest level (scripts/precompress.mjs) and gzip_static serves it, instead of nginx compressing each response at level 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6DtW2eHhipteRopmy3cif
…a slow-down Every outside-service client waited out its interval, marked the request sent, sent it, checked the status for 429/503/504 and opened the backoff, in that order, by hand. UpstreamRateGate.SendAsync does those steps and hands back the response with the backoff it opened, if any; each client keeps its own answer to being refused (null, a sentinel, or an exception). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6DtW2eHhipteRopmy3cif
… first Every MQTT message of a poll after the first is merged into the poll's row, and each one read the whole row (some eighty columns) before updating it. The patch now goes onto a key-only stand-in, so EF sends one UPDATE of just the fields the message carried. A row that has gone takes the patch as a new row, as before. Checked against PostgreSQL: one UPDATE and the pg_notify per message, where there was a SELECT too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6DtW2eHhipteRopmy3cif
GetDailyStatsAsync streamed every reading of the period on every request: hundreds of thousands of rows for a year, up to ten years. A finished day cannot change (rows are stamped when they arrive), so each one is cached per vehicle and time zone, and only the span from the first day the cache lacks to the last is read. A day counts as finished an hour after its local midnight, past the merge window that can fold a message just after midnight into a row stamped before it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6DtW2eHhipteRopmy3cif
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Summary
The second batch (P2) from the project review; the first was #519.
UPDATEof just the fields the message carried. Checked against a real PostgreSQL: oneUPDATEplus thepg_notifyper message, where there was aSELECTtoo; a row that has gone still takes the patch as a new row. Buffering a whole poll in memory was considered and left out: the Worker's own checks read the row right after the write, and a crash would lose up to the merge window.UpstreamRateGate.SendAsyncwaits out the interval, sends, and reads the answer for a slow-down; the five outside-service clients no longer repeat those steps by hand, and each keeps its own answer to being refused.frontend/nginx-app.conf) and only set their own$api_upstream. The build writes a.gzbeside every compressible file at the highest level (scripts/precompress.mjs) andgzip_staticserves it, instead of nginx compressing each response at level 1.Measured and left out: precompiling the vue-i18n messages saved under 1 KB gzipped on the entry bundle, not worth the new build dependency.
Type of Change
Related Issues
Follows #519.
Checklist
pnpm lint/dotnet build), plusdotnet format --verify-no-changes, 1432 backend and 1130 frontend testsunraid/garagestack.xmlchanged: not changedAlso checked locally: both nginx configs pass
nginx -t, and the frontend config, serving the real build, sends the prebuilt.gzbyte for byte withVary, the security headers and the cache headers. The Docker images and the Playwright smoke tests were not built or run locally (no Docker); CI covers them.Generated by Claude Code