Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121487 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 47636 invoked from network); 27 Oct 2023 13:51:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Oct 2023 13:51:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D4E741804BC for ; Fri, 27 Oct 2023 06:51:26 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) (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 ; Fri, 27 Oct 2023 06:51:26 -0700 (PDT) Received: by mail-ot1-f50.google.com with SMTP id 46e09a7af769-6c7b3adbeb6so1295865a34.0 for ; Fri, 27 Oct 2023 06:51:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698414685; x=1699019485; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=EvvFGydDf+IhskFDIRyzv9GpAI9YUzd/7Xj2OB9S8aw=; b=hTxcp2NOorZYapDj5N0al28BsQ4t0ZSrK9Cwiigrq4Kb/G8kpvG4C2gcOOvfcIQcDA gvXWph1KYGo3kYpBhwEKHo8EgUQ7wY1kpp43lW2iM/0lSuF7CfX6AfrgHmBQuuzpo6we KMFlQiedszR2i1TGFsIBBFs1jxpauAekY42L4Q13JPKxRpzgEQ35V5bKtFnJ4sm59a7U E51LYfHdM8mUowLrtTrk0UgIx+la8nW1bZPxpEizVtpnEXbn5MNUG47/3qryo1U13wVH moJRYhEQ9l7tswKslbs+auty3WaDlrtHiSWfnMKImq3qcIaiZpz9p3MvM8txjPdcUWdF CrwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698414685; x=1699019485; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EvvFGydDf+IhskFDIRyzv9GpAI9YUzd/7Xj2OB9S8aw=; b=SfeiGVEE5s4RoXDQRdgF3T3XKi+N7SCQwXorsG8kZkctk0tcfoYZUCvKU5MosTizVJ x1+K8ZsjO6E2N52E/jW8orAqVJ68s7GvWZZRcxVTB3lFnZ/gSgukDXtujh8KLUCb/CrH MP2Yg6Vf2SPARayobO/FKxNLOZH4je5TZHkGZsYrtHT2vZdB/8AlVMi2dKaizuUWVOsX ADwxMK51bzPh837nnEHwbLd65S6vzqG/7S5OD7GWfR5xrpig+3bZlY5hS7AFh6ELnnKs TXeG13KlwBxCdCzuThDnKHzlWzRwc3vdJbgjfD2eAgPcrHwSdFb/+4f+43GcXfSHes/S g8KA== X-Gm-Message-State: AOJu0YzQZLxOvoJALPI7OPmcShJhW8m2FLwoQXb73xbXi2hEr13A7J96 GywJcGVuf6xk4IR6f52hEqBoSbtW79rCt19e7u8= X-Google-Smtp-Source: AGHT+IFpP3TNv6eG3odSk0Pgkc4z0ABC7rD5rVsIM+pFxMttPn9n7hmkaMNU0/Yc7GpzPfv6slEbmoK+HuKU5CDtbJU= X-Received: by 2002:a05:6830:25d2:b0:6bd:7252:9db1 with SMTP id d18-20020a05683025d200b006bd72529db1mr3211890otu.11.1698414685521; Fri, 27 Oct 2023 06:51:25 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 27 Oct 2023 15:51:14 +0200 Message-ID: To: juan carlos morales Cc: PHP Internals List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Discussion - PHP with distributed programming features. From: landers.robert@gmail.com (Robert Landers) On Fri, Oct 27, 2023 at 1:38=E2=80=AFPM juan carlos morales wrote: > > Imagine a request comes to NgInx, then we process the request in PHP > .... suddenly while execution of PHP is running, we dont have more > resources in the server , so we need to process that PHP code on other > server with more resources. > > How can we "move" the complete PHP process to another server with more > resources and then send back the result ? > > this is like having a distributed php infrastructure, behaving in a dynam= ic way. > > how can we achieve something like this? > > or maybe one piece of code needs to run in another server because of > resources or something like that, like a function for example, only > running one function in a different host and then come back to the > mother one. > > My question is .... what do we need to provide PHP some functionality > like the distributed programming languages? > > It could be achieve with long running PHP instances and using MPI for > example (I imagine) but ... ideas on this ? Maybe I am crazy > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > You mean, like an API call to an instance running on another machine? I imagine that's the simple, non-technical solution. To what you're imagining (I think), I've been working on DurablePHP (https://github.com/bottledcode/durable-php) which can already kinda do that (using fibers to execute code elsewhere, then return back -- or not). It's nowhere near production-ready, but its a fun project and already running some interesting toy-projects around the house. But it has a number of issues left to iron out (particularly around the serialization of exceptions and migrating workloads from hot-shards). For an MVP/POC of the idea, it works pretty well. Robert Landers Software Engineer Utrecht NL