Replace DaprID with AppID (#372)

This commit is contained in:
pruthvidhodda 2020-02-27 13:00:14 -08:00 committed by GitHub
parent 8777bb7eb8
commit deb279e7d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -74,13 +74,13 @@ KEYS "myApp*"
If the data store supports SQL queries, you can query an actor's state using SQL queries. For example use:
```sql
SELECT * FROM StateTable WHERE Id='<dapr-id>||<actor-type>||<actor-id>||<key>'
SELECT * FROM StateTable WHERE Id='<app-id>||<actor-type>||<actor-id>||<key>'
```
You can also perform aggregate queries across actor instances, avoiding the common turn-based concurrency limitations of actor frameworks. For example, to calculate the average temperature of all thermometer actors, use:
```sql
SELECT AVG(value) FROM StateTable WHERE Id LIKE '<dapr-id>||<thermometer>||*||temperature'
SELECT AVG(value) FROM StateTable WHERE Id LIKE '<app-id>||<thermometer>||*||temperature'
```
> **NOTE:** Direct queries of the state store are not governed by Dapr concurrency control, since you are not calling through the Dapr runtime. What you see are snapshots of committed data which are acceptable for read-only queries across multiple actors, however writes should be done via the actor instances.

View File

@ -31,7 +31,7 @@ Create or edit the file in `$HOME/.IdeaIC2019.3/config/tools/External\ Tools.xml
<!-- 2. For Linux or MacOS use: /usr/local/bin/daprd -->
<option name="COMMAND" value="C:\dapr\daprd.exe" />
<!-- 3. Choose app, http and grpc ports that do not conflict with other daprd command entries (placement address should not change). -->
<option name="PARAMETERS" value="-dapr-id demoservice -app-port 3000 -dapr-http-port 3005 -dapr-grpc-port 52000 -placement-address localhost:50005" />
<option name="PARAMETERS" value="-app-id demoservice -app-port 3000 -dapr-http-port 3005 -dapr-grpc-port 52000 -placement-address localhost:50005" />
<!-- 4. Use the folder where the `components` folder is located -->
<option name="WORKING_DIRECTORY" value="C:/Code/dapr/java-sdk/examples" />
</exec>

View File

@ -64,7 +64,7 @@ You will need to define a task and problem matcher for daprd in your [tasks.json
Let's take a quick look at the args that are being passed to the daprd command.
* -dapr-id -- the id (how you will locate it via service invocation) of your microservice
* -app-id -- the id (how you will locate it via service invocation) of your microservice
* -app-port -- the port number that your application code is listening on
* -dapr-http-port -- the http port for the dapr api
* -dapr-grpc-port -- the grpc port for the dapr api
@ -92,7 +92,7 @@ Let's take a quick look at the args that are being passed to the daprd command.
"label": "daprd-web",
"command": "daprd",
"args": [
"-dapr-id",
"-app-id",
"whac-a-mole--web",
"-app-port",
"3000",
@ -123,7 +123,7 @@ Let's take a quick look at the args that are being passed to the daprd command.
"label": "daprd-leaderboard",
"command": "daprd",
"args": [
"-dapr-id",
"-app-id",
"whac-a-mole--leaderboard",
"-app-port",
"5000",

View File

@ -26,7 +26,7 @@ Then, the Dapr CLI will [launch](https://github.com/dapr/cli/blob/d585612185a4a5
If you inspect the command lines of the Dapr runtime and the app, observe that the Dapr runtime has these args:
```bash
daprd.exe --dapr-id mynode --dapr-http-port 3500 --dapr-grpc-port 43693 --log-level info --max-concurrency -1 --protocol http --app-port 3000 --placement-address localhost:50005
daprd.exe --app-id mynode --dapr-http-port 3500 --dapr-grpc-port 43693 --log-level info --max-concurrency -1 --protocol http --app-port 3000 --placement-address localhost:50005
```
And the app has these args, which are not modified from what was passed in via the CLI:
@ -37,7 +37,7 @@ node app.js
### Dapr runtime
The daprd process is started with the args above. `--app-id`, "nodeapp", which is the dapr app id, is forwarded from the Dapr CLI into `daprd` as the `--dapr-id` arg. Similarly:
The daprd process is started with the args above. `--app-id`, "nodeapp", which is the dapr app id, is forwarded from the Dapr CLI into `daprd` as the `--app-id` arg. Similarly:
- the `--app-port` from the CLI, which represents the port on the app that `daprd` will use to communicate with it has been passed into the `--app-port` arg.
- the `--port` arg from the CLI, which represents the http port that daprd is listening on is passed into the `--dapr-http-port` arg. (Note to specify grpc instead you can use `--grpc-port`). If it's not specified, it will be -1 which means the Dapr CLI will chose a random free port. Below, it's 43693, yours will vary.