Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/temporalio/temporal-pendulum
Demo showing off Temporal Polyglot features (Java, Go, TypeScript, PHP)
https://github.com/temporalio/temporal-pendulum
Last synced: 2 months ago
JSON representation
Demo showing off Temporal Polyglot features (Java, Go, TypeScript, PHP)
- Host: GitHub
- URL: https://github.com/temporalio/temporal-pendulum
- Owner: temporalio
- Created: 2021-07-20T15:13:16.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-19T02:32:01.000Z (12 months ago)
- Last Synced: 2024-08-02T11:14:03.603Z (5 months ago)
- Language: Java
- Homepage:
- Size: 18.2 MB
- Stars: 16
- Watchers: 10
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-temporal - `temporalio/temporal-pendulum` - Switch between equivalent Workflows written in Go, Java, TS, and PHP. (Samples)
README
# Temporal Polyglot Demo - Pendulum
This demo uses the following Temporal SDKs:
* [Go](https://docs.temporal.io/docs/go/introduction)
* [Java](https://docs.temporal.io/docs/java/introduction)
* [Node](https://docs.temporal.io/docs/node/introduction)
* [PHP](https://docs.temporal.io/docs/php/introduction)## Running the demo
### Start the Temporal Server
```shell script
git clone https://github.com/temporalio/docker-compose.git
cd docker-compose
docker compose up
```### Start the positioning services
#### Go Positioning Service
```shell script
cd position-go
go run worker/main.go
```#### Java Positioning Service
```shell script
cd position-java
mvn compile exec:java -Dexec.mainClass="io.temporal.demo.pendulum.position.Starter"
```#### Node Positioning Service
If running for the first time:
```shell script
cd position-node
nvm use
npm install
npm start
```For consecutive runs:
```shell script
cd position-node
npm start
```#### PHP Positioning Service
If running for the first time:
```shell script
cd position-php
composer install
composer update
./rr serve
```For consecutive runs:
```shell script
cd position-php
./rr serve
```### Start the game
```shell script
cd game
mvn compile exec:java -Dexec.mainClass="io.temporal.demo.pendulum.Pendulum"
```### Playing the game
Within the game you can change the positioning implementations
by clicking the buttons on the right.Notice how the state of the pendulum (position, acceleration, movement)
is preserved once you switch from one workflow to another.