{"id":15789804,"url":"https://github.com/ytake/phluxor-remote","last_synced_at":"2026-02-13T03:05:55.843Z","repository":{"id":255654374,"uuid":"850700008","full_name":"ytake/phluxor-remote","owner":"ytake","description":"Phluxor Remote is a library that allows you to create remote actor systems in Phluxor.","archived":false,"fork":false,"pushed_at":"2025-01-02T08:13:55.000Z","size":101,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-05T23:52:07.925Z","etag":null,"topics":["actor-library","actor-model","actorsystem","microservice","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ytake.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"ytake","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2024-09-01T14:34:58.000Z","updated_at":"2025-01-02T08:13:59.000Z","dependencies_parsed_at":"2024-10-26T03:26:40.892Z","dependency_job_id":"45803eb2-b050-4423-91f5-af3015bfddf6","html_url":"https://github.com/ytake/phluxor-remote","commit_stats":null,"previous_names":["ytake/phluxor-remote"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ytake/phluxor-remote","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytake%2Fphluxor-remote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytake%2Fphluxor-remote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytake%2Fphluxor-remote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytake%2Fphluxor-remote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ytake","download_url":"https://codeload.github.com/ytake/phluxor-remote/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytake%2Fphluxor-remote/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274347894,"owners_count":25268970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actor-library","actor-model","actorsystem","microservice","php"],"created_at":"2024-10-04T22:03:39.173Z","updated_at":"2026-02-13T03:05:55.813Z","avatar_url":"https://github.com/ytake.png","language":"PHP","funding_links":["https://github.com/sponsors/ytake"],"categories":[],"sub_categories":[],"readme":"# Phluxor Remote\n\n## About\n\nPhluxor Remoteは、Phluxorアクターシステムを活用したリモートアクターシステムを作成するためのライブラリです。  \n\nPhluxor Remote is a library that allows you to create remote actor systems in Phluxor.\n\nIt is inspired by the [Proto.Remote](https://proto.actor/docs/remote/).\n\nwith Phluxor Remote you can create a remote actor system that can communicate with other actor systems over network.\n\nPhluxor Remote uses [Swoole](https://www.swoole.com/).  \n\nBetween the two nodes, use the `ProtoBuf` serialization format.  \nWebsocket is used as the transport layer.  \n\n## Usage\n\n### Install\n\n```bash\n$ composer require phluxor/phluxor-remote\n```\n\n### Node1\n\n```php\n\u003c?php\n\nrequire_once __DIR__ . '/vendor/autoload.php';\n\nuse Phluxor\\ActorSystem;\nuse Phluxor\\Remote\\Config;\nuse Phluxor\\Remote\\Kind;\nuse Phluxor\\Remote\\Remote;\nuse Test\\ProtoBuf\\HelloRequest;\nuse Test\\ProtoBuf\\HelloResponse;\n\n\\Swoole\\Coroutine\\run(function () {\n    \\Swoole\\Coroutine\\go(function () {\n        $system = ActorSystem::create();\n        $config = new Config('localhost', 50053, Config::withUseWebSocket(true));\n        $remote = new Remote($system, $config);\n        $remote-\u003estart();\n        $props = ActorSystem\\Props::fromFunction(\n            new ActorSystem\\Message\\ReceiveFunction(\n                function (ActorSystem\\Context\\ContextInterface $context) {\n                    $message = $context-\u003emessage();\n                    if ($message instanceof HelloRequest) {\n                        $context-\u003erespond(new HelloResponse([\n                            'Message' =\u003e 'Hello from remote node',\n                        ]));\n                    }\n                }\n            )\n        );\n        $system-\u003eroot()-\u003espawnNamed($props, 'hello');\n    });\n});\n```\n\n### Node2\n\n```php\n\u003c?php\n\nrequire_once __DIR__ . '/vendor/autoload.php';\n\nuse Phluxor\\ActorSystem;\nuse Phluxor\\Remote\\Config;\nuse Phluxor\\Remote\\Kind;\nuse Phluxor\\Remote\\Remote;\nuse Test\\ProtoBuf\\HelloRequest;\nuse Test\\ProtoBuf\\HelloResponse;\n\n\\Swoole\\Coroutine\\run(function () {\n    \\Swoole\\Coroutine\\go(function () {\n        $system = ActorSystem::create();\n        $config = new Config('localhost', 50052, Config::withUseWebSocket(true));\n        $remote = new Remote($system, $config);\n        $remote-\u003estart();\n        $future = $system-\u003eroot()-\u003erequestFuture(\n            new ActorSystem\\Ref(new ActorSystem\\ProtoBuf\\Pid([\n                'address' =\u003e 'localhost:50053',\n                'id' =\u003e 'hello',\n            ])),\n            new HelloRequest(),\n            1\n        );\n        $r = $future-\u003eresult()-\u003evalue();\n        $r-\u003egetMessage(); // Hello from remote node! \n    });\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytake%2Fphluxor-remote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fytake%2Fphluxor-remote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytake%2Fphluxor-remote/lists"}