Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118429 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 90647 invoked from network); 14 Aug 2022 10:26:54 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Aug 2022 10:26:54 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C4AE9180506 for ; Sun, 14 Aug 2022 05:29:41 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 14 Aug 2022 05:29:41 -0700 (PDT) Received: by mail-ed1-f54.google.com with SMTP id z20so6543130edb.9 for ; Sun, 14 Aug 2022 05:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc; bh=/WMJefQaUEOpUimkHbqqmSnYgy0aqHjIgGoMJhZbSis=; b=CPmGqVGkLf7GQCpckPgHDyeBY8EgpZvLJ0bEgC+9e+q6/tLayNt9d0Cnx0owMniZQw ZHlRVYWnMmcqcaUhOj9CcXCdlRsOVx6DhteXxdeyRR6p4TcPQJ5XQtqbZcMH6ziMjpYd qJX39BO/jDULbG4JG+xWsLU5z0WIZbPm+TvYcOdBXPqg9alozZ8bqIark8y1bM/5BvFw 51rMSaN25lTXGeVax6OClzMR1f3lhX270MKLsh8y1N8dzBt2IVS4JlIbOH3yZ3DgmmmG TTA7BFCpFyexUEIp1gHKnZT1YTg3VG6VYxCv2eaxENUvkDdF2gAk0RtDihfcEY3f0Zq8 KOCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc; bh=/WMJefQaUEOpUimkHbqqmSnYgy0aqHjIgGoMJhZbSis=; b=pqNO5foBKJezaxcXmh2CF7gf8qQxBjRSXkuZ7DWbUwSHRR8rEmithmiSuJyTdkhU0C gA3sTQ1H+FyESbAIcxICqshC2dHYmKIwcWI82cX2C4Uz2wLmlfvOKtmk9LdVK+PxXuz3 C8EK3n9/RIap+tpigG9LiTZxgLDQxycZmC+T+oj98m1pxDyTaIfjptHjtFKOr15mI8mc eLqvT+BCGUN8gOr6gGKCOQP+Ewml+l/Pl9mauDiVUsza4ri7NABiEQxN5jneUvFcp4UU DwhE0m1EfT+vXUDFWOdAK/M1x1v5k6CKVpfLgr6KzNeXz7hh0RL/KOXJ5kafOU5SA55+ rUfw== X-Gm-Message-State: ACgBeo2uC5TsiLjK+1TJ65xykOWHrNwaNLkSc2/THuVDUIFmO68Y3R8y mLVkz+TtiT82QLT1lvPTnO4KnhUcpFMHS5y7hlJBwBLn X-Google-Smtp-Source: AA6agR4iWJ+dFu2yp+4b7V5TQF5Xnl1KnQdc01hJ8PJlOACJdO6785JvvrweDTlRxYEH9vz/7RN4ts/WbIld2pRuPPc= X-Received: by 2002:aa7:d60b:0:b0:43c:f7ab:3c8f with SMTP id c11-20020aa7d60b000000b0043cf7ab3c8fmr10636410edr.6.1660480179578; Sun, 14 Aug 2022 05:29:39 -0700 (PDT) MIME-Version: 1.0 Date: Sun, 14 Aug 2022 13:29:29 +0100 Message-ID: To: PHP Internals List Content-Type: multipart/alternative; boundary="00000000000042acda05e632ab0d" Subject: Executing PHP SAPI/runtime from Golang/Rust From: dragoonis@gmail.com (Paul Dragoonis) --00000000000042acda05e632ab0d Content-Type: text/plain; charset="UTF-8" Hey, So one thing that keeps me up at night (for a while now) is resisting the urge not to venture down a rabbithole of writing code which is loading the PHP runtime from Rust/Golang (up to MINIT) And then at RINIT time, we load the right SAPI and pass across the SERVER vars that's needed for it.. Here is a use case example. Golang concurrency model on the front, and it can execute PHP CLI SAPI or HTTP SAPI on the back. Moreover if you're looking at reasons people have previously or currently moving away from PHP to other languages, due to limitations like pure async or concurrency stuff .. then perhaps a new FRONTEND which can execute the PHP runtime on the backend would be solving some things. I appreciate this isnt a unique idea and maybe someone else from internals has raised this before .. but I wanted to raise the topic to check the viability of this if it is possible, and what blockers are in our way, currently, if it's not even possible to share SAPI calls from another language runtime. Thanks for listening, Paul Dragoonis. I wrote this on my phone, so excuse typos and poor grammar :) --00000000000042acda05e632ab0d--