Repository navigation
dbeaver/pro#11108 Add External DAM transport contracts and backend client - #16
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Protocol separation and OSGi visibility need correction, while shared-client transport guarantees still require human validation.
2 open issues
What changed in this PR
Adds an External DAM API module for Desktop messaging contracts and backend service integration.
Changes:
- Defines WebSocket registration, connection identity, and topic-based messaging contracts.
- Adds an account-scoped GraphQL client with separate service authentication.
- Includes validation tests, delivery documentation, and Maven/OSGi integration.
| File | Description |
|---|---|
| apis/pom.xml | Registers the new module. |
| apis/com.dbeaver.datadam.external.api/src/test/java/com/dbeaver/datadam/external/api/model/DDMessageTest.java | Tests payload isolation and validation. |
| apis/com.dbeaver.datadam.external.api/src/test/java/com/dbeaver/datadam/external/api/model/DDExternalDamConnectionTest.java | Tests connection metadata. |
| apis/com.dbeaver.datadam.external.api/src/test/java/com/dbeaver/datadam/external/api/DDExternalDamProtocolTest.java | Tests message encoding and decoding. |
| apis/com.dbeaver.datadam.external.api/src/test/java/com/dbeaver/datadam/external/api/DDExternalDamApiTest.java | Tests service-secret validation. |
| apis/com.dbeaver.datadam.external.api/src/test/java/com/dbeaver/datadam/external/api/client/DDExternalDamClientTest.java | Tests requests, authentication, and failures. |
| apis/com.dbeaver.datadam.external.api/src/main/java/com/dbeaver/datadam/external/api/transport/DDSubscription.java | Defines subscription cleanup. |
| apis/com.dbeaver.datadam.external.api/src/main/java/com/dbeaver/datadam/external/api/transport/DDMessageListener.java | Defines message callbacks. |
| apis/com.dbeaver.datadam.external.api/src/main/java/com/dbeaver/datadam/external/api/transport/DDMessageChannel.java | Defines messaging and subscriptions. |
| apis/com.dbeaver.datadam.external.api/src/main/java/com/dbeaver/datadam/external/api/transport/DDConnectionListener.java | Defines connection callbacks. |
| apis/com.dbeaver.datadam.external.api/src/main/java/com/dbeaver/datadam/external/api/model/DDReady.java | Models registration acknowledgment. |
| apis/com.dbeaver.datadam.external.api/src/main/java/com/dbeaver/datadam/external/api/model/DDMessage.java | Models messages with isolated payloads. |
| apis/com.dbeaver.datadam.external.api/src/main/java/com/dbeaver/datadam/external/api/model/DDHello.java | Models Desktop registration metadata. |
| apis/com.dbeaver.datadam.external.api/src/main/java/com/dbeaver/datadam/external/api/model/DDExternalDamConnection.java | Models backend connection results. |
| apis/com.dbeaver.datadam.external.api/src/main/java/com/dbeaver/datadam/external/api/model/DDConnectionInfo.java | Models connection identity. |
| apis/com.dbeaver.datadam.external.api/src/main/java/com/dbeaver/datadam/external/api/exception/DDExternalDamException.java | Defines client exceptions. |
| apis/com.dbeaver.datadam.external.api/src/main/java/com/dbeaver/datadam/external/api/DDExternalDamProtocol.java | Implements WebSocket message serialization. |
| apis/com.dbeaver.datadam.external.api/src/main/java/com/dbeaver/datadam/external/api/DDExternalDamApi.java | Defines endpoint and authentication constants. |
| apis/com.dbeaver.datadam.external.api/src/main/java/com/dbeaver/datadam/external/api/client/DDExternalDamClient.java | Implements account-scoped GraphQL operations. |
| apis/com.dbeaver.datadam.external.api/README.md | Documents authentication and delivery guarantees. |
| apis/com.dbeaver.datadam.external.api/pom.xml | Configures dependencies and tests. |
| apis/com.dbeaver.datadam.external.api/META-INF/MANIFEST.MF | Declares OSGi exports and dependencies. |
| apis/com.dbeaver.datadam.external.api/build.properties | Configures bundle packaging. |
Review effort: Balanced
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6edb503c35
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e289d469d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| String target = message.type() == MessagingRequestReplyMessage.Type.REQUEST ? topic : replyPrefix + message.replyTo(); | ||
| CompletableFuture<Void> result = new CompletableFuture<>(); | ||
| Objects.requireNonNull(sender.send(new DDMessagingMessage(target, MESSAGE_TYPE, envelope))).whenComplete((ignored, error) -> { |
There was a problem hiding this comment.
Bind the readiness check to the actual channel send
In the direct-channel path created by forChannel, sender is channel::send, but the channel readiness check occurs under lock well before this call. If connection A disconnects and the channel reconnects to B in that interval, the queued disconnect can already fail the request while this call sends the frame through B; a non-idempotent request may therefore execute after its caller received DISCONNECTED, and an old reply may be exposed to the replacement peer. Bind sends to the checked connection generation or make validation and channel selection atomic.
Useful? React with 👍 / 👎.
|
|
||
| public record DDDamConnectionInfo( | ||
| @NotNull String deploymentId, | ||
| @NotNull String applicationRunId, |
| Bundle-ManifestVersion: 2 | ||
| Bundle-Vendor: DBeaver Corp | ||
| Bundle-Name: DataDam Messaging API | ||
| Bundle-SymbolicName: com.dbeaver.datadam.messaging.api |
There was a problem hiding this comment.
com.dbeaver.datadam.dam.remote.api
| * is strictly forbidden unless prior written permission is obtained | ||
| * from DBeaver Corp. | ||
| */ | ||
| package com.dbeaver.datadam.messaging.api.client; |
There was a problem hiding this comment.
com.dbeaver.datadam.dam.remote.*
| } | ||
| try { | ||
| int code = response.statusCode(); | ||
| if (code < 200 || code >= 300) { |
| Bundle-ActivationPolicy: lazy | ||
| Require-Bundle: org.jkiss.utils, | ||
| com.dbeaver.rest.client;visibility:=reexport | ||
| Import-Package: com.google.gson |
…://github.com/dbeaver/datadam-api into dbeaver/pro#11108-desktop-websocket-transport
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |

Summary
Closes dbeaver/pro#11108