-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Update ksqlDB CLI to use the Java client #6269
Comments
@vcrfxia to do a rough scoping with @colinhicks . We can prioritize after that. |
Recording the remaining open questions after syncing with @colinhicks below. Should we migrate The new HTTP/2 endpoint for inserting values differs from the old endpoint in two main ways:
The second point is more work to reconcile. Options include:
Should we maintain backwards compatibility between the new CLI (post-migration) and older server versions? The HTTP/2 endpoints used by the Java client were only introduced in recent ksqlDB releases, and we'll likely need to make additional server-side changes to enable the CLI migration as well. Maintaining compatibility between the new CLI post-migration and older server versions would be significantly more work and likely not worth it. How should we expose command sequence number or equivalent functionality in the Java client? The CLI supports requiring the server to have executed all previously issued statements before processing new statements/queries. This is achieved using the command sequence number functionality which is not currently exposed by the client interfaces. Options include:
How should the Java client interfaces expose warnings returned from KsqlEntity? Again to avoid cluttering the client interfaces, the Java client does not currently expose warnings that may be returned with server responses as the use cases are extremely niche, but we'd need this in order to have parity with the CLI, and it's probably good to do at some point anyway. Adding a list of potential warnings to the different return types from client methods doesn't feel right in light of the fact that the warnings will almost always be empty (and will be guaranteed to be empty today for many methods). |
In terms of estimated LOE for this migration, I think we're looking at roughly 16-18 person-(calendar-)weeks depending on the approaches we take for addressing some of the open questions above. Here's an example breakdown, where numbers next to tasks are in person-days: additional server functionality:
additional client functionality:
cli migration:
extra test coverage for CLI usage (5) Many of the tasks are parallelizable. |
Thanks for the writeup @vcrfxia! Glad we had this record for when we wanted to go ahead and start working on the migration 😄 There are benefits of partially migrating the CLI to use the java client so that we can phase out the old HTTP/1 |
We should update the ksqlDB CLI to use the Java client rather than having two codepaths to maintain, and since it'll be a great opportunity to dogfood the Java client. This would also allow us to deprecate the
/query
endpoint used by the CLI for push queries and remove another codepath there as well.A prerequisite for doing this would be to enhance the Java client to support all the different types of statements that the REST API and CLI support, including connector management, the extended versions of admin commands, and other admin commands such as explaining queries.
We'd also have to decide how to handle the fact that the new
/inserts-stream
endpoint used by the Java client does not support expressions inINSERT VALUES
statements as the/ksql
endpoint currently used by the CLI forINSERT VALUES
statements does. If we don't want to break backwards compatibility, we'd have to either enhance the/inserts-stream
endpoint, introduce separate Java client methods for the different endpoints, or introduce logic into the CLI / Java client to determine where the requests should be sent (not recommended).The text was updated successfully, but these errors were encountered: