dapr / quickstarts

Dapr quickstart code samples and tutorials showcasing core Dapr capabilities
Apache License 2.0
1.04k stars 526 forks source link

Timing problem in service_invocation quickstarts #1061

Open joebowbeer opened 3 months ago

joebowbeer commented 3 months ago

One timing problem that occurred when I ran the javascript/http example as a multi-run app in the devcontainer:

The order-processor may not be ready to receive the first order from the checkout service, in which case the first post returns a 500 and exits the checkout loop.

Moving the sleep to the top of the loop helps.

I think this problem and potential improvement applies to all of these multi-run service_invocation implementations, not just javascript.

Is there a better way for checkout to wait until the order-processor is running?

Originally posted by @joebowbeer in https://github.com/dapr/quickstarts/issues/536#issuecomment-2246867640

paulyuk commented 3 months ago

Hey @joebowbeer - agree this is a problem and we need some design so multiapp run can check for health and liveliness of sidecars. We have a 1.15+ item on Dapr CLI for this. https://github.com/dapr/cli/issues/1435