PHPackages                             phluxor/phluxor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. phluxor/phluxor

ActiveLibrary[Queues &amp; Workers](/categories/queues)

phluxor/phluxor
===============

A toolkit for flexible actor models in PHP, empowering the PHP ecosystem

0.2.2(1y ago)3517032Apache-2.0PHPPHP ^8.3CI failing

Since Jun 23Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/ytake/phluxor)[ Packagist](https://packagist.org/packages/phluxor/phluxor)[ GitHub Sponsors](https://github.com/ytake)[ RSS](/packages/phluxor-phluxor/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (17)Versions (18)Used By (2)

Phluxor
=======

[](#phluxor)

A toolkit for flexible actor models in PHP, empowering the PHP ecosystem.

requires PHP 8.3 and swoole.

and Protocol Buffers for message serialization. / not supported other serialization formats yet.

Documentation is under preparation.

do not use this in production yet.

[sample web application / phluxor-http-application-samples](https://github.com/ytake/phluxor-http-application-samples)
[demonstrate the use of Phluxor](https://github.com/ytake/phluxor-example)
[demonstrates how to use Phluxor with Event Sourcing and CQRS.](https://github.com/ytake/phluxor-example-event-sourcing-cqrs)
[Documentation](https://phluxor.github.io/en/guide/)

PhluxorはPHPでのアクターモデルを実現するためのツールキットです。
PHP 8.3 と swooleが必要です。
メッセージのシリアライズには、Protocol Buffersを利用します。
他のシリアライズフォーマットはまだサポートされていません。

 ```
sequenceDiagram
    participant A as Actor A
    participant B as Actor B
    participant C as Actor C

    A->>B: Message(Data X)
    Note over B: B processes the received message, updates internal state, and prepares the next message
    B->>C: Message(Data Y)
    Note over C: C processes the message from B.Meanwhile, A or other actors can progress with separate tasks.

    par Concurrent Execution
        A->>C: Another Message(Data Z)
        C->>B: Result Message(Computed W)
    and
        B->>A: State Report(State S)
    end
```

      Loading Installation
------------

[](#installation)

```
$ composer require phluxor/phluxor
```

already implemented
-------------------

[](#already-implemented)

- actor model
- actor lifecycle
- supervision
- actor registry
- actor messaging
- become/unbecome
- mailbox / dispatcher
- event stream
- future
- persistent actors (in memory / mysql)
- [OpenTelemetry](https://opentelemetry.io/docs/languages/php/) support (metrics)
- router / round-robin, broadcast, scatter-gather, etc.
- [remoting](https://github.com/ytake/phluxor-remote) / Remoting is the mechanism by which Actors on different nodes talk to each other internally.

work in progress
----------------

[](#work-in-progress)

- open telemetry support (tracing)
- virtual actors / cluster support

Supervision
-----------

[](#supervision)

exception handling is done by the actor system, and the actor can be supervised by parent , root actors.

- `OneForOneStrategy`
- `AllForOneStrategy`
- `ExponentialBackoffStrategy`
- `RestartStrategy`

Easy to use
-----------

[](#easy-to-use)

like a akka http, you can use it with a simple API.
use mezzio / mezzio-swoole / phluxor.
and you can use it with swoole / open swoole.

```
