scylladb / scylladb/alternator-client-java

Async Netty clients require an undocumented synchronous HTTP transport for polling

Open
#172 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/Alternator_Client_-_java bug documentation
Dominant language
Java
Stars
0
Forks
7
Avg merge
21h 23m
Merged PRs (30d)
9

Description

Summary

The README presents netty-nio-client as sufficient for async-only applications, but every async Alternator client also creates a separate synchronous HTTP client for /localnodes discovery and health probes.

A runtime containing DynamoDB plus Netty, but neither Apache nor CRT, cannot build the async client.

Current behavior

AlternatorDynamoDbAsyncClientBuilder.buildWithAlternatorAPI() independently detects:

  1. Netty or CRT for the main async transport.
  2. Apache or CRT for the synchronous polling transport.

SyncClientDetector.detect() throws when neither Apache nor synchronous CRT is available.

Relevant code:

  • src/main/java/com/scylladb/alternator/AlternatorDynamoDbAsyncClient.java:791-808
  • src/main/java/com/scylladb/alternator/internal/SyncClientDetector.java:23-70, 100-129
  • README.md:75-96

The README currently says:

Async API only — choose Netty (recommended) or CRT

Netty cannot satisfy the synchronous polling requirement.

Impact

  • Documented async-only dependency setup fails at client build time.
  • Applications must discover an additional Apache/CRT dependency through runtime failure.
  • Adding Apache solely for polling changes connection-pool behavior and footprint.

Expected behavior

Either:

  • support discovery and health probes through the configured async transport, or
  • clearly require and document a synchronous polling transport for async clients.

Acceptance criteria

  • Netty-only async setup either builds successfully or fails validation with documentation that names the required extra dependency.
  • README dependency examples match actual runtime requirements.
  • Dependency/classpath tests cover Netty-only, Netty+Apache, Netty+CRT, and CRT-only combinations.
  • Polling transport selection and preference order are documented.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with AlternatorDynamoDbAsyncClient.java:791-808 and SyncClientDetector.java:23-70, 100-129 to trace async transport detection and synchronous polling requirements. Compare those paths with README.md:75-96, then run the dependency/classpath tests for the Netty-only, Netty+Apache, Netty+CRT, and CRT-only combinations; done means runtime behavior, README examples, and polling preference order agree.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.