<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Posts on Precomputing.com</title>
    <link>https://precomputing.com/posts/</link>
    <description>Recent content in Posts on Precomputing.com</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 29 Sep 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://precomputing.com/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Introduction</title>
      <link>https://precomputing.com/introduction/</link>
      <pubDate>Fri, 25 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://precomputing.com/introduction/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Answers ready before you ask: one small language keeps counts, percentiles, candles, invoices and log dashboards current in a SQLite file as the data arrives.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Precomputing is a project to make answers cheap. A short policy names the streams of events you have and the answers you want ready, and says how long each level of detail should live. From then on every event updates those answers the moment it arrives, so a question becomes a lookup, and old detail fades on the schedule you set.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How It Works</title>
      <link>https://precomputing.com/how-it-works/</link>
      <pubDate>Fri, 25 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://precomputing.com/how-it-works/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;The idea.&lt;/strong&gt; Decide the questions first. Keep their answers current as each event arrives, in one SQLite file, and let raw detail fade on a schedule while unusual events stay whole.&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;before-and-after&#34;&gt;Before and After&lt;/h2&gt;&#xA;&lt;p&gt;Today a system that collects events usually keeps all of them and computes each answer when someone asks. A dashboard scans the last hour on every refresh. An invoice adds up a month of requests at the month&amp;rsquo;s end. Precomputing moves the work to the moment each event arrives:&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Policy Language</title>
      <link>https://precomputing.com/the-policy-language/</link>
      <pubDate>Fri, 25 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://precomputing.com/the-policy-language/</guid>
      <description>&lt;p&gt;&lt;strong&gt;A policy is a short text file. It names the streams of events you have and the answers to keep ready, and says how long each level of detail survives.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The compiler turns it into plain SQLite, and the Engine runs it as it is. This post walks through a policy line by line, and shows what each line becomes in the file.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://precomputing.com/images/policy-anatomy.png&#34; alt=&#34;A policy&amp;rsquo;s lines and the tables they become. raw keep 5m becomes latency_raw, whole events. Each rollup becomes rows of latency_win, one summary per window and key, and quantiles ms adds the sketch buckets in latency_ms_sk. samples becomes latency_sample, anomalies becomes latency_anomaly and latency_base, and each precompute becomes a view with its own name.&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>API Latency Case Study: A Million Requests Kept as Ready Answers Inside SQLite</title>
      <link>https://precomputing.com/api-latency-case-study-a-million-requests-kept-as-ready-answers-inside-sqlite/</link>
      <pubDate>Tue, 29 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://precomputing.com/api-latency-case-study-a-million-requests-kept-as-ready-answers-inside-sqlite/</guid>
      <description>&lt;p&gt;A small web service that already keeps its data in SQLite wants the usual answers about its API: how many requests each endpoint gets, how long they take on average, and the p99. The simple way is a table with a row per request, scanned whenever someone looks. In the SQL demo the service keeps a compiled Precomputing policy in the same SQLite instead, and the answers stay current on every insert.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Market Data Case Study: Four Million Trades Turned Into Candles, Checked After a Pulled Plug</title>
      <link>https://precomputing.com/market-data-case-study-four-million-trades-turned-into-candles-checked-after-a-pulled-plug/</link>
      <pubDate>Mon, 28 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://precomputing.com/market-data-case-study-four-million-trades-turned-into-candles-checked-after-a-pulled-plug/</guid>
      <description>&lt;p&gt;A stock chart is made of candles: for each minute, the first price, the highest, the lowest and the last, with the volume traded. A candle is a window summary, the same kind of summary Precomputing keeps for API latency, only in a field every investor knows. In the Engine demo a trading day of stock trades goes through the Engine, which keeps 1-second, 1-minute and 1-hour candles and a quote board ready in its SQLite file, and writes the file five times a second.&lt;/p&gt;</description>
    </item>
    <item>
      <title>AI Usage Billing Case Study: A Month of Invoices That Match a Recount to the Billionth of a Dollar</title>
      <link>https://precomputing.com/ai-usage-billing-case-study-a-month-of-invoices-that-match-a-recount-to-the-billionth-of-a-dollar/</link>
      <pubDate>Sun, 27 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://precomputing.com/ai-usage-billing-case-study-a-month-of-invoices-that-match-a-recount-to-the-billionth-of-a-dollar/</guid>
      <description>&lt;p&gt;An AI product that bills by the token has to count every request exactly once, even when the network does not cooperate. Clients retry, and a retry can arrive through a different gateway. A gateway that loses its link holds its reports and sends them hours later. A queue can stick at the end of the month, after the invoices are out. In the Meter demo the product&amp;rsquo;s gateways report every request to one meter, a compiled Precomputing policy inside SQLite, and the invoices are one SQL view over totals the meter keeps ready.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Web Shop Logs Case Study: A Dashboard Sent Upstream in 120 Times Fewer Bytes</title>
      <link>https://precomputing.com/web-shop-logs-case-study-a-dashboard-sent-upstream-in-120-times-fewer-bytes/</link>
      <pubDate>Sat, 26 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://precomputing.com/web-shop-logs-case-study-a-dashboard-sent-upstream-in-120-times-fewer-bytes/</guid>
      <description>&lt;p&gt;A web shop sends its logs to a log platform so a dashboard can show requests, latency, errors, payments and revenue, and so someone can search the lines when things go wrong. The platform charges by the gigabyte ingested and by the million lines indexed, and many of those lines are never read. In the Logs demo a log reducer sits next to the shop&amp;rsquo;s services. It learns each kind of line as it arrives, keeps every line on site for 48 hours, and sends upstream only the answers the dashboard shows, the errors and anything new.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Inside the Engine: Same Answers, 12 to 17 Times Faster</title>
      <link>https://precomputing.com/inside-the-engine-same-answers-12-to-17-times-faster/</link>
      <pubDate>Fri, 25 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://precomputing.com/inside-the-engine-same-answers-12-to-17-times-faster/</guid>
      <description>&lt;p&gt;The SQL runtime does all its work inside SQLite: every insert runs a trigger that updates every summary, sketch and answer the policy asks for. That is simple and it runs anywhere, but a trigger pays SQLite&amp;rsquo;s price for each small update. The Engine runs the same policy in Go, keeps the recent work in memory and writes what changed to the same SQLite file in one transaction at every checkpoint. Its answers are the same, to the last bit, and on Demo 2&amp;rsquo;s trades it is 12 to 17 times faster.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Next Applications: Eight Places Where Answers Kept Ready Could Fit</title>
      <link>https://precomputing.com/next-applications-eight-places-where-answers-kept-ready-could-fit/</link>
      <pubDate>Fri, 25 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://precomputing.com/next-applications-eight-places-where-answers-kept-ready-could-fit/</guid>
      <description>&lt;p&gt;The four case studies share one pattern. The questions are known in advance and the events arrive as a stream, so the answers can be kept current as each event lands, while raw detail stays only as long as it is useful. API monitoring, market data, usage billing and logs came first because the demos cover them.&lt;/p&gt;&#xA;&lt;p&gt;The pattern turns up in many more places. None of the eight below has been tested, and none runs Precomputing today. This post sets out what each would ask of the platform, and which parts already carry over from the demos. It is a map for choosing pilots, ideally together with the people who run these systems.&lt;/p&gt;</description>
    </item>
    <item>
      <title>One File: The SQLite Layout Both Runtimes Write</title>
      <link>https://precomputing.com/one-file-the-sqlite-layout-both-runtimes-write/</link>
      <pubDate>Fri, 25 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://precomputing.com/one-file-the-sqlite-layout-both-runtimes-write/</guid>
      <description>&lt;p&gt;A Precomputing file is an ordinary SQLite file. Any SQLite tool opens it, the same SQL works on it whichever runtime wrote it, and it carries its own policy, so a reader never has to guess what is inside. This post walks through the layout for one stream.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-is-in-the-file&#34;&gt;What Is in the File&lt;/h2&gt;&#xA;&lt;p&gt;For Demo 1&amp;rsquo;s stream, &lt;code&gt;latency&lt;/code&gt;, with the key &lt;code&gt;endpoint&lt;/code&gt; and the value &lt;code&gt;ms&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://precomputing.com/images/file-layout.png&#34; alt=&#34;The file for the latency stream. You insert into the view latency and read the answer views requests, avg_ms and p99_ms. Behind them sit latency_raw with whole events, latency_win with one summary per window and key, latency_ms_sk with sketch buckets, latency_sample, latency_anomaly and latency_base, the state tables behind the answers, and three tables that describe the file: _precomputing with the policy, _precomputing_objects and, when the Engine writes, _precomputing_sources.&#34;&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
