From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id E191F1F4B4 for ; Tue, 15 Dec 2020 11:47:22 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH/RFC 0/7] lei - Local Email Interface skeleton Date: Tue, 15 Dec 2020 11:47:15 +0000 Message-Id: <20201215114722.27400-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: patches 1 and 2 are boring cleanups. The most important is 4/7 which features data structures for a proposed command set. Hopefully the command-names and 1-line descriptions are helpful. Comments from (potential) users appreciated, especially about 4/7. I decided to take care of patch 3/7 (FD-passing) early on because startup latency sucks. I never used notmuch, but this will feature saved searches (aka "named queries"). Otherwise, the query subcommand will probably operate like mairix and dump the results to a Maildir/mbox/etc... patch 5/7 - keywords (e.g. `seen', 'draft', ...) read/write (but not query) support added. And a couple more cleanups. lei will have its own writable git storage on top of extindex, but will be able to do read-only queries against extinbox (publicinbox || extindex) sources. Eric Wong (7): daemon: support --daemonize without Net::Server::Daemonize daemon: simplify fork() failure checks lei: FD-passing and IPC basics lei: proposed command-listing and options lei_store: local storage for Local Email Interface tests: more common JSON module loading lei: use spawn (vfork + execve) for lazy start MANIFEST | 6 + lib/PublicInbox/Daemon.pm | 26 +- lib/PublicInbox/ExtSearch.pm | 4 +- lib/PublicInbox/ExtSearchIdx.pm | 35 ++- lib/PublicInbox/Import.pm | 4 + lib/PublicInbox/LeiDaemon.pm | 449 ++++++++++++++++++++++++++++++ lib/PublicInbox/LeiSearch.pm | 40 +++ lib/PublicInbox/LeiStore.pm | 197 +++++++++++++ lib/PublicInbox/ManifestJsGz.pm | 2 +- lib/PublicInbox/OverIdx.pm | 10 + lib/PublicInbox/SearchIdx.pm | 47 +++- lib/PublicInbox/SearchIdxShard.pm | 33 +++ lib/PublicInbox/TestCommon.pm | 4 + lib/PublicInbox/V2Writable.pm | 2 +- script/lei | 64 +++++ t/extsearch.t | 3 +- t/lei.t | 79 ++++++ t/lei_store.t | 74 +++++ t/www_listing.t | 8 +- 19 files changed, 1055 insertions(+), 32 deletions(-) create mode 100644 lib/PublicInbox/LeiDaemon.pm create mode 100644 lib/PublicInbox/LeiSearch.pm create mode 100644 lib/PublicInbox/LeiStore.pm create mode 100755 script/lei create mode 100644 t/lei.t create mode 100644 t/lei_store.t