These are some samples to demostrate various capabilities of Cadence client and server. You can learn more about cadence at:
- Cadence: https://github.com/uber/cadence
- Cadence Client: https://github.com/uber-go/cadence-client
Run Cadence Server
See instructions for running the Cadence Server: https://github.com/uber/cadence/blob/master/README.md
See instructions for using CLI to register a domain(name as "samples-domain"): https://cadenceworkflow.io/docs/08_cli or https://github.com/uber/cadence/blob/master/tools/cli/README.md
The Cadence workflow needs to know where it can find the NodeJS server. I highly recommend setting up a simple SSH tunnel, but the default NodeJS address is
Once you know the address you want to use, you'll need to change cmd/samples/recipes/pizzaactivity/pizza_activity_workflow.go
:
line 174
// REPLACE ME WITH YOUR NodeJS server endpoint$
var baseUrl = "https://d0c3003f.ngrok.io"
make
./bin/pizzaactivity -m worker
Note you must have the following environment variables defined to run the server
If you need a Pusher account, it's free so do so here
PUSHER_APP_ID
PUSHER_KEY
PUSHER_SECRET
PUSHER_CLUSTER
Assuming those are in your environment, run:
cd pizza-backend
npm install
npm build-ts
sudo npm run watch-node
sudo is required to run the NodeJS process because it execs out to Docker. If your docker isn't installed as root, omit
sudo
Note you must have the following environment variables defined to run the frontend
REACT_APP_PUSHER_ID
REACT_APP_PUSHER_CLUSTER
Assuming those are in your environment, run:
cd pizza-frontend
npm install
npm start
There are two pages for the tracking system, 1 for the customer and 1 for the worker.
customer site
worker site