Skip to content

Commit 2f7f44a

Browse files
committed
docs: improve java client documentation
1 parent 3e0b66a commit 2f7f44a

File tree

3 files changed

+55
-16
lines changed

3 files changed

+55
-16
lines changed

docs/04-java-client/01-client-overview.md

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,73 @@ permalink: /docs/java-client/client-overview
66

77
# Client SDK Overview
88

9-
- Samples: [https://github.com/cadence-workflow/cadence-java-samples](https://github.com/cadence-workflow/cadence-java-samples)
10-
- JavaDoc documentation: [https://www.javadoc.io/doc/com.uber.cadence/cadence-client](https://www.javadoc.io/doc/com.uber.cadence/cadence-client)
9+
- [Cadence Java Samples](https://github.com/cadence-workflow/cadence-java-samples)
10+
- [JavaDoc documentation](https://javadoc.io/doc/com.uber.cadence/cadence-client)
1111

12-
## [JavaDoc Packages](https://www.javadoc.io/doc/com.uber.cadence/cadence-client/latest/index.html)
13-
### com.uber.cadence.activity
12+
### [com.uber.cadence.activity](https://javadoc.io/doc/com.uber.cadence/cadence-client/latest/com/uber/cadence/activity/Activity.html)
1413
APIs to implement activity: accessing activity info, or sending heartbeat.
1514

16-
### com.uber.cadence.client
17-
APIs for external application code to interact with Cadence workflows: start workflows, send signals or query workflows.
15+
### [com.uber.cadence.client](https://javadoc.io/doc/com.uber.cadence/cadence-client/latest/com/uber/cadence/client/package-summary.html)
16+
Client to the Cadence service used to start and query workflows by external processes
1817

19-
### com.uber.cadence.workflow
18+
### [com.uber.cadence.workflow](https://javadoc.io/doc/com.uber.cadence/cadence-client/latest/com/uber/cadence/workflow/Workflow.html)
2019
APIs to implement workflows.
2120

22-
### com.uber.cadence.worker
21+
### [com.uber.cadence.worker](https://javadoc.io/doc/com.uber.cadence/cadence-client/latest/com/uber/cadence/worker/package-summary.html)
2322
APIs to configure and start workers.
2423

25-
### com.uber.cadence.testing
24+
### [com.uber.cadence.testing](https://javadoc.io/doc/com.uber.cadence/cadence-client/latest/com/uber/cadence/testing/package-summary.html)
2625
APIs to write unit tests for workflows.
2726

28-
## [Samples](https://github.com/cadence-workflow/cadence-java-samples/tree/master/src/main/java/com/uber/cadence/samples)
29-
### com.uber.cadence.samples.hello
27+
## Cadence Java Samples
28+
### [com.uber.cadence.samples.hello](https://github.com/cadence-workflow/cadence-java-samples/tree/master/src/main/java/com/uber/cadence/samples/hello)
3029
Samples of how to use the basic feature: activity, local activity, ChildWorkflow, Query, etc.
3130
This is the most important package you need to start with.
32-
### com.uber.cadence.samples.bookingsaga
31+
### [com.uber.cadence.samples.bookingsaga](https://github.com/cadence-workflow/cadence-java-samples/tree/master/src/main/java/com/uber/cadence/samples/bookingsaga)
3332
An end-to-end example to write workflow using SAGA APIs.
34-
### com.uber.cadence.samples.fileprocessing
33+
### [com.uber.cadence.samples.fileprocessing](https://github.com/cadence-workflow/cadence-java-samples/tree/master/src/main/java/com/uber/cadence/samples/fileprocessing)
3534
An end-to-end example to write workflows to download a file, zips it, and uploads it to a destination.
3635

3736
An important requirement for such a workflow is that while a first activity can run
3837
on any host, the second and third must run on the same host as the first one. This is achieved
3938
through use of a host specific task list. The first activity returns the name of the host
4039
specific task list and all other activities are dispatched using the stub that is configured with
4140
it. This assumes that FileProcessingWorker has a worker running on the same task list.
41+
42+
43+
## Differences between Java and Golang Clients
44+
45+
While many features are already supported in the Cadence Golang client, some features are still missing in the Java client. The Cadence development team aims for feature parity between the two clients, with new features typically being implemented in Golang first.
46+
47+
### Feature Comparison
48+
49+
| Feature | Go Client | Java Client | Priority |
50+
|-----------------------------------------------------------|----------------|---------------|----------|
51+
| **Shadow tests** | Supported | No | P0 |
52+
| **Async APIs** | Supported | Supported | P0 |
53+
| **Up to Date Samples** | Supported | No | P0 |
54+
| **SonarQube integration for Java client library** | Supported | No | P0 |
55+
| **Client emitted metrics** | Supported | No | P0 |
56+
| **Same request ID for retries** | Supported | No | P0 |
57+
| **Cadence canary alerting** | Supported | No | P0 |
58+
| **Context propagator** | Supported | No | P1 |
59+
| **Customer provided context propagator** | Supported | No | P1 |
60+
| **Poller autoscale** | Supported | No | P2 |
61+
| **Auto heartbeat** | Supported | No | - |
62+
| **Jitter start** | Supported | No | - |
63+
| **Migrate from tchannel to gRPC** | Supported | No | P2 |
64+
| **Missing methods** | Supported | No | P2 |
65+
| **Sessions (sticky activity workers)** | Supported | No | P4 |
66+
| **List all queries supported for a given workflow** | Supported | No | P2 |
67+
68+
### Notes:
69+
70+
1. **P0 (Critical)**: These features are crucial for the Java client and should be prioritized.
71+
2. **P1 (High)**: These features are important for enhancing the Java client.
72+
3. **P2 (Medium)**: Features that would improve the experience but are not critical.
73+
4. **P4 (Low)**: These features have lower priority for now.
74+
75+
### Additional Notes:
76+
- The Java client lacks several advanced features, such as shadow tests and client-emitted metrics, which are currently only supported in the Go client.
77+
- Some features, like "Async APIs" are already supported in the Java client.
78+
- Sessions (sticky activity workers) is currently deprioritized

docs/04-java-client/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ permalink: /docs/java-client
1010
The following are important links for the Cadence Java client:
1111

1212

13-
- GitHub project: [https://github.com/cadence-workflow/cadence-java-client](https://github.com/cadence-workflow/cadence-java-client)
14-
- Samples: [https://github.com/cadence-workflow/cadence-java-samples](https://github.com/cadence-workflow/cadence-java-samples)
15-
- JavaDoc documentation: [https://www.javadoc.io/doc/com.uber.cadence/cadence-client](https://www.javadoc.io/doc/com.uber.cadence/cadence-client)
13+
- [Java Client repository](https://github.com/cadence-workflow/cadence-java-client)
14+
- [Java samples repository](https://github.com/cadence-workflow/cadence-java-samples)
15+
- [JavaDoc documentation](https://www.javadoc.io/doc/com.uber.cadence/cadence-client)
1616

1717

1818
Add *cadence-client* as a dependency to your *pom.xml*:

docusaurus.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ const config: Config = {
5656
// Remove this to remove the "edit this page" links.
5757
editUrl:
5858
'https://github.com/cadence-workflow/Cadence-Docs/tree/master/',
59+
showLastUpdateAuthor: true,
60+
showLastUpdateTime: true,
5961
remarkPlugins: [glossary],
6062
} satisfies DocsOptions,
6163
blog: {

0 commit comments

Comments
 (0)