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-ASN: X-Spam-Status: No, score=-4.1 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF 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 7E6A21F601 for ; Sat, 10 Dec 2022 01:55:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1670637318; bh=+iA0UGMt4WKuWYyeP7stawKBkUz4WaJbqOvydWtb8kk=; h=From:To:Subject:Date:From; b=BwktnWR+cLsUbh1XqlZsVAtv/SGAjT0wtZ20XFNF5dGlNS9m/XDwfRGPy2Uykpgof cgDXDwlkNHeIuQjFq/AgYeD+OHK4xytu4Ja+Tr76wYDSC640DSvXHqFSddP7IfywCH ly6JrWTrFauSgdWYHV5kgLdXOsmF0vH1uYKT8GJ8= From: Eric Wong To: mwrap-perl@80x24.org Subject: [PATCH 0/3] C-only HTTP Unix socket server + PSGI TCP reverse proxy Date: Sat, 10 Dec 2022 01:55:15 +0000 Message-Id: <20221210015518.272576-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: The PSGI requirement meant forcing Perl linkage into every program; and potentially tying up the Perl interpreter while generating HTML output. Having a dedicated thread running a C-only HTTP Unix server means: 1) non-Perl processes spawned by the Perl process can be inspected 2) Perl processes won't be blocked while generating HTML responses Note: I don't recommend embedding the PSGI reverse proxy into existing async Perl PSGI servers. It's fairly expensive since it's not async-aware; so it should be a dedicated process. Eric Wong (3): move mwrap_reset to core tests: hoist out test_common.perl C-only HTTP Unix socket server + PSGI TCP reverse proxy .gitignore | 1 + MANIFEST | 8 + Makefile.PL | 10 +- Mwrap.xs | 43 +- lib/Devel/Mwrap/Rproxy.pm | 78 +++ mwrap_core.h | 100 +++- mwrap_httpd.h | 1119 +++++++++++++++++++++++++++++++++++++ mymalloc.h | 10 + picohttpparser.h | 92 +++ picohttpparser_c.h | 670 ++++++++++++++++++++++ script/mwrap-rproxy | 29 + t/httpd-unit.t | 98 ++++ t/mwrap-httpd.t | 129 +++++ t/mwrap.t | 47 +- t/test_common.perl | 48 ++ 15 files changed, 2394 insertions(+), 88 deletions(-) create mode 100644 lib/Devel/Mwrap/Rproxy.pm create mode 100644 mwrap_httpd.h create mode 100644 picohttpparser.h create mode 100644 picohttpparser_c.h create mode 100644 script/mwrap-rproxy create mode 100644 t/httpd-unit.t create mode 100644 t/mwrap-httpd.t create mode 100644 t/test_common.perl