Skip to content

Hixon10/openjdk-mailing-lists-search

Repository files navigation

Search for OpenJDK mailing lists

This project allows you to search across several OpenJDK mailing lists.

The unique thing about this project is local search. When you open a search page, js-script downloads SQLite database with indexed mailing lists.

The bad thing is you need to download the whole search index. The good thing is you can execute arbitrary SQL queries on top of this db.

Currently indexed mailing lists:

How it works

  1. Periodically, github action runs an indexer. The indexer downloads new emails from an archive (e.g., The amber-dev Archives), and inserts them into a db-part-0*.
  2. When you open a search frontend, sql.js lib downloads database parts db-part-0*, and prepares the db, using WebAssembly.
  3. Finally, you can execute SQL queries locally without any server interaction.

Monitoring implementation details

  1. After reindexing, we check a new database size. If it differs from the old one, we write a new database size and current timestamp to dbsize.txt. It is implemented as one of actions steps.
  2. We have a Cloudflare Worker. It has Cron trigger, which executes this worker every few hours.
  3. The worker checks when the database was updated last time. If it happened more than 5 days ago, the worker sends an email.

Credits

  1. Gunnar Morling - How I Built a Serverless Search for My Blog for the idea of this project.
  2. https://github.com/sql-js/sql.js/ for a great library that allows the use of SQLite from a browser.
  3. https://github.com/ for free Actions for open-source projects.