-
Notifications
You must be signed in to change notification settings - Fork 361
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
Redesign configuration. #1653
Redesign configuration. #1653
Conversation
cbd5ae4
to
b23a3d4
Compare
5c2e06e
to
b84f1f2
Compare
Maybe I missed something but it seems this doesn't compile ?
Missing |
b84f1f2
to
1bc769d
Compare
Yep. I currently work on split the config values and adapt the Connector constructors to use |
(with last push --force, It compiles now) |
I looked at this. (Not so deeply) And I think it is clearly better 👍 I'm not sure if this will replace existing Builder or if we will still have both config + builder ?
(source : #1601 (comment)) Currently the only part I'm not so comfortable with is the static Configuration.MODULE field and static blocks which registers module. Looking at PR, I was thinking that you created a kind of generic Configuration framework (not really linked to Californium or CoAP). I mean it could almost be a separated library. My next thought was : "maybe there is already some library which does this kind of thing ? 🤔 " |
The part of simple parameter maybe repaced by the config. the part of interface implementations not. For DTLS I consider to keep the builder but replace the simple settings by the config.
It's inspired by netty.io - AttributeMap. I considered to switch to yaml, but withdrawn it. I don't like external dependencies for close to nothing. Just a hint, did you had a look on the created properties files? For me that is also a really large improvement to have it sorted and documented. |
1bc769d
to
dbce962
Compare
I just looked at this : very cleaner ✨ . (maybe default value could be added with description in comment) Any thought about :
|
dbce962
to
2abb8c1
Compare
Making that more "dynamic" seems to me to be a difficult idea. Especially the use to generate the initial properties file may get irritating. |
ba5874d
to
9df4940
Compare
9bac648
to
ada63f2
Compare
0ac5775
to
a64b22d
Compare
Signed-off-by: Achim Kraus <achim.kraus@bosch.io>
a64b22d
to
27aef8e
Compare
I understand the concern but the static one as also some drawback, the main one is : e.g : I have 2 config(2 different file), one for coap over tcp and one for udp in same application, I will have udp param in my tcp confg and tcp params in my udp config. |
Yes. |
It's a case which show that maybe putting everything in the same file is not so good ? In my experience static design create issues frequently, I try to think if in this particular case we can imagine some realistic use case where this will be an issue. 🤔 |
WIP
First results of the configuration redesign.
See issue #1648
Signed-off-by: Achim Kraus achim.kraus@bosch.io