Notes/Aftermarket

Aftermarket Adds AfterBridge to Serve Old CSV Exports and SQLite Files as a JSON API

Aftermarket 0.9.0 adds AfterBridge, for apps that only hand their data over as files. A nightly CSV export in a folder, or a SQLite database nobody else is meant to open, becomes a read-only JSON API: lists with paging and exact-match filters, single rows by key, typed columns, and the columns you name left out.

Each source is read into a snapshot in memory and read again when its file changes, but only once the file has been left alone for a couple of seconds and is complete. In the case study, an export written in two pieces and one with a word in a price column both stay out, and the last good day keeps being served. Nothing a request sends reaches SQL or the files.

Writing the tests found two real gaps before review: a paused writer could get half a file served, and Go’s CSV reader skips blank lines, which loses rows. The independent review then found a cut-off .sql dump served as whole, a future file date hanging startup, and mangled non-UTF-8 text; all fixed. The suite now has 530 tests. Binaries are out for Linux, macOS and Windows. The previous note covers AfterSchema.