Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121501 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 38964 invoked from network); 28 Oct 2023 22:25:23 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Oct 2023 22:25:23 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 24F1B180212 for ; Sat, 28 Oct 2023 15:25:19 -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,HTML_MESSAGE, 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-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) (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 ; Sat, 28 Oct 2023 15:25:18 -0700 (PDT) Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-27ddc1b1652so2841290a91.2 for ; Sat, 28 Oct 2023 15:25:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698531917; x=1699136717; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=p/sSFydwD8aHzCQg+9oLdNKbfa1MDtcaoncS0y1z05s=; b=HCxZix81WWO4lqiAbtk16L/WmUDgqojPfyZ7ByDzlHhUJx/Hg2wAdvaSPszBP7UWg/ mLU8shX2aoCPVHbCA7pJc8uRSv++iNaRDhF+soPg8Og4zvMhd6yBa3uGE38w5NwfZXdA vjL/Y7izrCJbklt34piHojtcP/QO9kayogAazOmtJhCUBhq1WaECtreKQZBBMP+4vrpr dKe3TFNULDcq8lNmMaxmRRxg7/DJGgWaHWCBWTm8Q276w0t0Riq9yjiO3aurKiZXinXM cCcqgrj09iEsQ64289hUWcyZBdknzxMl7x/QvqsGrexuXHw6tkrxncGrp9UZ2vGztEaX FVLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698531917; x=1699136717; h=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=p/sSFydwD8aHzCQg+9oLdNKbfa1MDtcaoncS0y1z05s=; b=cEfIvcqU7z0t+OZkw8VTtGpEgh/Rw5bqRHdmVo1UwObYC2Q11EvkGSp5UuKwgTtjTo dejBUnD6MV388Q95z618HuTecqHhDyTRn7YrwyWiamG+kEodh/L5fk9Dts3w7DxWML7Q W/jS4mlH0YlZ+xo3PzwHrThyouXNgSoNgSGnS3LzTPTZflSdswHSpZWseJ/k3aNgqSwR jQKnd/7AH4n3sMr6M6aWPKp0JBONJoqQcwosgVr98wxvHqP6Md52wKOAWNiCiCdZDKln UIJi2AWmcvgPbR+WLYX3pz0lAbBPbMwZGz4u1rKB1qnabg9CdXM+Gk/oCLubeKJ79YSK MJ+w== X-Gm-Message-State: AOJu0YwKJUiQfD31NdvUCNOY77Tp7f8giAy8WBGC7Zjn3wfZoI4Xluc7 wH66s+WC9onKOXGB1mqwGACt1kfUX5oshdIkw6eHx17H6MQ= X-Google-Smtp-Source: AGHT+IHTuWDhQHD0VARDESO9ObmUkINuZG5yxzgqXUCA/XmWKTyuMwaJkCNDFPAD4CLPJZRxuFWMgQULaIkm5POeRy8= X-Received: by 2002:a17:90a:28f:b0:280:1d67:16a6 with SMTP id w15-20020a17090a028f00b002801d6716a6mr3361727pja.34.1698531917336; Sat, 28 Oct 2023 15:25:17 -0700 (PDT) MIME-Version: 1.0 References: <1698415135.52648521@f511.i.mail.ru> In-Reply-To: Date: Sat, 28 Oct 2023 15:25:04 -0700 Message-ID: To: juan carlos morales Cc: Kirill Nesmeyanov , internals Content-Type: multipart/alternative; boundary="00000000000092983f0608ce4727" Subject: Re: [PHP-DEV] Discussion - PHP with distributed programming features. From: jordan.ledoux@gmail.com (Jordan LeDoux) --00000000000092983f0608ce4727 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Oct 28, 2023 at 10:54=E2=80=AFAM juan carlos morales < dev.juan.morales@gmail.com> wrote: > > > What I mean is more about =E2=80=A6 migrating a running php instance to a= nother > node or another php instance, in fact your php code is running, suddenly = we > Need to move to another node, how to do it? > This seems less like a discussion about a PHP feature and more like you asking internals for tech support at work, honestly. As far as I know, there isn't a way to do what you're asking, because you can accomplish the same thing much easier by designing your application better to make API calls to services, which is what people have already suggested. The PHP way to handle the root cause of your problem (too many resources being used on a single machine) is to divide the application into services and use APIs, often through sockets, the delegate work to those services. There are also other ways of handling this common problem in web application architecture. You can break up the request into multiple requests on the client side so that the user sees progress happen in chunks. You can use tools like RabbitMQ or other queuing services to perform certain long-running tasks asynchronously. You can use more powerful hardware or provision more capable nodes. In fact, several of these actually fall under the Actor/Object or Dataflow model of implementing Distributed Programming. What PHP does not support is the Distributed Shared Memory model of implementing Distributed Programming (which is what you are asking about apparently) because doing so would almost certainly make PHP worse at the things it is well suited for, would massively complicate the work of maintaining and developing the language for the contributors to the language, and would be a massive undertaking to implement in the first place. PHP has distributed programming features. In fact, all of the suggestions you have received so far ARE ways of doing distributed programming features. But internals is not your, or my, or anyone else's personal tech support channel, and personally it feels like you haven't explained what it is you want to discuss with internals about improving or changing PHP's support for distributed programming. Are you interested in working on an RFC to clone a PHP process onto a remote box? I can't imagine that would get much support here, or be something that is very simple to do. Jordan --00000000000092983f0608ce4727--