confluentinc / ide-sidecar

Sidecar application used by Confluent for VS Code, as a local proxy for Confluent Cloud, Confluent Platform and local Kafka clusters, to help users build streaming applications.
Apache License 2.0
3 stars 3 forks source link

Initial limited support for direct connections #116

Closed rhauch closed 2 weeks ago

rhauch commented 2 weeks ago

Summary of Changes

Resolves #96

This adds the initial but limited support for a new type of connection resources, called DIRECT connections, that represent a local or remote Kafka cluster and/or Schema Registry. The extension might create a direct connection to talk to a locally running CP installation, or a remote Apache Kafka cluster with a remote Schema Registry, or even a CCloud cluster with Schema Registry. The user may have to provide credentials to successfully authenticate and connect to each remote service/cluster.

The direction connections are not necessarily the constructs we want to expose. It is likely that near-term versions of the VS Code extension will allow users to connect to local or remote Kafka and SR clusters, but it may also expose to users different kinds of connections that are all represented in the sidecar as direct connections. For example, maybe the VS Code extension allows users to connect to “Confluent Platform”, “Apache Kafka”, and “WarpStream” (in addition to CCloud and local AK+SR), and these might all be customized facades on top of direct connections.

This is the first step in full support for direct connections, and as such only limited functionality is available in this PR:

Once this PR is merged, the following will handled as followups to complete the support for direct connections:

After that, we will have more improvements to better support Confluent Platform:

Other improvements may include:

Also, we avoided using javax and instead used jakarta imports due to the transfer of Java EE to the Eclipse Foundation, where it became Jakarta EE. The older javax packages within Java EE have been deprecated. Jakarta EE uses the jakarta namespace, which is incompatible with the legacy javax namespace. Mixing the two can cause issues. Several projects and frameworks… have already adopted Jakarta. Additionally, upgrading to Jakarta allows you to keep up with the latest changes and modernize your applications.

https://github.com/jakartaee/platform/blob/main/namespace/mappings.adoc#mapping-javax-to-jakarta

Pull request checklist

Please check if your PR fulfills the following (if applicable):

rhauch commented 2 weeks ago

Waiting for final approval from @flippingbits, since they had some questions.

rhauch commented 2 weeks ago

112 was recently merged. Locally, I did the following to verify main builds with this PR branch:

$ git pull origin main
$ git checkout direct-connect
$ git merge main
$ make clean build test mvn-package-native

All is good, and I did some basic testing with the native image, confirming that the Connections API works as expected for local, CCloud and the new direct connections. The local and CCloud connections should not be affected by this PR build, other than validating create and update of connection resources, which have good coverage with new tests.

Based upon this, I'm merging this PR.