{"id":13542754,"url":"https://github.com/temporalio/temporal-polyglot","last_synced_at":"2025-04-02T11:31:00.995Z","repository":{"id":39166135,"uuid":"362869019","full_name":"temporalio/temporal-polyglot","owner":"temporalio","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-19T02:32:41.000Z","size":48486,"stargazers_count":35,"open_issues_count":4,"forks_count":8,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-11-03T09:33:29.159Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/temporalio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-04-29T15:48:10.000Z","updated_at":"2024-07-23T04:25:15.000Z","dependencies_parsed_at":"2024-11-03T09:41:28.651Z","dependency_job_id":null,"html_url":"https://github.com/temporalio/temporal-polyglot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Ftemporal-polyglot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Ftemporal-polyglot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Ftemporal-polyglot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Ftemporal-polyglot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/temporalio","download_url":"https://codeload.github.com/temporalio/temporal-polyglot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246806508,"owners_count":20837111,"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","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":[],"created_at":"2024-08-01T11:00:16.973Z","updated_at":"2025-04-02T11:30:55.987Z","avatar_url":"https://github.com/temporalio.png","language":"PHP","funding_links":[],"categories":["Samples"],"sub_categories":["Terraform Providers"],"readme":"## Temporal Simple Polyglot example\n\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"img/polyglot-overview.png\" height=\"500px\" alt=\"App Overview\"/\u003e\n\u003c/p\u003e\n\n\nThis demo uses the following Temporal SDKs:\n* [Java](https://docs.temporal.io/docs/java/introduction)\n* [Go](https://docs.temporal.io/docs/go/introduction)\n* [PHP](https://docs.temporal.io/docs/php/introduction)\n* [Node](https://docs.temporal.io/docs/node/introduction)\n\nIt shows how Temporal can act as a service orchestrator and mediator between \ndifferent distributed applications written in different programming languages.\n\nInteractions between Workflows and Activities:\n\n1. Java Workflow signals Go Workflow (10 times)\n2. Go Workflow signals Java Workflow (10 times)\n3. Java Workflow invokes a Go Activity\n4. Go Activity queries Java Workflow\n5. Go Workflow invokes Java Activity\n6. Java Activity queries Go Workflow\n7. Java Workflow signals PHP Workflow (10 times)\n8. Go Workflow signals PHP Workflow (10 times)\n9. Java Workflow invokes NodeJS Activity and propagates its error \n10. Go Workflow invokes NodeJS Activity and propagates its error\n11. PHP Wokflow invokes NodeJS Activity and propagates its error\n\n### Running the demo\n\n1) Start the Temporal Server:\n```shell script\ngit clone https://github.com/temporalio/docker-compose.git\ncd  docker-compose\ndocker compose up\n```\n\nNote: The sample apps in different languages should be started in \nthe shown order. They should be started within 3 minutes from each other.\nYou can set different Workflow execution timeouts to change this if you wish.\n\n2) Start the Node sample:\n```shell script\ncd app-node\nnpm install\nnpm start\n```\n\n\"npm install\" does not have to be run each time, only when changes are made.\n\n3) Start the PHP sample:\n```shell script\ncd app-php\ncomposer install\n./rr serve\nphp app.php simple  \n```\n\n\"composer install\" does not have to be run each time.\n\n4) Start the Go worker and starter:\n```shell script\ncd app-go\ngo run worker/main.go\ngo run starter/main.go\n```\n\n5) Start the Java worker and starter:\n```shell script\ncd app-java\nmvn compile exec:java -Dexec.mainClass=\"org.simple.app.StartWorker\"\nmvn compile exec:java -Dexec.mainClass=\"org.simple.app.StartWorkflow\"\n```\n\n### Seeing the results:\n1) Look at the logs printed in the same window where you ran the Go workflow starter, you should ge:\n\n```shell script\nWorkflow result: \nHello from Java Workflow: 0\nHello from Java Workflow: 1\nHello from Java Workflow: 2\nHello from Java Workflow: 3\nHello from Java Workflow: 4\nHello from Java Workflow: 5\nHello from Java Workflow: 6\nHello from Java Workflow: 7\nHello from Java Workflow: 8\nHello from Java Workflow: 9\nJava SimpleActivity - hello from: GoWorkflow Query result: This is a simple Go Workflow\nError from Node Activity: NodeJs Activity Error...\n```\n\n2) Look at the results of our Java workflow, you should get:\n```shell script\nHello from Go workflow: 0\nHello from Go workflow: 1\nHello from Go workflow: 2\nHello from Go workflow: 3\nHello from Go workflow: 4\nHello from Go workflow: 5\nHello from Go workflow: 6\nHello from Go workflow: 7\nHello from Go workflow: 8\nHello from Go workflow: 9\nGo Activity - hello from: JavaWorkflow Query result: This is a simple Java Workflow\nError from Node Activity: NodeJs Activity Error...\n```\n\n3) Look at the results of your PHP workflow, you should get:\n```shell script\nResult:\nHello from Java Workflow: 0\nHello from Java Workflow: 1\nHello from Java Workflow: 2\nHello from Java Workflow: 3\nHello from Java Workflow: 4\nHello from Java Workflow: 5\nHello from Java Workflow: 6\nHello from Java Workflow: 7\nHello from Java Workflow: 8\nHello from Java Workflow: 9\nHello from Go workflow: 0\nHello from Go workflow: 1\nHello from Go workflow: 2\nHello from Go workflow: 3\nHello from Go workflow: 4\nHello from Go workflow: 5\nHello from Go workflow: 6\nHello from Go workflow: 7\nHello from Go workflow: 8\nHello from Go workflow: 9\nError from Node Activity: NodeJs Activity Error...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemporalio%2Ftemporal-polyglot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftemporalio%2Ftemporal-polyglot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemporalio%2Ftemporal-polyglot/lists"}