On Fri, Oct 27, 2023 at 1:38 PM juan carlos morales
<dev.juan.mora...@gmail.com> 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 dynamic 
> 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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to