El El sáb, 28 de oct. de 2023 a la(s) 19:25, Jordan LeDoux < jordan.led...@gmail.com> escribió:
> > > On Sat, Oct 28, 2023 at 10:54 AM juan carlos morales < > dev.juan.mora...@gmail.com> wrote: > >> >> >> What I mean is more about … migrating a running php instance to another >> 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 > > Hello Jordan, thanks for the reply. When I read you, I have the feeling that you are a little angry about my question, please dont. It is a very honest question, that do belong to the internals, because if PHP does not have a way to do it, I would like to think a way to do it (despite the fact someone believes is useful or not, it is just me). So again, thanks!, dont get mad :D, and I will come back later on this topic, in a more clear way, maybe I am not expressing myself clearly. Regards