-
Notifications
You must be signed in to change notification settings - Fork 42
EDU 1942: Improve Pub/Sub Java Readme #1088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe README.md file was extensively revised, transforming it from a detailed usage manual with embedded code samples and API documentation into a concise overview. The new README emphasizes key features, supported platforms, proxy support, and reference links, while adding contribution, release, and support sections and removing most in-depth usage content. Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
52bf41b to
82826c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution
Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 1
🧹 Nitpick comments (5)
README.md (5)
1-5: Standardize “real-time” spelling
For consistency and readability, hyphenate “real-time” instead of “realtime” in the title and intro.- # Ably Pub/Sub Java SDK + # Ably Pub/Sub Java SDK - Build any realtime experience using Ably’s Pub/Sub Java SDK. Supported on all popular platforms and frameworks, including Kotlin and Android. + Build any real-time experience using Ably’s Pub/Sub Java SDK. Supported on all popular platforms and frameworks, including Kotlin and Android. - Ably Pub/Sub provides flexible APIs that deliver features such as pub-sub messaging, message history, presence, and push notifications. Utilizing Ably’s realtime messaging platform, applications benefit from its highly performant, reliable, and scalable infrastructure. + Ably Pub/Sub provides flexible APIs that deliver features such as pub-sub messaging, message history, presence, and push notifications. Utilizing Ably’s real-time messaging platform, applications benefit from its highly performant, reliable, and scalable infrastructure.
12-20: Unify unordered list style
The “Getting started” list uses a dash (-) instead of an asterisk (*), which is inconsistent with the other lists.- - [Quickstart in Pub/Sub using Java](https://ably.com/docs/getting-started/quickstart?lang=java) + * [Quickstart in Pub/Sub using Java](https://ably.com/docs/getting-started/quickstart?lang=java)🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
18-18: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
22-24: Clarify compatibility issue channels
Consider adding a direct link to the GitHub issues page to guide users on where to report compatibility problems, e.g.:- If you experience any compatibility issues, open an issue in the repository or contact [Ably support](https://ably.com/support). + If you encounter compatibility issues, please open an issue on GitHub at https://github.com/ably/ably-java/issues or contact [Ably support](https://ably.com/support).
26-35: Improve table consistency and placeholders
- Punctuation at the end of each cell should be consistent (either include or omit periods).
- Replace “??” placeholders with “TBC” or the actual version once confirmed.
-| Java | >=8 (JRE 1.8 or later). | +| Java | >=8 (JRE 1.8 or later) | -| Kotlin | >= 2.1.10 | +| Kotlin | >= 2.1.10 | -| Android | >=4.4 (API level 19). | +| Android | >=4.4 (API level 19) | -| Clojure | ?? | -| Scala | ?? | +| Clojure | TBC | +| Scala | TBC |
114-118: Enhance support section with GitHub issues
Users reporting bugs or tracking known issues often look to GitHub. Consider adding:- For help or technical support, visit Ably's [support page](https://ably.com/support). + For help or technical support, visit Ably's [support page](https://ably.com/support). + To report bugs or track known issues, see our [GitHub Issues](https://github.com/ably/ably-java/issues).
🛑 Comments failed to post (1)
README.md (1)
110-112:
⚠️ Potential issueFix changelog link for Java SDK
The current link points toably-js; it should reference this Java repository’s changelog.- The [CHANGELOG.md](/ably/ably-js/blob/main/CHANGELOG.md) contains details... + The [CHANGELOG.md](/ably/ably-java/blob/main/CHANGELOG.md) contains details...📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.## Releases The [CHANGELOG.md](/ably/ably-java/blob/main/CHANGELOG.md) contains details of the latest releases for this SDK. You can also view all Ably releases on [changelog.ably.com](https://changelog.ably.com).🧰 Tools
🪛 LanguageTool
[uncategorized] ~112-~112: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ly. --- ## Releases The CHANGELOG.md contains detail...(HYPHENATED_LY_ADVERB_ADJECTIVE)
[style] ~112-~112: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...so view all Ably releases on changelog.ably.com. --- ...(ADVERB_REPETITION_PREMIUM)
🤖 Prompt for AI Agents
In README.md around lines 110 to 112, the changelog link incorrectly points to the ably-js repository. Update the URL in the markdown link to reference the Java SDK repository's CHANGELOG.md file instead, ensuring it directs users to the correct changelog for the Java SDK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (5)
README.md (5)
3-5: Use hyphenated "real-time" for consistency
The term "realtime" is more commonly written as "real-time" in our docs (e.g., “Build any real-time experience…”). Consider updating to maintain consistency with Ably’s style guide.
9-11: Link to Java-specific documentation
The "Find out more" section currently points to generic Pub/Sub docs and examples. To provide a smoother Java onboarding, consider linking directly to the Java API reference and Java-specific examples (if available).
18-18: Unify unordered list markers
This list item uses a dash (-), while other lists use an asterisk (*). For consistency, pick one style across the README (e.g., switch to*).🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
18-18: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
28-30: Remove trailing period in table cell
The "Java" row ends with a period inside the cell ((JRE 1.8 or later).), whereas other rows do not. It’s best to drop the trailing period for consistent table styling:-| Java | >=8 (JRE 1.8 or later). | +| Java | >=8 (JRE 1.8 or later) |
104-106: Section heading: "Contributing" vs "Contribute"
The heading currently reads "## Contribute". It may be clearer to follow GitHub conventions and rename it to "## Contributing" to match the linkedCONTRIBUTING.md.🧰 Tools
🪛 LanguageTool
[misspelling] ~106-~106: Did you mean “too”?
Context: ...NTRIBUTING.md) guidelines to contribute to Ably. --- ## Releases The [CHANGELOG...(TO_TOO)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md(3 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md
18-18: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
🪛 LanguageTool
README.md
[misspelling] ~106-~106: Did you mean “too”?
Context: ...NTRIBUTING.md) guidelines to contribute to Ably. --- ## Releases The [CHANGELOG...
(TO_TOO)
[uncategorized] ~112-~112: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ly. --- ## Releases The CHANGELOG.md contains detail...
(HYPHENATED_LY_ADVERB_ADJECTIVE)
[style] ~112-~112: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...so view all Ably releases on changelog.ably.com. --- ...
(ADVERB_REPETITION_PREMIUM)
⏰ Context from checks skipped due to timeout of 90000ms (10)
- GitHub Check: check-realtime-okhttp
- GitHub Check: check-rest-okhttp
- GitHub Check: build
- GitHub Check: check-realtime
- GitHub Check: check-rest
- GitHub Check: check
- GitHub Check: check (21)
- GitHub Check: check (19)
- GitHub Check: check (29)
- GitHub Check: check (24)
🔇 Additional comments (1)
README.md (1)
34-35: Confirm or remove placeholder entries
The Clojure and Scala support rows are marked with??. Please verify the minimum supported versions or remove these rows until the information is available.
d7061bd to
4d1c109
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
README.md (1)
110-110: Fix incorrect CHANGELOG link for Java SDK.
The link currently points to the JavaScript repo’s changelog. It should reference the Java SDK’s changelog:-The [CHANGELOG.md](/ably/ably-js/blob/main/CHANGELOG.md) +The [CHANGELOG.md](/ably/ably-java/blob/main/CHANGELOG.md)🧰 Tools
🪛 LanguageTool
[uncategorized] ~110-~110: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ly. --- ## Releases The CHANGELOG.md contains detail...(HYPHENATED_LY_ADVERB_ADJECTIVE)
[style] ~110-~110: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...so view all Ably releases on changelog.ably.com. --- ...(ADVERB_REPETITION_PREMIUM)
🧹 Nitpick comments (2)
README.md (2)
14-14: Maintain consistent heading capitalization.
Headings such as “## Getting started” use sentence case, while others vary between sentence and title case. Align all headings to a single style (e.g., Title Case: “Getting Started”) for consistency.
16-18: Use consistent markdown list markers.
markdownlint-cli2 flags an unordered list style here (MD004). Please standardize list markers across the document (e.g., use*instead of-) to adhere to your chosen convention.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
18-18: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md(3 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md
18-18: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
🪛 LanguageTool
README.md
[misspelling] ~104-~104: Did you mean “too”?
Context: ...NTRIBUTING.md) guidelines to contribute to Ably. --- ## Releases The [CHANGELOG...
(TO_TOO)
[uncategorized] ~110-~110: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ly. --- ## Releases The CHANGELOG.md contains detail...
(HYPHENATED_LY_ADVERB_ADJECTIVE)
[style] ~110-~110: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...so view all Ably releases on changelog.ably.com. --- ...
(ADVERB_REPETITION_PREMIUM)
⏰ Context from checks skipped due to timeout of 90000ms (10)
- GitHub Check: check
- GitHub Check: check (24)
- GitHub Check: check (19)
- GitHub Check: check (29)
- GitHub Check: check (21)
- GitHub Check: check-realtime
- GitHub Check: check-rest
- GitHub Check: check-rest-okhttp
- GitHub Check: check-realtime-okhttp
- GitHub Check: build
🔇 Additional comments (3)
README.md (3)
3-5: Clarify supported platforms claim and ensure completeness.
The intro states the SDK is “Supported on all popular platforms and frameworks, including Kotlin and Android,” but the actual table only lists Java, Kotlin, Android, and proxy support. Clojure and Scala are mentioned in the PR summary as pending—yet they’re not reflected here. Please confirm and update the intro or the platform table to accurately reflect which languages are supported.
22-33: Validate supported platforms table and placeholder entries.
If Clojure and Scala support details remain pending, consider adding placeholder rows or a “Coming soon” note in the Supported Platforms table to set expectations, rather than implying full support visually.
114-117: Inconsistent with PR summary: Support section should be removed.
The PR summary mentions the Support section was removed entirely, yet “## Support and known issues” is still present. Please confirm whether this section should be retained or dropped.Likely an incorrect or invalid review comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
README.md (1)
108-112:⚠️ Potential issueFix incorrect CHANGELOG link to Java SDK repository
The link currently points to theably-jsrepository. It should reference the Java SDK's changelog:- The [CHANGELOG.md](/ably/ably-js/blob/main/CHANGELOG.md) contains details of the latest releases for this SDK. + The [CHANGELOG.md](/ably/ably-java/blob/main/CHANGELOG.md) contains details of the latest releases for this SDK.🧰 Tools
🪛 LanguageTool
[uncategorized] ~110-~110: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ly. --- ## Releases The CHANGELOG.md contains detail...(HYPHENATED_LY_ADVERB_ADJECTIVE)
[style] ~110-~110: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...so view all Ably releases on changelog.ably.com. --- ...(ADVERB_REPETITION_PREMIUM)
🧹 Nitpick comments (2)
README.md (2)
18-18: Unify list bullet style for consistency
The list under "Getting started" uses a dash (-) whereas other lists use an asterisk (*). Consider using*throughout to maintain consistent markdown list styling.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
18-18: Unordered list style
Expected: asterisk; Actual: dash(MD004, ul-style)
35-37: Replace Azure-style admonition with GitHub Markdown blockquote
GitHub-flavored Markdown doesn’t render[!IMPORTANT]admonitions. To ensure this deprecation warning is visible across GitHub and other Markdown renderers, replace it with a standard blockquote heading. For example:- > [!IMPORTANT] - > SDK versions < 1.2.35 will be [deprecated](https://ably.com/docs/platform/deprecate/protocol-v1) from November 1, 2025. + > **IMPORTANT:** SDK versions < 1.2.35 will be [deprecated](https://ably.com/docs/platform/deprecate/protocol-v1) from November 1, 2025.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md(3 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md
18-18: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
🪛 LanguageTool
README.md
[misspelling] ~104-~104: Did you mean “too”?
Context: ...NTRIBUTING.md) guidelines to contribute to Ably. --- ## Releases The [CHANGELOG...
(TO_TOO)
[uncategorized] ~110-~110: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ly. --- ## Releases The CHANGELOG.md contains detail...
(HYPHENATED_LY_ADVERB_ADJECTIVE)
[style] ~110-~110: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...so view all Ably releases on changelog.ably.com. --- ...
(ADVERB_REPETITION_PREMIUM)
⏰ Context from checks skipped due to timeout of 90000ms (10)
- GitHub Check: check-rest
- GitHub Check: check-realtime
- GitHub Check: check-realtime-okhttp
- GitHub Check: check-rest-okhttp
- GitHub Check: build
- GitHub Check: check (21)
- GitHub Check: check
- GitHub Check: check (19)
- GitHub Check: check (24)
- GitHub Check: check (29)
🔇 Additional comments (1)
README.md (1)
114-117: Verify support section inclusion against PR objectives
The PR summary indicates the support section was removed entirely, but “Support and known issues” remains here. Please confirm whether this section should stay or be removed to align with the PR goals.
ttypic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, with couple of small comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
README.md (1)
112-114: Incorrect changelog link
This still points to theably-jsrepository rather thanably-java. Update as follows:- The [CHANGELOG.md](/ably/ably-js/blob/main/CHANGELOG.md) contains details of the latest releases for this SDK. + The [CHANGELOG.md](/ably/ably-java/blob/main/CHANGELOG.md) contains details of the latest releases for this SDK.
🧹 Nitpick comments (2)
README.md (2)
19-23: Use consistent list syntax.
The unordered list under “Getting started” uses-but our markdownlint config expects*.- - [Quickstart in Pub/Sub using Java](https://ably.com/docs/getting-started/quickstart?lang=java) + * [Quickstart in Pub/Sub using Java](https://ably.com/docs/getting-started/quickstart?lang=java)
35-37: Fix typo in compatibility note.
Correct the misspelling of “compatibilit.” to “compatibility.”-| Kotlin | All versions (>= 0.0.1 supported), but we recommend >= 1.8 for best compatibilit. | +| Kotlin | All versions (>= 0.0.1 supported), but we recommend >= 1.8 for best compatibility. |
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
images/javaSDK-github.pngis excluded by!**/*.png
📒 Files selected for processing (1)
README.md(3 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md
23-23: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
🪛 LanguageTool
README.md
[misspelling] ~108-~108: Did you mean “too”?
Context: ...NTRIBUTING.md) guidelines to contribute to Ably. --- ## Releases The [CHANGELOG...
(TO_TOO)
[uncategorized] ~114-~114: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ly. --- ## Releases The CHANGELOG.md contains detail...
(HYPHENATED_LY_ADVERB_ADJECTIVE)
[style] ~114-~114: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...so view all Ably releases on changelog.ably.com. --- ...
(ADVERB_REPETITION_PREMIUM)
⏰ Context from checks skipped due to timeout of 90000ms (11)
- GitHub Check: check
- GitHub Check: check-liveobjects
- GitHub Check: check-realtime
- GitHub Check: check-realtime-okhttp
- GitHub Check: check-rest-okhttp
- GitHub Check: check-rest
- GitHub Check: check (29)
- GitHub Check: check (19)
- GitHub Check: check (24)
- GitHub Check: check (21)
- GitHub Check: build
🔇 Additional comments (10)
README.md (10)
1-4: Header and badges look good.
The branding image and version/license badges provide clear context for the SDK.
6-6: No changes needed here.
The title is concise and accurately reflects the SDK.
8-10: Introduction is concise and informative.
The overview clearly highlights the SDK’s purpose and benefits.
12-15: "Find out more" links are relevant and correctly formatted.
They point to the right high-level resources without redundancy.
27-31: Supported platforms section is clear and helpful.
The compatibility matrix is easy to scan and understand.
39-41: Deprecation callout is informative and clear.
No adjustments needed.
44-47: Proxy support section intro is clear.
It succinctly explains why and when to configure a proxy.
48-102: Example code for proxy setup is comprehensive and well-structured.
The OkHttp integration snippet is easy to follow and complete.
106-108: No changes needed here.
The contributing guide link is correct.
118-120: Inconsistent with PR summary
The PR description states the Support section was removed, but it remains here. Should it be retained or dropped?Likely an incorrect or invalid review comment.
f7cd908 to
8bae487
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
README.md (3)
22-23: Inconsistent unordered-list markers
-is used here while*is used elsewhere (e.g., l 13-14). Pick one style across the document to silence MD004 and avoid visual drift.- - [Quickstart in Pub/Sub using Java](https://ably.com/docs/getting-started/quickstart?lang=java) - * [SDK Setup for Java.](https://ably.com/docs/getting-started/setup?lang=java) + * [Quickstart in Pub/Sub using Java](https://ably.com/docs/getting-started/quickstart?lang=java) + * [SDK Setup for Java](https://ably.com/docs/getting-started/setup?lang=java)
48-49: Remove trailing colons in headings
Install for Maven:andInstall for Gradle:trigger MD026. The colons add no value and can be dropped.-### Install for Maven: +### Install for Maven ... -### Install for Gradle: +### Install for GradleAlso applies to: 58-59
82-97: Add missing import in usage exampleThe example references
Channelbut does not import it, so copy-pasting will not compile.-import io.ably.lib.realtime.AblyRealtime; -import io.ably.lib.types.ClientOptions; +import io.ably.lib.realtime.AblyRealtime; +import io.ably.lib.realtime.Channel; +import io.ably.lib.types.ClientOptions;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md(3 hunks)
🧰 Additional context used
🧠 Learnings (1)
README.md (2)
Learnt from: sacOO7
PR: ably/ably-java#1095
File: gradle/libs.versions.toml:24-26
Timestamp: 2025-06-05T10:27:53.946Z
Learning: The ably-java project prefers to use the latest available versions of testing dependencies (including pre-release versions) when they contain relevant bug fixes, rather than sticking strictly to stable releases.
Learnt from: sacOO7
PR: ably/ably-java#1095
File: live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt:87-89
Timestamp: 2025-06-06T09:28:12.298Z
Learning: The Sandbox.kt file in ably-java live-objects module already has comprehensive HTTP retry mechanism using HttpRequestRetry with 5 retries, exponential backoff, and automatic retry on non-success responses and timeout exceptions.
🪛 markdownlint-cli2 (0.17.2)
README.md
22-22: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
48-48: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
58-58: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
🪛 LanguageTool
README.md
[style] ~177-~177: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...so view all Ably releases on changelog.ably.com. --- ...
(ADVERB_REPETITION_PREMIUM)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: check (21)
- GitHub Check: check (29)
- GitHub Check: check (19)
- GitHub Check: check (24)
- GitHub Check: check-liveobjects
- GitHub Check: build
- GitHub Check: check-rest-okhttp
- GitHub Check: check-realtime-okhttp
- GitHub Check: check
- GitHub Check: check-realtime
- GitHub Check: check-rest
🔇 Additional comments (1)
README.md (1)
1-1: Verify header image path
images/javaSDK-github.pngmay break if the file isn’t shipped to npm/pypi artefacts or moved during doc hosting. Please check that it renders correctly on GitHub and any generated site.
eccf4c7 to
214c8b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
README.md (1)
50-55: Example pins deprecated version 1.2.22 — still contradicts deprecation notice
Versions < 1.2.35 are flagged for deprecation (l. 39-40) yet both snippets still use 1.2.22. Either bump to ≥ 1.2.35 or omit the version entirely and instruct users to pull the latest from Maven Central.Also applies to: 60-62
🧹 Nitpick comments (3)
README.md (3)
22-23: Unify bullet-list style in “Getting started” sectionThe list mixes “-” and “”, triggering MD004 and looking untidy. Pick one marker for consistency (the repo generally uses “”).
-22 - [Quickstart in Pub/Sub using Java](https://ably.com/docs/getting-started/quickstart?lang=java) -* [SDK Setup for Java.](https://ably.com/docs/getting-started/setup?lang=java) +* [Quickstart in Pub/Sub using Java](https://ably.com/docs/getting-started/quickstart?lang=java) +* [SDK Setup for Java](https://ably.com/docs/getting-started/setup?lang=java)
48-58: Remove trailing colons from heading linesHeadings “Install for Maven:” and “Install for Gradle:” end with “:”, violating MD026 and breaking the style used elsewhere.
-### Install for Maven: +### Install for Maven … -### Install for Gradle: +### Install for Gradle
71-72: Align API-key placeholder between snippetsSnippet 1 uses the variable
apiKey; snippet 2 hard-codes"your-ably-api-key". Use the same placeholder string (or variable) in both to avoid confusion.-71 ClientOptions options = new ClientOptions(apiKey); +71 ClientOptions options = new ClientOptions("your-ably-api-key");Also applies to: 84-86
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
images/javaSDK-github.pngis excluded by!**/*.png
📒 Files selected for processing (1)
README.md(3 hunks)
🧰 Additional context used
🧠 Learnings (1)
README.md (3)
Learnt from: sacOO7
PR: ably/ably-java#1095
File: gradle/libs.versions.toml:24-26
Timestamp: 2025-06-05T10:27:53.946Z
Learning: The ably-java project prefers to use the latest available versions of testing dependencies (including pre-release versions) when they contain relevant bug fixes, rather than sticking strictly to stable releases.
Learnt from: sacOO7
PR: ably/ably-java#1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.
Learnt from: sacOO7
PR: ably/ably-java#1095
File: live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt:87-89
Timestamp: 2025-06-06T09:28:12.298Z
Learning: The Sandbox.kt file in ably-java live-objects module already has comprehensive HTTP retry mechanism using HttpRequestRetry with 5 retries, exponential backoff, and automatic retry on non-success responses and timeout exceptions.
🪛 markdownlint-cli2 (0.17.2)
README.md
22-22: Unordered list style
Expected: asterisk; Actual: dash
(MD004, ul-style)
48-48: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
58-58: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: check (29)
- GitHub Check: check (24)
- GitHub Check: check (19)
- GitHub Check: check (21)
- GitHub Check: check
- GitHub Check: check-liveobjects
- GitHub Check: check-realtime-okhttp
- GitHub Check: build
- GitHub Check: check-rest-okhttp
- GitHub Check: check-rest
- GitHub Check: check-realtime
ttypic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
* tests: Assert connection error code rather than message The error messages are subject to change, but the codes are not, so assert the code instead. Signed-off-by: Lewis Marshall <[email protected]> * ci: enable workflow_dispatch * Added attachOnSubscribe option to ChannelOptions * Added attachOnSubscribe check before implicit attach on channel subscribe * Added extra null channelOptions check while checking for attachOnSubscribe * Fixed spec annotations for the attachOnSubscribe usecases * Added tests for channel/presence subscribe without implicit attach * Refactored attachOnSubscribe code, spec and related tests as per rabbitcodeai comments * Bumped up library version, needed for new release * Updated CHANGELOG * chore: rearrange code before refactoring * chore: update gradle wrapper * refactor: decouple HTTP and WebSocket engines - Extracted HTTP calls and WebSocket listeners into a separate module. - Introduced an abstraction layer for easier implementation swapping. * feat: OkHttp implementation for making HTTP calls and WebSocket connections * feat: switch http client implementation based on gradle property * feat: add automatic test retries * chore: rename `isPingListenerSupported` method * fix: integration tests for OkHttp realtime tests * feat: introduced retry rules for flaky android push tests * docs: add http engine in-code docs Also add algorithm how to add new engine in the `CONTRIBUTING.md` guide * chore: bump version number * chore: update `CHANGELOG.md` * Fixed incorrect spec annotations used for channel message subscribe and related tests * Fixed presence subscribe when attachOnSubscribe=false, updated tests for the same * [ECO-5033] fix: race condition when calling`AblyRealtime#connect()` on terminated state * Removed finally block that closes ably client, instead used try with resources * chore: bump version number * chore: update `CHANGELOG.md` * Added missing channel state check cases for attach and detach * Added tests for channel state checks before attach and detach operations * Bumped up ably-java version to 1.2.45 * Updated CHANGELOG * [ECO-5139] feat: add `action` and `serial` fields Add 256 bit AES CBC encrypted variable length data generated by Java client library SDK (ably#49) * chore: bump version number * chore: update `CHANGELOG.md` * [ECO-5163] fix: duplicated messages because of duplicated attach message * chore: bump version number * chore: update `CHANGELOG.md` * chore: add manual release GitHub action * fix: temporary disable published release check * chore: update release job compare `VERSION_NAME` and tag before publishing * [ECO-5172][RTL13] Fix existing impl. for server sent DETACH 1. Removed use of explicitly setting detached state 2. Fixed attachWithTimeout method call, set forcedAttach flag to true 3. Updated tests to track channel state changes on server sent DETACH * [ECO-5117][RTL5] Fix missing spec implementation for channel detach (RTL5g) 1. Added missing callCompletionListenerError when detachImpl throws exception on invalid connection state 2. Added separate test case for the spec RTL5g 3. Annotated channel detach tests with appropriate spec * MessageAction enum changes per ably/specification#263 * [ECO-5117][RTL13a] Fixed channel ATTACHING event detach err 1. Updated `attachWithTimeout` and `attachImpl` method to accept attachReason param 2. Updated test assertions for spec RTL13a accordingly * chore: bump version number * chore: update `CHANGELOG.md` * [ECO-5193][TM*] Updated innner Message class 1. Added missing fields for refSerial, refType and Operation 2. Added serialization and deserialization for above fields using msgpack 3. Added serialization and deserialization for above fields using gson * [ECO-5193][TM*] Added unit tests to MessageTest 1. Added serializer test for fields refSerial, refType and Operation 2. Added deserializer test for fields refSerial, refType and Operation 3. Added msgpack unit test for Message class * [ECO-5193][TM*] Added test helper for Chat message edit, update and delete 1. Added ChatRoom class that provides methods tosend, update and delete the given messsage 2. Added test to check for message publish using REST API * [ECO-5193][TM*] Updated Message.java 1. Changed metadata type from Map<String, String> to JsonObject, 2. Updated relevant tests, added missing assertions * [ECO-5193][TM*] Updated ChaneMessagesTest.java 1. Added test to check for updated room message * [ECO-5193][TM*] Updated Message.java 1. Reverted operation metadata to hashmap<string, string> 2. Updated relevant tests for the same * [ECO-5193][TM*] Updated ChaneMessagesTest.java - Updated assertions for test_room_message_is_updated test - Added assertions to check if operation field is populated properly with clientId, description and metadata * [ECO-5193][TM*] Updated ChaneMessagesTest.java, implemented message delete test * [ECO-5193][TM*] Updated ChaneMessagesTest.java 1. Implemented integration test for message create, update and delete serially. 2. Implemented integration test to check for allowed ops on deleted message. * [ECO-5193][TM*] Fixed Message.Operation.write method for msgpack, updated ChatRoom public methods * chore: upgrade github actions versions * bumped up version to 1.2.49 * Updated CHANGELOG * docs: update CONTRIBUTING.md guide for releasing process * feat: kotlin wrapper for `ably-java` and `ably-android` This is the initial version of the Kotlin wrapper for `ably-java` and `ably-android`. The main goal is to provide an extendable public interface for the Ably PubSub SDK (the core SDK for Chat and other products). This wrapper SDK is the first step toward modernizing our libraries. It introduces a set of interfaces that can be modified, for example, to inject agent information or other data when used within new product SDKs. Note: In this PR we are not going to provide fully updated and idiomatic public API for `ably-java` and `ably-android`, this is the initial step of public API modernization, we will continue working on this. * feat: Rest and Realtime clients adapters Adapters for the Kotlin API for `ably-java` and `ably-android` * chore: interface update - make ErrorReason on the channel nullable - improve docstrings * Implement TM2p change (no message version populating from channelmessage) Implements ably/specification#275 * [CHAT-5063] feat: sdk proxy wrapper for agent tracking (java) - we introduced several package-private methods that make it possible to use custom http module to invoke Rest API We want to be able to distinguish requests made inside the wrapper from those made by the core PubSub SDK without the wrapper, allowing us to track agents across wrapper SDKs such as the Chat SDK or Asset Tracking. To achieve this, we introduce special proxy Realtime and Rest clients that inject additional agents parameters into the underlying SDK. * [CHAT-5063] feat: add `createWrapperSdkProxy` for kotlin adapters SDKs Special `SdkWrapperCompatible` introduced, allowing us to hide `createWrapperSdkProxy` from the public interface and use extension function instead * [CHAT-5063] feat: inject agents into `ChannelOptions` as well * [CHAT-5063] feat: add tests for agent propagation Add tests to verify agent propagation in the WrapperSdkProxy clients * [CHAT-5063] refactor: make implicit calls overrides instead of patching client * [CHAT-5228] fix: add lombok to ProGuard rules We use Lombok for code generation but Lombok itself should not be included in the final APK. Effect of `-dontwarn lombok.**`: - It tells ProGuard to ignore missing Lombok classes, preventing unnecessary warnings. - This avoids potential build failures when ProGuard is set to treat warnings as errors. * [CHAT-5063] feat: expose unwrapped java classes in the adapter * chore: bump version number * chore: update `CHANGELOG.md` * chore: turn on `explicitApi` for kotlin module Although the `pubsub-adapter` module is currently completely internal and not ready to be exposed, we expect this to change. That’s why we plan to provide a well-designed public API while ensuring that unnecessary details remain hidden. * fix: wrap unhandled request exceptions into `AblyException` During the `HttpCore` refactoring, some exceptions that were previously wrapped in checked `AblyException` exceptions were instead wrapped in `RealtimeException`. As a result, code that handled these exceptions may behave differently, since checked exceptions ensure that an exception handler is in place. This commit restores the original behavior * [ECO-5248] fix: make query params URL encoded Fixed inconsistent encoding/decoding in HTTP requests. Value of `Param` object shouldn't be URL encoded, but if it used in as query params it should be URL encoded in the request. * [ECO-5246] fix: Realtime Client Reconnection Logic Previously, we cleared all channels on the close event, causing all previously acquired channels to become orphaned. We have now removed this logic and fixed the reconnection behavior to align with the spec * chore: bump version number * chore: update `CHANGELOG.md` * fix: deadlock in `WebSocket.close()` The `Java-WebSocket` library holds a lock while invoking listeners, and when a connection is terminated ungracefully, it can cause a deadlock. Here’s an explanation: - The **WebSocketLibrary**’s connection checker thread executes `WebSocket.close()`. - The **WebSocketLibrary** acquires a lock and starts invoking listeners while holding the lock. - The **WebSocketHandler** has an internal Timer that holds a lock on the handler. This Timer decides to close the connection as well and calls `WebSocket.close()` while holding the lock. - The **WebSocketLibrary** tries to dispose of the **Timer** but can’t because the **Timer** holds the lock. - The **Timer** tries to close the connection but can’t because the **WebSocketLibrary** still holds the lock. There are two issues here: 1. The **WebSocketLibrary** shouldn’t hold a lock while calling listeners. 2. The **Timer** shouldn’t hold a lock while calling `close()`. We can’t fix the first issue, which is why we need to address the second one. * chore: bump version number * chore: update `CHANGELOG.md` * Rename action META_OCCUPANCY->META ably/specification@35bbeb7 Technically a breaking change. We're not considering it such because `Message.action` was only introduced recently as part of the annotations/materialization work, which isn't yet part of a publicly released feature yet, and isn't added to our [main documentation](https://ably.com/docs/api/realtime-sdk/types#message). So it's just very unlikely that anyone is relying on the action yet. Our inband occupancy events docs still all say to use the message name, which is not changing. * Created and configured liveobjects as a separate module to the project 1. Declared required liveobject java interfaces 2. Implemented liveobject interface for LiveObjectsPlugin 3. Declared batch specific public interface methods * 1. Added jetbrains-annoations dependency to clearly define interface methods 2. Added internet connectivity check to test setup * 1. Updated public doc for LiveObjects, LiveMap and LiveCounter 2. Added live objects specific channel modes and flags to protocol message * 1. Added coroutinex as a runtime and test dependency to liveobjects 2. Added bridging interfaces to send and receive protocol messages 3. Added impl. for dispose method * 1. Added blocking and non-blocking annotations to sync and async methods 2. Removed liveobject batching operation specific interfaces * [ECO-5375] Refactored LiveObjects plugin to handle channelSerial * [ECO-5375] Created ObjectMessage.kt, declared data classes as per spec * [ECO-5375] Updated code as per review comments 1. Updated enum ObjectOperationAction with PascalCase values 2. Created separate file for adapter that extends LiveObjectsAdapter 3. Added custom Binary type to handle ByteArray values * [ECO-5375] Updated liveObjectsAdapter sendAsync method to use suspendCancellableCoroutine * [ECO-5338] Created tests package for liveobjects 1. Added test specific dependencies, updated junit, added mockk 2. Added test utils for mocking private classes, fields etc 3. Added IntegrationTest parameterized class along with sample test 4. Added sample unit test along with mocked realtime channel * [ECO-5338] Updated CI scripts to run liveobject plugin tests 1. Updated separate gradlew task for both unit and integration tests 2. Updated check.yml and integration-test.yml file to run respective tests * [ECO-5338] Fixed liveobject test dependency, utils as per review comments * [ECO-5338] Fixed liveobject test dependency 1. Fixed liveobject channel options while initializing test channel 2. Fixed test utils as per review comments 3. Fixed adapter NotNull annotation for send method * chore: delete git module since it's not used in ably-java * chore: fix access to ably-commons data * [ECO-5380] Added size method to ObjectMessage, core SDK Message 1. Added size method to inner data field classes 2. Annotated size calculation with respective spec * [ECO-5380] Updated message size spec annoatations as per updated spec * [ECO-5380] Updated LiveObjectsAdaopter interface 1. Added and implemented method to calculate maxMessageSizeLimit 2. Added extension method ensureMessageSizeWithinLimit to validate object msg sizes 3. Added unit test to validate objectMessageSizeWithinLimit * chore: bump version number * chore: update `CHANGELOG.md` * [ECO-5380] Create separated unit test file for ObjectMessage 1. Added three different unit tests covering edge cases 2. Updated doc for byteSize String extension method 3. Updated type of maxMessageSize to int instead of long * [ECO-5386] Added interfaces for liveobject serialization 1. Added LiveObjectSerializer interface consisting methods for json and msgpack serialization. 2. Added LiveObjectsHelper to initialize LiveObjectsPlugin and LiveObjectSerializer 3. Updated code to use LiveObjectSerializer and LiveObjectsHelper to serialize and initialize liveobjects * [ECO-5386] Added impl. for LiveObjectSerializer interface 1. Implemented JsonSerializetion using gson library 2. Implemented MsgpackSerialization without external dependency 3. Annotated/updated ObjectMessage fields for gson serialization 4. Added msgpack dependency to liveobjects * [ECO-5386] Added unit tests for Liveobject serialization 1. Created dummy objectmessage fixture for different data types 2. Implemented unit tests with given fixture for various cases * [ECO-5386] Fixed serialization and related helpers as per review comments * [ECO-5421] Removed initialValueEncoding field, updated initialValue to string type * [ECO-5430] fix: npe in the connectivity check - Throw `AblyException` for empty response bodies. - Added corresponding unit tests to validate behavior. * [ECO-5426][ECO-5439] Initialize live objects foundation with core interfaces - Enhanced LiveCounter interface with increment/decrement operations and comprehensive JavaDoc - Extended LiveObjectsPlugin interface for modular plugin architecture - Updated ErrorCodes enum for standardized live objects error handling - Established blocking/non-blocking operation annotations for API consistency * [ECO-5426][ECO-5439] Implement object utilities and validation framework - Created ObjectId class with comprehensive validation and parsing logic - Enhanced Utils helper functions for common object operations - Updated Helpers class for shared live objects functionality - Established consistent logging patterns and error handling across components * [ECO-5426][ECO-5439] Establish plugin architecture and live objects core - Enhanced DefaultLiveObjectsPlugin with seamless channel integration - Updated DefaultLiveObjects with coroutine-based sequential message processing - Added objects pool initialization and comprehensive lifecycle management - Implemented channel state change handling for live objects synchronization * [ECO-5426][ECO-5439] Implement base live object with comprehensive testing - Added BaseLiveObject abstract class as foundation for LiveMap/LiveCounter - Implemented site timeserials tracking and tombstone lifecycle management - Created BaseLiveObjectTest with spec-compliant validation and edge cases - Established thread-safe object state management and operation handling * Apply suggestions from code review for ObjectOperation#initialValue Co-authored-by: Andrew Bulat <[email protected]> * [ECO-5426][ECO-5439] Design object message structure with validation system - Enhanced ObjectMessage data class with complete serialization field mapping - Created comprehensive ObjectId validation with extensive test coverage - Added message size calculation and validation logic for protocol compliance - Established edge case testing for object ID formats and parsing scenarios * [ECO-5426][ECO-5439] Establish comprehensive test infrastructure - Enhanced TestUtils with advanced mock object generation capabilities - Updated TestHelpers with channel and adapter mocking for integration tests - Added parameterized test base classes for systematic integration testing - Established consistent test patterns and mock factories for all live object types * [ECO-5426][ECO-5439] Implement thread-safe objects pool with lifecycle management - Added ObjectsPool with ConcurrentHashMap for thread-safe object storage - Implemented automatic garbage collection for tombstoned objects - Created pool initialization with root object and comprehensive lifecycle management - Added extensive ObjectsPoolTest with concurrent access validation and edge cases * [ECO-5426][ECO-5439] Create objects manager for sync and operation processing - Implemented ObjectsManager for OBJECT and OBJECT_SYNC message processing - Added sync objects data pool for collecting and managing sync sequences - Created buffered object operations during sync state with proper ordering - Established comprehensive ObjectsManagerTest with sync sequence validation scenarios * [ECO-5426][ECO-5439] Implement sync tracking system with state transitions - Added ObjectsSyncTracker for managing sync sequences and cursor tracking - Implemented sync state transitions and channel serial management - Created comprehensive sync tracking tests with edge case coverage - Established sync completion detection and buffered operation processing logic * [ECO-5426][ECO-5439] Design LiveMap entry system with test fixtures - Created LiveMapEntry with timestamp and value management for conflict resolution - Enhanced ObjectMessageFixtures for consistent test data generation across test suites - Added entry lifecycle management with tombstone support and GC integration - Established fixture patterns for various object message scenarios and edge cases * [ECO-5457] Refactored ObjectsStateSubscription to ObjectsSubscription - Added ObjectsStateEvent enum for SYNCING and SYNCED states - Created ObjectsStateChange interface with listener pattern for state changes - Implemented ObjectsSubscription interface for subscription management - Added ObjectsState enum and coordination system with internal/external event emitters - Created HandlesObjectsStateChange interface for state management coordination * [ECO-5426][ECO-5439] Implement LiveMap core functionality and operations - Added DefaultLiveMap with ConcurrentHashMap for thread-safe map operations - Implemented map semantics support (LWW) and comprehensive entry management - Created essential LiveMap operations (get, set, remove, size) with validation - Established DefaultLiveMapTest with fundamental operation validation and concurrency tests * [ECO-5450] fix: async connection state transition side effects Side effects for close and reconnect were invoked asynchronously on a different thread, so the sequence of operations: `client.close(); client.connect(); channel.attach();` produced unexpected results, with the channel ending up in the initialized state instead of attaching. To fix this, we now proactively reset the connection and channel states. If `connect()` is called while in a terminal state, we can synchronously clear channel states. Additionally, we need to handle the case where `close()` is called but the connection has not yet transitioned to the closing state, and `connect()` is invoked immediately afterward. In this situation, it is also safe to detach from channels and clean up their state. * [ECO-5076] Updated impl. to dispose objects using ablyexception - Added getChannelModes and getChannelState methods to LiveObjectsAdapter interface - Implemented channel mode retrieval with fallback from channel options (RTO2a, RTO2b) - Enhanced LiveObjectsPlugin interface with disposal lifecycle documentation - Fixed DefaultLiveObjectsPlugin to use clientError for proper exception handling - Updated Adapter class with channel state and mode management functionality * [ECO-5426][ECO-5439] Create LiveMap manager for advanced operation processing - Implemented LiveMapManager for handling complex map operations and state management - Added operation validation and conflict resolution logic with LWW semantics - Created comprehensive LiveMapManagerTest with operation scenarios and edge cases - Established map update calculation and change notification system for subscribers * fix: reset `msgSerial` on reconnect after suspension - Ensure `msgSerial` is reset to `0` when reconnecting from the suspended state. - Added a unit test to verify this behavior. * fix: move serializer initialization inside methods it prevents SDK from immediately posting an error log message about not having LiveObject installed * [ECO-5457] Replaced GlobalCallbackScope with ObjectsCallbackScope with lifecycle tied to given objects instance - Added channel mode and state validation error codes (ChannelModeRequired, ChannelStateError) - Implemented throwIfInvalidAccessApiConfiguration with channel mode validation (RTO2) - Created ObjectsAsyncScope for channel-specific async operations with proper error handling - Added launchWithCallback and launchWithVoidCallback methods for safe async execution - Enhanced validation helpers for channel state and mode requirements * [ECO-5426][ECO-5439] Implement LiveCounter with atomic operations - Added DefaultLiveCounter with AtomicReference for thread-safe counting operations - Implemented counter operations (increment, decrement, value) with proper synchronization - Created DefaultLiveCounterTest with concurrent operation validation and stress testing - Established counter data management and operation result handling with notifications * EDU 1942: Improve Pub/Sub Java Readme (ably#1088) This PR streamlines and refocuses the content of README.md to improve readability, simplify navigation, and make ongoing maintenance easier. * chore: bump version number * chore: update `CHANGELOG.md` * chore: update Maven Publish plugin and fix publishing configuration From 30 June `S01` and `oss.sonatype.com` are migrated to the `central.sonatype.com` * [ECO-5458] Added base interface for live object updates - Introduced LiveObjectUpdate interface as foundation for subscription system - Provides common contract for all live object change notifications * [ECO-5426][ECO-5439] Create LiveCounter manager for operation handling - Implemented LiveCounterManager for counter-specific operations and state management - Added counter operation validation and comprehensive state management logic - Created extensive LiveCounterManagerTest with edge cases and error scenarios - Established counter update calculation and notification system for real-time updates * [ECO-5426] Refactored initializeHandlerForIncomingObjectMessages to handle exceptions - Updated ObjectsManager to extend ObjectsStateCoordinator for state management - Fixed state enum references from SYNCED/SYNCING to Synced/Syncing - Added stateChange method with proper state transition logging (RTO2) - Integrated state change event emission through ObjectsStateCoordinator - Enhanced disposal process to include state listener cleanup - Removed unused import from BaseLiveObject * [ECO-5457] Refactored LiveCounter, implemented value method - Updated LiveCounter#data type to AtomicLong to make it thread safe - Replaced generic Callback with ObjectsCallback in async methods - Implemented value() method with channel configuration validation - Added proper adapter validation using throwIfInvalidAccessApiConfiguration - Maintained thread-safe access to counter data through AtomicReference * [ECO-5458] Implemented LiveCounter subscription interfaces - Added LiveCounterChange interface for counter change notifications - Created LiveCounterUpdate interface extending LiveObjectUpdate - Defined comprehensive change event structure for counter subscriptions * [ECO-5426][ECO-5439] Complete DefaultLiveObjects integration with testing - Created comprehensive DefaultLiveObjectsTest with integration scenarios - Added complete live objects lifecycle and state management validation - Implemented channel state integration testing with various state transitions - Established end-to-end workflow testing for live objects synchronization * [ECO-5457] Refactored LiveMap to accept DefaultLiveObjects in constructor param - Added channel state checks for detached and failed - Implemented LiveMap accessor methods: get, entries, keys, values and size - Updated LiveMap data field to be ConcurrentMap for thread safety - Added proper channel configuration validation for all accessor methods - Implemented sequence-based iteration for entries, keys, and values with tombstone filtering - Replaced generic Callback with ObjectsCallback in async methods * [ECO-5458] Implemented LiveMap subscription interfaces - Added LiveMapChange interface for map change notifications - Created LiveMapUpdate interface extending LiveObjectUpdate - Defined comprehensive change event structure for map subscriptions * [ECO-5426][ECO-5439] Implement JSON serialization with Gson integration - Enhanced JsonSerialization with custom type adapters for enum serialization - Improved ObjectMessage JSON serialization and deserialization with proper formatting - Updated enum code type adapters for ObjectOperationAction and MapSemantics - Established JSON object conversion utilities with comprehensive error handling * [ECO-5426][ECO-5439] Create MessagePack serialization system - Enhanced MsgpackSerialization for efficient binary message encoding - Improved ObjectMessage MessagePack write and read operations with field optimization - Updated DefaultLiveObjectSerializer supporting both JSON and MessagePack formats - Established efficient binary serialization with minimal memory allocation * [ECO-5076] Implemented code for getRoot method - Added getChannelModes and getChannelState methods to adapter - Implemented getRoot method with blocking and async variants using ObjectsAsyncScope - Moved ObjectsState enum to separate file and updated state references - Added proper disposal handling with AblyException instead of string reason - Enhanced async scope management for callback operations - Updated all async method signatures to use ObjectsCallback instead of Callback * [ECO-5458] Moved LiveCounter and LiveMap to type-specific packages - Moved LiveCounter.java to type/counter package for better organization - Moved LiveMap.java to type/map package for better organization - Updated import references in LiveObjects and ObjectsSubscription * [ECO-5426][ECO-5439] Implement message serialization and size validation - Enhanced ObjectMessageSerializationTest with comprehensive format validation - Updated ObjectMessageSizeTest with size calculation validation and limits enforcement - Improved message size calculation methods for all object message components - Established size validation utilities with comprehensive test coverage and edge cases * [ECO-5458] Implemented change coordinators for subscription management - Added LiveCounterChangeCoordinator for counter subscription events - Added LiveMapChangeCoordinator for map subscription events - Provides centralized coordination for change notifications and listeners * [ECO-5450] fix: async connection state transition side effects - Added getOptions() method to ChannelBase for accessing channel options - Initialize LiveObjects instance on channel creation to process sync messages - Enhanced channel integration with LiveObjects plugin lifecycle management - Fixed channel mode fallback logic by exposing channel options * [ECO-5458] Enhanced LiveCounter with subscription support - Updated BaseLiveObject with subscription coordination capabilities - Modified DefaultLiveCounter to integrate with LiveCounterChangeCoordinator - Enhanced LiveCounterManager to return LiveCounterUpdate objects * [ECO-5426][ECO-5439] Integrate live objects with realtime channel system - Enhanced ChannelBase to support live objects functionality with seamless integration - Updated live objects protocol message handling in channel pipeline - Improved channel state integration for live objects synchronization - Established robust integration between channels and live objects with proper lifecycle * [ECO-5426][ECO-5439] Renamed LiveObjectTest to RealtimeObjectsTest * [ECO-5426] Added comprehensive unit tests for Live Objects core functionality - Added UtilsTest with 283 lines of comprehensive utility function tests - Enhanced DefaultLiveObjectsTest with updated state management tests - Updated ObjectsManagerTest with improved sync sequence and state handling tests - Created test coverage for ObjectId validation, state transitions, and error handling - Added tests for ObjectsAsyncScope callback execution and error scenarios * [ECO-5457] Renamed callbackScope to asyncScope for better context around async ops - Enhanced IntegrationTest setup with improved test configuration - Updated Sandbox configuration for integration test environment - Improved test infrastructure for Live Objects integration testing - Added better error handling and setup validation for integration tests * [ECO-5458] Enhanced LiveMap with subscription support - Modified DefaultLiveMap to integrate with LiveMapChangeCoordinator - Enhanced LiveMapManager to return LiveMapUpdate objects - Implemented comprehensive map change notification system * [ECO-5482] Added realtime write API to LiveObjects core interfaces - Enhanced LiveObjects interface with realtime write operations and spec annotations - Extended Adapter and LiveObjectsAdapter with realtime write support - Implemented foundational API structure for realtime object modifications * [ECO-5482] Enhanced LiveCounter and LiveMap interfaces for realtime operations - Updated LiveCounter interface with realtime write methods and spec references - Modified LiveMap interface to support realtime write capabilities - Added comprehensive API documentation for realtime operations * [ECO-5458] Updated core LiveObjects implementation for subscriptions - Modified DefaultLiveObjects to support subscription integration - Enhanced Helpers with subscription-related utilities - Updated ObjectsManager and ObjectsPool for subscription context * [ECO-5457] Added integration tests LiveCounter accessors - Created PayloadBuilder for constructing test payloads with 135 lines of functionality - Added RestObjects helper with 119 lines for REST API integration testing - Implemented CounterFixtures with test data for LiveCounter integration tests - Created DataFixtures with 84 lines of common test data structures - Added MapFixtures with 157 lines for LiveMap integration test scenarios - Enhanced integration test utilities with comprehensive helper functions * [ECO-5482] Added LiveMapValue class and ServerTime utility for realtime operations - Implemented comprehensive LiveMapValue class for map value handling - Added ServerTime utility for server timestamp management - Provided foundational support classes for realtime write operations * [ECO-5482] Implemented realtime write functionality in core LiveObjects - Enhanced DefaultLiveObjects with realtime write operation implementations - Updated Helpers with realtime write support utilities - Modified Utils to support realtime operation context and validation * [ECO-5458] Added comprehensive integration tests for subscriptions - Enhanced DefaultLiveCounterTest with subscription test scenarios - Updated DefaultLiveMapTest with subscription functionality tests - Added subscription tests to DefaultLiveObjectsTest and helper utilities * [ECO-5426] Updated ObjectValue to have compile time type safety instead of checking type at runtime - Added DefaultLiveCounterTest with 205 lines of comprehensive integration tests - Created DefaultLiveMapTest with 213 lines covering LiveMap integration scenarios - Implemented test coverage for LiveCounter and LiveMap accessor methods - Added integration tests for object state validation and error handling - Enhanced test suite with real-time synchronization and state change validation * [ECO-5482] Enhanced supporting components for realtime write operations - Updated ObjectId with realtime operation support - Modified ErrorCodes for realtime write error handling - Enhanced MsgpackSerialization for realtime operation serialization - Updated BaseLiveObject with realtime write base functionality * [ECO-5482] Implemented realtime write operations in DefaultLiveCounter and DefaultLiveMap - Added runBlocking synchronous wrappers for increment/decrement in DefaultLiveCounter - Updated DefaultLiveMap.get() to return LiveMapValue instead of Any? - Integrated asyncScope for coroutine-based realtime operations - Added kotlinx.coroutines.runBlocking import for synchronous API support * [ECO-5447] Enhanced object serialization with server-provided tombstone serial support - Added tombstone serial tracking to ObjectMessage for server-provided serials - Updated ObjectsManager to handle tombstone serial in object processing - Enhanced MsgpackSerialization to support tombstone serial deserialization - Modified BaseLiveObject to incorporate tombstone serial in state management * [ECO-5482] Enhanced LiveMapEntry with additional imports for realtime operations - Added imports for LiveCounter, LiveMap, LiveMapValue types - Extended imports for BaseLiveObject and ObjectType support - Updated LiveMapEntry to support enhanced type system for realtime write operations * [ECO-5447] Updated LiveCounter and LiveMap managers for tombstone serial handling - Modified DefaultLiveCounter to support server-provided tombstone serials - Enhanced LiveCounterManager with tombstone serial processing logic - Updated DefaultLiveMap to handle tombstone serial in map operations - Improved LiveMapManager with comprehensive tombstone serial support * [ECO-5458] Enhanced test fixtures and unit tests for subscription support - Updated CounterFixtures and MapFixtures with subscription test data - Enhanced IntegrationTest setup for subscription scenarios - Added comprehensive unit tests for LiveCounterManager and LiveMapManager * [ECO-5482] Enhanced integration tests for realtime write operations - Updated DefaultLiveCounterTest with realtime write test scenarios - Enhanced DefaultLiveMapTest with comprehensive realtime operation tests - Added LiveMapValue import and removed unused type imports - Expanded test coverage for realtime increment/decrement and map operations * [ECO-5447] Added comprehensive integration tests for tombstone serial functionality - Enhanced DefaultLiveObjectsTest with tombstone serial test scenarios - Updated integration helpers with tombstone serial utilities - Added TestHelpers support for tombstone serial testing - Improved ObjectsManagerTest with tombstone serial validation * [ECO-5482] Cleaned up imports and enhanced integration test helpers - Removed unused imports from DefaultLiveObjectsTest (JsonArray, JsonObject, Binary) - Updated PayloadBuilder helper for realtime write operation support - Streamlined import statements for better code organization * [ECO-5447] Enhanced unit tests with comprehensive tombstone serial coverage - Added extensive unit tests for LiveCounterManager tombstone serial handling - Enhanced LiveMapManagerTest with comprehensive tombstone serial scenarios - Updated DefaultLiveCounterTest and DefaultLiveMapTest for tombstone serial validation - Implemented thorough test coverage for server-provided tombstone serial functionality * [ECO-5426][ECO-5439] Renamed LiveObjectTest to RealtimeObjectsTest * [ECO-5506] Declared separate interface ObjectsCallback for async ops - Added ObjectsCallback interface replacing generic Callback for Live Objects operations - Updated LiveObjects interface to extend ObjectsStateChange and use ObjectsCallback - Refactored LiveCounter and LiveMap async methods to use ObjectsCallback instead of Callback - Added comprehensive Javadoc for ObjectsCallback with operation-specific guidance * [ECO-5076] Fixed integration test fixtures in accordance with ObjectValue union type - Added DefaultLiveObjectsTest with 187 lines of comprehensive Live Objects integration tests - Implemented complete integration test suite covering getRoot functionality - Enhanced test coverage for Objects state management and synchronization - Added integration tests for ObjectsCallback interface and async operations - Completed comprehensive test coverage for all Live Objects core functionality * [ECO-5482] Added unit tests for for utilies - Enhanced ObjectIdTest with testFromInitialValue test for object initialization - Added new test methods to UtilsTest for realtime operation utilities - Updated ObjectMessageSizeTest with realtime write operation size calculations * [ECO-5383] Fixed build script to enable local maven publish * [ECO-5383] Updated contributing guide for publishing specific module with precedence * [ECO-5517] Implemented implicit attach for getRoot method - Adjusted channel state checks prior to channel modes for read and write objects operations - Added getChannel method to adapter interface, added relevant ensureAttached method with relevant implementation * [ECO-5517] Removed implicit channel attach from integration test setup * [ECO-5517] Refactored Adapter implementation, moved to liveobjects Helpers - Removed unnecessary implementation from Adapter, made it clean - Updated unit tests/mocks accordingly * [ECO-5517] Added comprehensive unit tests for liveobjects Helpers * [ECO-5418] Updated ObjectMessage.kt internal data classes with Objects prefix - Renamed LiveObjects interface to RealtimeObjects - Removed Live prefix from other interfaces, kept them with Objects* - Removed use of liveobject keyword from the library since its reserved for business use case * [ECO-5418] Marked ObjectsPlugin field as Nullable in AblyRealtime and RealtimeChannel classes * chore[live-objects]: change `:java` dependency to `compileOnly` in `live-objects` module live-objects can be used both with ably-java and ably-android, making dependency `compileOnly` we prevent adding specific module (ably-java or ably-android) to the classpath * update to fatjar and exclude problematic deps --------- Signed-off-by: Lewis Marshall <[email protected]> Co-authored-by: Evgeny Khokhlov <[email protected]> Co-authored-by: Lewis Marshall <[email protected]> Co-authored-by: owenpearson <[email protected]> Co-authored-by: Owen Pearson <[email protected]> Co-authored-by: sacOO7 <[email protected]> Co-authored-by: Simon Woolf <[email protected]> Co-authored-by: Andrew Bulat <[email protected]> Co-authored-by: Francis Roberts <[email protected]> Co-authored-by: Shwetha Manuvinakurike <[email protected]>
This PR streamlines and refocuses the content of README.md to improve readability, simplify navigation, and make ongoing maintenance easier.
Commits
EDU-1942: Rewrites introduction and overview
EDU-1942: Adds getting started
EDU-1942: Adds supported platforms section
EDU-1942: Removes install section
EDU-1942: Removes runtime section
EDU-1942: Removes Realtime and REST API usage
EDU-1942: Removes Push activation
EDU-1942: Edits Proxy support
EDU-1942: Removes Resources, example projects and Requirements
EDU-1942: Moves contribute section
EDU-1942: Adds releases section
EDU-1942: Condenses support section
EDU-1942: Removes support section
Jira
https://ably.atlassian.net/browse/EDU-1942
Summary by CodeRabbit
Summary by CodeRabbit