temporalio / temporal-pendulum

Demo showing off Temporal Polyglot features (Java, Go, TypeScript, PHP)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Temporal Polyglot Demo - Pendulum

Temporal Pendulum Game

This demo uses the following Temporal SDKs:

Running the demo

Start the Temporal Server

git clone https://github.com/temporalio/docker-compose.git
cd docker-compose
docker compose up

Start the positioning services

Go Positioning Service

cd position-go
go run worker/main.go

Java Positioning Service

cd position-java
mvn compile exec:java -Dexec.mainClass="io.temporal.demo.pendulum.position.Starter"

Node Positioning Service

If running for the first time:

cd position-node
nvm use
npm install
npm start

For consecutive runs:

cd position-node
npm start

PHP Positioning Service

If running for the first time:

cd position-php
composer install
composer update
./rr serve

For consecutive runs:

cd position-php
./rr serve

Start the game

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.

About

Demo showing off Temporal Polyglot features (Java, Go, TypeScript, PHP)


Languages

Language:Java 42.5%Language:PHP 21.4%Language:TypeScript 18.6%Language:Go 8.0%Language:CSS 5.3%Language:JavaScript 4.2%