Restructuring the Rust SDK (v0.5.0) #92
Replies: 1 comment
-
Feel free to discuss or leave your remarks/concerns in the comment section! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Why restructuring?
The SDK was initially built around the Kafka protocol and easily connect to DSH. Meanwhile, we also want to support other protocols (e.g. MQTT and Http) and add extra utilities to the SDK to make it more easier for developer to work with DSH. The following 2 reasons are why the current structure does not fit anymore!
Maintainability
To support the other protocols and new features, the current structure of the API of the SDK is not ideal to extend, as the API currently is focussed around Kafka. To add the other features we noticed it will be fairly hard to maintain the codebase.
Breaking changes due to re-exports
Also, some external libraries are re-exported, we would like to minimize these dependencies to avoid breaking changes. For example RDKafka is fully re-exported and recently RDKakfka released a major version, which will be technically a breaking change for the SDK. The idea is to move away from the
re-exports
and the DSH_SDK will implement a Trait to extend RDKakfka client configuration to create. See ImpactExpected Changes and Impact
These expected changes will have impact on your code as well. Below is a high-level overview of the current and expected API structure.
Current
Expected
Impact
The biggest impact will be on how currently RDKafka is used. In the new situation you will have to import RDKafka and/or Prometheus crate your self. The SDK will provide a trait to extend the RDKafka client configuration.
Current SDK usage
In v0.4.X the SDK would have been used something like this:
Expected SDK usage
In v0.5.X / v0.6.X the SDK should be used something like this:
Migration process
The migration process will be done in multiple steps. V0.5.0 will be firt made available as a Release Candidate to test the new API in some of the UniBox products. Here we want to check if the new API is easy to use and to gather some feedback.
v0.5.0 (expected release date: 2025-01-01)
v0.5.0 will be the first release with the new structure parallel to the old structure.
v0.6.0 (expected release date: 2025-02-01)
v0.6.0 will be the first release with the old API removed.
Beta Was this translation helpful? Give feedback.
All reactions