quickstarts/service_invocation/csharp/http
Elena Kolevska 2f5a5d0b0e
Merge 1.15 into master (#1172)
* fix: configuration/python/http/order-processor/requirements.txt to reduce vulnerabilities


The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-URLLIB3-7267250

* fix: pub_sub/python/sdk/order-processor-fastapi/requirements.txt to reduce vulnerabilities


The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-ANYIO-7361842

* helloworld: add terminal to node app for vscode

Signed-off-by: Joël Séguillon <joel.seguillon@gmail.com>

* chore: bump runtime version to rc.2 (#1126)

Signed-off-by: Mike Nguyen <hey@mike.ee>

* chore: cleanup & unify workflows and bump kind version (#1127)

Signed-off-by: Mike Nguyen <hey@mike.ee>

* Creating Conversation folder

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* Modernized and updated Workflow .NET quickstart to use latest best practices and Dapr package (1.15.0 rc01)

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Updated Dapr package version to use latest RC02

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* COnverstaion API

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* add python-sdk in cryptography (#1093)

Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
Signed-off-by: Alice Gibbons <alice@diagrid.io>

* Fixing Conversation HTTP example for RC5

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* Fixing Conversation SDK example for RC5

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* Update conversation.go

Co-authored-by: Mike Nguyen <hey@mike.ee>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* Update go.mod

Co-authored-by: Mike Nguyen <hey@mike.ee>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* Update go.mod

Co-authored-by: Mike Nguyen <hey@mike.ee>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* fix: updates CLI and runtime version to fix tests (#1138)

Signed-off-by: Mike Nguyen <hey@mike.ee>

* Tests updates

Signed-off-by: Alice Gibbons <alice@diagrid.io>

* HTTP csharp jobs quickstart

Signed-off-by: Alice Gibbons <alice@diagrid.io>

* Finishing conversation sdk and fixing components path

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* Update conversation/go/http/README.md

Co-authored-by: Mike Nguyen <hey@mike.ee>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* fix: bump python crypto dep to >=1.14

Signed-off-by: Mike Nguyen <hey@mike.ee>

* fix: modify actors/cs test assertion

Signed-off-by: Mike Nguyen <hey@mike.ee>

* fix: define update deps for python wf quickstart

Signed-off-by: Mike Nguyen <hey@mike.ee>

* fix(test): typo in existing quickstart validation

Signed-off-by: Mike Nguyen <hey@mike.ee>

* fix: update python WF dep names

Signed-off-by: Mike Nguyen <hey@mike.ee>

* Update global.env with Dapr CLI 1.15.0-rc.2

Need RC.2 containing fix for deprecation flags.  see https://github.com/dapr/cli/pull/1478

Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com>

* Update conversation/go/sdk/dapr.yaml

Co-authored-by: Mike Nguyen <hey@mike.ee>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* Update conversation/go/http/dapr.yaml

Co-authored-by: Mike Nguyen <hey@mike.ee>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* Update conversation/go/sdk/dapr.yaml

Co-authored-by: Mike Nguyen <hey@mike.ee>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* Updating sleep and timeout times

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* Update conversation/go/sdk/README.md

Co-authored-by: Alice Gibbons <alicejgibbons@gmail.com>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* Update conversation/go/http/README.md

Co-authored-by: Alice Gibbons <alicejgibbons@gmail.com>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* Update conversation/go/http/README.md

Co-authored-by: Alice Gibbons <alicejgibbons@gmail.com>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* Update conversation/go/sdk/README.md

Co-authored-by: Alice Gibbons <alicejgibbons@gmail.com>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* Update conversation/go/http/README.md

Co-authored-by: Alice Gibbons <alicejgibbons@gmail.com>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* Comversation README improvements

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* Update conversation/go/http/README.md

Co-authored-by: Alice Gibbons <alicejgibbons@gmail.com>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* Update conversation/go/sdk/README.md

Co-authored-by: Alice Gibbons <alicejgibbons@gmail.com>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* Update conversation/go/sdk/README.md

Co-authored-by: Alice Gibbons <alicejgibbons@gmail.com>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* removing files from PR

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* Csharp conversation quickstarts

Signed-off-by: Alice Gibbons <alice@diagrid.io>

* Python Jobs  API - HTTP quickstart

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* Version bump (dapr rc8, cli rc3 and python sdk 1.15.0rc2) (#1148)

* Updates to python sdk 1.15.0rc2

Signed-off-by: Elena Kolevska <elena@kolevska.com>

* Test fix

Signed-off-by: Elena Kolevska <elena@kolevska.com>

* test fix

Signed-off-by: Elena Kolevska <elena@kolevska.com>

* Bumps runtime and cli versions

Signed-off-by: Elena Kolevska <elena@kolevska.com>

* Bumps runtime to rc8

Signed-off-by: Elena Kolevska <elena@kolevska.com>

---------

Signed-off-by: Elena Kolevska <elena@kolevska.com>
Signed-off-by: Elena Kolevska <elena-kolevska@users.noreply.github.com>

* Python Conversation http Quickstart (#1150)

* Python Conversation API - HTTP quickstart

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* Update conversation/python/http/dapr.yaml

Co-authored-by: Marc Duiker <marcduiker@users.noreply.github.com>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* Update conversation/python/http/dapr.yaml

Co-authored-by: Marc Duiker <marcduiker@users.noreply.github.com>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

---------

Signed-off-by: Fernando Rocha <fernando@diagrid.io>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>
Co-authored-by: Marc Duiker <marcduiker@users.noreply.github.com>

* Added Quickstart for Javascript Jobs  HTTP api (#1134)

* Added Quickstart for Javascript Jobs HTTP api

Signed-off-by: Constantin Chirila <constantin@diagrid.io>

* Updated Read me for Jobs quickstart

Signed-off-by: Constantin Chirila <constantin@diagrid.io>

* Updated Package json with the right services names and correct ports

Signed-off-by: Constantin Chirila <constantin@diagrid.io>

* Updated JS Jobs README to clear dotnet processes

Signed-off-by: Constantin Chirila <constantin@diagrid.io>

* Reordered props in dapr.yaml

Signed-off-by: Constantin Chirila <constantin@diagrid.io>

---------

Signed-off-by: Constantin Chirila <constantin@diagrid.io>
Co-authored-by: Constantin Chirila <constantin@diagrid.io>
Co-authored-by: Mike Nguyen <hey@mike.ee>

* Fix inconsistent dapr.yaml and appIDs (#1152)

* Fix inconsistent multi-app run files

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* Rename appID for consistency

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* Update appID for consistency

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* fix appID

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* Fix appID

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* Remove schedulerHostAddress

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

---------

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* RC 9 and CLI RC 4 (#1153)

Signed-off-by: Alice Gibbons <alice@diagrid.io>

* Conversation JS HTTP Quickstart (#1154)

* Added Quickstart for Javascript Conversation HTTP api

Signed-off-by: Constantin Chirila <constantin@diagrid.io>

* Minor change

Signed-off-by: Constantin Chirila <constantin@diagrid.io>

* Updated Readme

Signed-off-by: Constantin Chirila <constantin@diagrid.io>

* Removed redundant check on response

Signed-off-by: Constantin Chirila <constantin@diagrid.io>

* Updated Readme

Signed-off-by: Constantin Chirila <constantin@diagrid.io>

---------

Signed-off-by: Constantin Chirila <constantin@diagrid.io>
Co-authored-by: Constantin Chirila <constantin@diagrid.io>

* splitting header

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* updating to runtime version 1.15.0-rc.10 and cli version 1.15.0-rc.5

Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com>

* removing flask, fixing print statements

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* readme

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* gitignore

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* Update jobs/python/http/README.md

Co-authored-by: Alice Gibbons <alicejgibbons@gmail.com>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* Update jobs/python/http/README.md

Co-authored-by: Alice Gibbons <alicejgibbons@gmail.com>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>

* removing debug logs

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* Update jobs/python/http/README.md

Signed-off-by: Alice Gibbons <alicejgibbons@gmail.com>

* chore:RC 11

Signed-off-by: Alice Gibbons <alice@diagrid.io>

* removing localhost scheduler and gitignore

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* removing unecessary parsing step

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* Update .NET workflow quickstart

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* Update Java Workflow sample

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* Update Python Quickstart

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* Fix event name

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* Update JavaScrrip WF Quickstart with new naming, input and output.

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* Update Python WF quickstart to wait_for_workflow_completion

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* Clean up Python

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* update Go Workflow to use WaitForCompletion

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* Add clarification about sending/receiving events

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* All validations are working

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* Fixed python conversation quickstart

* Add link to raise event

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>

* release: bump go examples to rc1

Signed-off-by: Mike Nguyen <hey@mike.ee>

* updating dapr version to 1.15.0-rc.18 (#1168)

Signed-off-by: Fernando Rocha <fernando@diagrid.io>

* Conversation quickstarts updates - Python and Go (#1169)

* Adds python conversation api sdk quickstart. Updates python sdk version. Updates parameter name in conversation quickstart in Go.

Signed-off-by: Elena Kolevska <elena@kolevska.com>

* Fixes .net http quickstart for Conversation API

Signed-off-by: Elena Kolevska <elena@kolevska.com>

* rename

Signed-off-by: Elena Kolevska <elena@kolevska.com>

* Fixes js conversation quickstart

Signed-off-by: Elena Kolevska <elena@kolevska.com>

* Older dependency

Signed-off-by: Elena Kolevska <elena@kolevska.com>

* Sets up a clean virtual environment for every quickstart

Signed-off-by: Elena Kolevska <elena@kolevska.com>

* Apply suggestions from code review

Co-authored-by: Mark Fussell <markfussell@gmail.com>
Signed-off-by: Elena Kolevska <elena-kolevska@users.noreply.github.com>

* Adds uvicorn in requirements.txt

Signed-off-by: Elena Kolevska <elena@kolevska.com>

* Runs the install step

Signed-off-by: Elena Kolevska <elena@kolevska.com>

---------

Signed-off-by: Elena Kolevska <elena@kolevska.com>
Signed-off-by: Elena Kolevska <elena-kolevska@users.noreply.github.com>
Co-authored-by: Mark Fussell <markfussell@gmail.com>

* Updated Dapr .NET SDK package to use latest protos - no other changes needed to the example (#1170)

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Alice Gibbons <alice@diagrid.io>

* Update global.env

Signed-off-by: Yaron Schneider <schneider.yaron@live.com>

* Bumps python sdk to 1.15.0

Signed-off-by: Elena Kolevska <elena@kolevska.com>

---------

Signed-off-by: Joël Séguillon <joel.seguillon@gmail.com>
Signed-off-by: Mike Nguyen <hey@mike.ee>
Signed-off-by: Fernando Rocha <fernando@diagrid.io>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
Signed-off-by: Alice Gibbons <alice@diagrid.io>
Signed-off-by: Fernando Rocha <fernandorsl@gmail.com>
Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com>
Signed-off-by: Elena Kolevska <elena@kolevska.com>
Signed-off-by: Elena Kolevska <elena-kolevska@users.noreply.github.com>
Signed-off-by: Constantin Chirila <constantin@diagrid.io>
Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>
Signed-off-by: Alice Gibbons <alicejgibbons@gmail.com>
Signed-off-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: Joël Séguillon <joel.seguillon@gmail.com>
Co-authored-by: Mike Nguyen <hey@mike.ee>
Co-authored-by: Fernando Rocha <fernando@diagrid.io>
Co-authored-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Kent (Chia-Hao), Hsu <mycodelearner2020@gmail.com>
Co-authored-by: Fernando Rocha <fernandorsl@gmail.com>
Co-authored-by: Alice Gibbons <alicejgibbons@gmail.com>
Co-authored-by: Alice Gibbons <alice@diagrid.io>
Co-authored-by: Paul Yuknewicz <paulyuk@microsoft.com>
Co-authored-by: Marc Duiker <marcduiker@users.noreply.github.com>
Co-authored-by: Constantin Chirila <constantin.chirila@gmail.com>
Co-authored-by: Constantin Chirila <constantin@diagrid.io>
Co-authored-by: Mark Fussell <markfussell@gmail.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2025-02-28 06:14:51 -08:00
..
checkout Merge branch 'release-1.13' into kaibocai/add-js-quickstart 2024-02-27 10:14:16 -08:00
order-processor Converted all projects to net8.0 2024-02-18 16:12:57 +13:00
README.md fixes #997 C# test timing issue 2024-03-06 09:40:01 -08:00
checkout.sln Added service invocation examples (#536) 2022-03-03 16:32:41 -08:00
dapr.yaml Merge 1.15 into master (#1172) 2025-02-28 06:14:51 -08:00
makefile Added missing make file 2022-08-29 14:58:58 -07:00

README.md

Service Invocation

In this quickstart, you'll create a checkout service and an order processor service to demonstrate how to use the service invocation API. The checkout service uses Dapr's http proxying capability to invoke a method on the order processing service.

Visit this link for more information about Dapr and service invocation.

This quickstart includes one checkout service:

  • .NET client service checkout

And one order processor service:

  • .NET order-processor service order-processor

Run all apps with multi-app run template file:

This section shows how to run both applications at once using multi-app run template files with dapr run -f .. This enables to you test the interactions between multiple applications.

  1. Open a new terminal window and run order-processor and checkout using the multi app run template defined in dapr.yaml:
dapr run -f .

The terminal console output should look similar to this:

== APP - order-processor == Order received : Order { orderId = 1 }
== APP - checkout == Order passed: Order { OrderId = 1 }
== APP - order-processor == Order received : Order { orderId = 2 }
== APP - checkout == Order passed: Order { OrderId = 2 }
== APP - order-processor == Order received : Order { orderId = 3 }
== APP - checkout == Order passed: Order { OrderId = 3 }
== APP - order-processor == Order received : Order { orderId = 4 }
== APP - checkout == Order passed: Order { OrderId = 4 }
== APP - order-processor == Order received : Order { orderId = 5 }
== APP - checkout == Order passed: Order { OrderId = 5 }
== APP - order-processor == Order received : Order { orderId = 6 }
== APP - checkout == Order passed: Order { OrderId = 6 }
== APP - order-processor == Order received : Order { orderId = 7 }
== APP - checkout == Order passed: Order { OrderId = 7 }
== APP - order-processor == Order received : Order { orderId = 8 }
== APP - checkout == Order passed: Order { OrderId = 8 }
== APP - order-processor == Order received : Order { orderId = 9 }
== APP - checkout == Order passed: Order { OrderId = 9 }
== APP - order-processor == Order received : Order { orderId = 10 }
== APP - checkout == Order passed: Order { OrderId = 10 }
  1. Stop and clean up application processes
dapr stop -f .

Run a single app at a time with Dapr (Optional)

An alternative to running all or multiple applications at once is to run single apps one-at-a-time using multiple dapr run .. -- dotnet run commands. This next section covers how to do this.

Run .NET order-processor with Dapr

  1. Open a new terminal window and run the Dotnet order-processor app with Dapr:
cd ./order-processor
dapr run --app-port 7001 --app-id order-processor --app-protocol http --dapr-http-port 3501 -- dotnet run

Run .NET checkout with Dapr

  1. Open a new terminal and run the Dotnet checkout app with Dapr:
cd ./checkout
dapr run  --app-id checkout --app-protocol http --dapr-http-port 3500 -- dotnet run

Stop and clean up application processes

dapr stop --app-id order-processor
dapr stop --app-id checkout