Merge branch 'master' into workflow-tutorials

This commit is contained in:
Whit Waldo 2025-04-01 17:41:31 -05:00 committed by GitHub
commit c369d3db78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 18 additions and 18 deletions

View File

@ -1,7 +1,7 @@
# Dapr Actors (Dapr SDK)
Let's take a look at the Dapr [Actors building block](https://docs.dapr.io/developing-applications/building-blocks/actors/actors-overview/). In this Quickstart, you will run a SmartDevice.Service microservice and a simple console client to demonstrate the stateful object patterns in Dapr Actors.
1. Using a SmartDevice.Service microservice, developers can host two SmartDectectorActor smoke alarm objects, and a third ControllerActor object that command and controls the smart devices.
1. Using a SmartDevice.Service microservice, developers can host two SmartDetectorActor smoke alarm objects, and a third ControllerActor object that command and controls the smart devices.
2. Using a SmartDevice.Client console app, developers have a client app to interact with each actor, or the controller to perform actions in aggregate.
3. The SmartDevice.Interfaces contains the shared interfaces and data types used by both service and client apps
@ -18,7 +18,7 @@ For this example, you will need:
### Step 2: Set up the environment
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/workflows).
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/actors).
```bash
git clone https://github.com/dapr/quickstarts.git
@ -122,7 +122,7 @@ name: Shutdown dapr
-->
```bash
dapr stop --app-id actorservice
dapr stop --app-id actorservice
(lsof -iTCP -sTCP:LISTEN -P | grep :5001) | awk '{print $2}' | xargs kill
```

View File

@ -1,6 +1,6 @@
# Dapr Bindings (Dapr SDK)
In this quickstart, you'll create a microservice to demonstrate Dapr's bindings API to work with external systems as inputs and outputs. The service listens to input binding events from a system CRON and then outputs the contents of local data to a PostreSql output binding.
In this quickstart, you'll create a microservice to demonstrate Dapr's bindings API to work with external systems as inputs and outputs. The service listens to input binding events from a system CRON and then outputs the contents of local data to a PostgreSQL output binding.
Visit [this](https://docs.dapr.io/developing-applications/building-blocks/bindings/) link for more information about Dapr and Bindings.

View File

@ -33,7 +33,7 @@ func main() {
// Start the server
err = s.Start()
if err != nil && err != http.ErrServerClosed {
log.Fatalf("error listenning: %v", err)
log.Fatalf("error listening: %v", err)
}
}

View File

@ -106,7 +106,7 @@ dapr run --app-id checkout --resources-path ../../../resources/ --app-protocol
### Expected output
Once both services are running, the `order-processor` service will recieve orders from the `checkout`service continuously using Dapr's service invoke API.
Once both services are running, the `order-processor` service will receive orders from the `checkout` service continuously using Dapr's service invoke API.
##### `order-processor` output
@ -116,7 +116,7 @@ Once both services are running, the `order-processor` service will recieve order
== APP == Order received: { orderId: 3 }
```
### Simulate ann application failure by stopping the `order-processor` service
### Simulate an application failure by stopping the `order-processor` service
Simulate a system failure by stopping the `order-processor` service running in your second terminal window.
@ -159,7 +159,7 @@ Simulate the `order-processor` service recovering by restarting the application
##### Order Processor Service
```bash
dapr run --app-port 7001 --app-id order-processor --resources-path --app-protocol http --dapr-http-port 3501 -- dotnet run
dapr run --app-port 7001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- dotnet run
```
### Go example
@ -167,7 +167,7 @@ dapr run --app-port 7001 --app-id order-processor --resources-path --app-protoco
##### Order Processor Service
```bash
dapr run --app-port 6001 --app-id order-processor --resources-path --app-protocol http --dapr-http-port 3501 -- go run .
dapr run --app-port 6001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- go run .
```
### Java example
@ -175,7 +175,7 @@ dapr run --app-port 6001 --app-id order-processor --resources-path --app-protoco
##### Order Processor Service
```bash
dapr run --app-id order-processor --resources-path --app-port 9001 --app-protocol http --dapr-http-port 3501 -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
dapr run --app-id order-processor --resources-path ../../../resources/ --app-port 9001 --app-protocol http --dapr-http-port 3501 -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
```
### JavaScript example
@ -183,7 +183,7 @@ dapr run --app-id order-processor --resources-path --app-port 9001 --app-protoco
##### Order Processor Service
```bash
dapr run --app-port 5001 --app-id order-processor --resources-path --app-protocol http --dapr-http-port 3501 -- npm start
dapr run --app-port 5001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- npm start
```
### Python example
@ -191,7 +191,7 @@ dapr run --app-port 5001 --app-id order-processor --resources-path --app-protoco
##### Order Processor Service:
```bash
dapr run --app-port 8001 --app-id order-processor --resources-path --app-protocol http --dapr-http-port 3501 -- python3 app.py
dapr run --app-port 8001 --app-id order-processor --resources-path ../../../resources/ --app-protocol http --dapr-http-port 3501 -- python3 app.py
```
### Observe orders have resumed sequentially:

View File

@ -8,7 +8,7 @@ This quickstart shows method invocation and state persistent capabilities of Dap
- **Subtraction**: [.NET Core](https://docs.microsoft.com/en-us/dotnet/core/) application
The front-end application consists of a server and a client written in [React](https://reactjs.org/).
Kudos to `ahfarmer` whose [React calculator](https://github.com/ahfarmer/calculator)
Kudos to `ahfarmer` whose [React calculator](https://github.com/ahfarmer/calculator) was used as a starting point for the frontend implementation.
The following architecture diagram illustrates the components that make up this quickstart:
@ -160,7 +160,7 @@ sleep: 2
4. Multiply App - Open a terminal window and navigate to the python directory and follow the steps below:
<!-- STEP
name: "Build ptyhon app"
name: "Build python app"
working_dir: "./python"
-->
@ -227,7 +227,7 @@ expected_stdout_lines:
- "Exited App successfully"
expected_stderr_lines:
output_match_mode: substring
name: "Run frontent app"
name: "Run frontend app"
working_dir: "./react-calculator"
background: true
sleep: 15
@ -393,7 +393,7 @@ kubectl apply -f .
Each of the services will spin up a pod with two containers: one for your service and one for the Dapr sidecar. It will also configure a service for each sidecar and an external IP for the front-end, which allows us to connect to it externally.
4. Kubernetes deployments are asyncronous. This means you'll need to wait for the deployment to complete before moving on to the next steps. You can do so with the following commands:
4. Kubernetes deployments are asynchronous. This means you'll need to wait for the deployment to complete before moving on to the next steps. You can do so with the following commands:
<!-- STEP
name: "Deploy Kubernetes"

View File

@ -24,7 +24,7 @@ while True:
message = {"data": {"orderId": n}}
try:
response = requests.post(dapr_url, json=message, timeout=5, headers = {"dapr-app-id": "nodeapp"})
response = requests.post(dapr_url, json=message, timeout=5, headers={"dapr-app-id": "nodeapp"})
if not response.ok:
print("HTTP %d => %s" % (response.status_code,
response.content.decode("utf-8")), flush=True)

View File

@ -12,7 +12,7 @@ The quickstart contains 1 workflow (OrderProcessingWorkflow) which simulates pur
activities are as follows:
- NotifyActivity: This activity utilizes a logger to print out messages throughout the workflow. These messages notify the user when there is insufficient
§inventory, their payment couldn't be processed, and more.
inventory, their payment couldn't be processed, and more.
- VerifyInventoryActivity: This activity checks the state store to ensure that there is enough inventory present for purchase.
- RequestApprovalActivity: This activity seeks approval from a manager, if payment is greater than 5000 USD.
- ProcessPaymentActivity: This activity is responsible for processing and authorizing the payment.