-
Notifications
You must be signed in to change notification settings - Fork 364
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
Remove configuration by file #2143
Comments
Maybe you start reading the discussions, when the new Configuration was introduced with 3.0. Anyway, I guess, when #2142 is solved, you will be able to use this library and provide what ever format you want on your application level. Maybe we need to adapt the API, if you find a show stopper. Or we need some fixes. But in general, I think this is a really good solution, which provides an easy way to configure a Californium application by a documented configuration file. |
If you want to implement a own reader, we can also expose the |
I want my CoAP library to refrain from embedding config file reading facilities, imagine if the 20 lib I use had the bad taste to do this. For example how another Java CoAP library is doing:
This doesn't have the bad idea to ask you to look at a two-level generic abstract concept like Or this HTTP Java lib:
Or in a Go CoAP library:
Or in libcoap C: https://github.com/obgm/libcoap-minimal/blob/main/client.cc#L39-L40 Here Californium has an unorthodox design for configuration, breaking the UX principle of least astonishment and making the library difficult to use: |
|
As I wrote, you don't need to use the properties file. |
What was required to be changed in the default configuration?
That new |
Blocksize to 1k max resource body, DTLS cipher suites, disabling CID, DTLS role.
Seriously Achim, if your idea was to make fun of me, I don't think it's appropriate behavior. The file-based configuration predates us. |
For me, your statements are superficial and don't reflect the experience you have. I answered your question, you can use Californium without properties file. I can't see, that this a question of "file or no file". Others, including me, enjoy using this possibility of a general configuration file. This enables people to build small tools (e.g. cf-simplefile-server ) and very easy make their experience with different configuration values. If you really want to "change" Californium, please consider to ask Matthias and Kai as well. I don't stick to maintaining this stuff. If you want to start over with 5.0 (I will keep the 4.0 in coexistence for smaller API cleanup), then I don't see, what should prevent you from doing so. |
If you want to lead a "start over", let me know. |
Cf, as a first-class java library, should not come with a file-based configuration framework but should expose a Java API to configure lt like other Java libraries.
Reasoning:
when you build an application with Cf you consume many other Java libraries. Hopefully, they all do not save files on your disk by default!
You have many components to configure in an application and 20 different ways to do it ( env vars, cmd line args, file (ini, toml,yml, json).
We should simplify not enforce one in Califonium by removing the file facilities and just keeping the Java API to for the end user to configure it.
The text was updated successfully, but these errors were encountered: