Skip to content

Commit e78d70a

Browse files
authored
Improve Java client documentation (#218)
* docs: improve java client documentation * docs: revised after feedback * docs: revised feature matrix
1 parent c8f53fc commit e78d70a

File tree

3 files changed

+38
-16
lines changed

3 files changed

+38
-16
lines changed

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

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,56 @@ 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 missing in the Java client. The Cadence development team aims for feature parity between the two clients, with new features typically being implemented in cadence-go-client first.
46+
47+
### Feature Comparison
48+
49+
| Feature | Go Client | Java Client | Issue |
50+
|--------------------------------------------------------|-----------|-------------|-------|
51+
| **Up to Date Samples** | Supported | No | [Link](https://github.com/cadence-workflow/cadence-java-samples/issues) |
52+
| **Customer provided context propagator** | Supported | No | |
53+
| **Poller autoscale** | Supported | No | |
54+
| **Auto heartbeat[^auto-heartbeat]** | Supported | No | |
55+
| **Jitter start** | Supported | No | |
56+
| **Sessions (sticky activity workers)[^sticky]** | Supported | No | |
57+
| **List all queries supported for a given workflow** | Supported | No | |
58+
59+
60+
[^auto-heartbeat]: heartbeating in java is simple to implement and might be better for end user to determine which type of heart beating is better for the use case rather than add a generic auto-heartbeat mechanism to the client.
61+
[^sticky]: feature needs more traction in order to prioritize

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)