Adding documentation for examples - #137
marcosreyes05 wants to merge 0 commit into
Conversation
| * 2. cd to [repo-root]/examples | ||
| * 3. Run : | ||
| * dapr run --app-id inputbinding --app-port 3000 --port 3005 -- mvn exec:java -Dexec.mainClass=io.dapr.examples.bindings.http.InputBindingExample -Dexec.args="-p 3000" | ||
| * dapr run --app-id inputbinding --app-port 3000 --port 3005 -- mvn exec:java -D exec.mainClass=io.dapr.examples.bindings.http.InputBindingExample -D exec.args="-p 3000" |
There was a problem hiding this comment.
Command does not work because class is still in the old package name.
| * 2. cd to [repo-root]/examples | ||
| * 3. Run the program: | ||
| * dapr run --app-id outputbinding --port 3006 -- mvn exec:java -Dexec.mainClass=io.dapr.examples.bindings.http.OutputBindingExample | ||
| * dapr run --app-id outputbinding --port 3006 -- mvn exec:java -D exec.mainClass=io.dapr.examples.bindings.http.OutputBindingExample |
There was a problem hiding this comment.
Wrong package name here too.
| @@ -0,0 +1,130 @@ | |||
| # Dapr Bindings Sample | |||
|
|
|||
| In this sample, we'll create two java applications: An output binding application and an input binding application, using Dapr Java SDK. | |||
| # Dapr Bindings Sample | ||
|
|
||
| In this sample, we'll create two java applications: An output binding application and an input binding application, using Dapr Java SDK. | ||
| This sample includes two applications: |
There was a problem hiding this comment.
Only enumerate the main classes. Controller should be described separately.
|
|
||
| ## Binding sample using the Java-SDK | ||
|
|
||
| This sample uses the capabilities provided in Dapr Java SDK for invoking bindings. Default implementation for binding event system is Kafka but others are also available. |
There was a problem hiding this comment.
"for publishing bindings"
|
|
||
| ## Remote invocation using the Java-SDK | ||
|
|
||
| This sample uses the Client provided in Dapr Java SDK for exposing and invoking a remote method. |
There was a problem hiding this comment.
For exposing the endpoint, it is not using the SDK anymore. We are using Springboot but not the SDK directly.
There was a problem hiding this comment.
For invoking we still use the SDK.
| // If port string is not valid, it will throw an exception. | ||
| int port = Integer.parseInt(cmd.getOptionValue("port")); | ||
|
|
||
| DaprApplication.start(port); |
There was a problem hiding this comment.
Explain what this command does and what the DaprApplication class does.
| */ | ||
|
|
||
| package io.dapr.examples.pubsub.http; | ||
| package io.dapr.examples.pubsub; |
There was a problem hiding this comment.
This example will become http specific again.
|
|
||
| Messages have been published in the topic. | ||
|
|
||
| ### Running the subscriber |
There was a problem hiding this comment.
I would imagine that the subscriber would run first.
|
|
||
| ### Running the subscriber | ||
|
|
||
| The other component is the subscriber. It will subscribe to the same topic used by the publisher and read the messages previously published. The Subscriber uses the Spring Boot´s DaprApplication class for initializing the `SubscriberController`. In `Subscriber.java` file, you will find the `Subscriber` class and the `main` method. See the code snippet below: |
There was a problem hiding this comment.
Because it refers to SpringBoot now, it is http-specific again.
Description
Adding documentation for examples
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #[37] #[36] #[87]
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: