-
Notifications
You must be signed in to change notification settings - Fork 368
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
[coap+tcp] Adding Capabilities and Settings Messages (CSM) support #2092
Comments
Not that sure, if it covers the requirements: |
I'm not sure to get the idea. |
The additional endpoint context field may be just a |
I'm not so sure this will work, the RFC says each time a new TCP connection is established we need to send a CSM. So this is not really linked to sending data. Between both solution, I will be more comfortable with the idea about adding some new events. My guess those events will be needed for more than that anyway (especially the |
Just to mention: Anyway, if you prefer the other way, feel free. |
Thx 🙏 ! Just a question do you prefer we try to have dedicated interface/class for connect / disconnect new event or should I directly add it to existing class/interface ? E.g. should I :
First as benefit to isolate changes but drawback to create a lot of new "ConnectionOriented" class/interface. (Layer, Stack, Connector, ..) |
I would prefer a |
Typo CoapTcpStack vs CoapUdpStack? Because for now, It seems to me that this will increase changes in |
Just the way of express things. For me: there are overall changes, and these changes are then reduced to changes in the CoapTcpStack. |
@boaks I think I need some helps/advices. I begin to work on this in But in my case, I have the new Lines 5 to 18 in fc2a1e7
Any idea ? |
Until now: An So, somehow, the "connected" may be better implemented in the |
A suggestion: When no CSM is received there maybe is a connection on tcp level, but on the Coap level the connection is not established. Then the ConnectionOrientedLayer should not reach a connected state when there is no aggreement between client and server on CSMs. To try and get an aggreement is then the responsibility of this one layer. Seems the layer is about the connection concept on Coap level. The tcp level connection is the domain of the The name of |
I moved forward on this, see I'm now able to receive and send the CSM message but I don't do anything with it for now... I tested with Before to go further, I would like to get feedback about this, to be sure I'm more or less on right way. (about Signaling Option there is a dedicated topic : #2094) Currently I have one big concern : the threading model ! Currently at coap level the threading model is around Exchange right ? My new events (connect/disconnect) / signal message handling is out of Exchange scope, so I'm afraid that this raise new race condition issue. I haven't clear idea about this. I believe that netty solve this kind of problem by assuring that all work about same connection is done in same thread. At californium level, would it mean same identity/endpointContext ? |
Yes, that's a big one. An Exchange is processed:
The calls where crossing many different objects, so a common "synchronization" would have caused potential issues, therefore I used the "serial execution" in order to cover that. For blockwise we still use a "synchronization" on the resource-level, but that causes a lot of trouble. Until now, the idea was to decouple the different processing layers. Therefore the connector threads hand over their messages to the coap-layer threads. And these, after handled the Exchange, then pass the processing to the serial execution. I don't know, if it will be easy (or even possible) to switch to a other threading model. Issue #2091 was asking for that. If we go that way, then I would try make that "execution" configurable to keep the current for UDP. But that will still leave the exercise, work and test for that "other execution model" to someone else. |
@boaks, any opinion about About threading model, I'm not sure to get your position ? Is it something that you would like to "improve"/"clarify" for caliornium ? or you just happy with current design ? |
🤔 All works for a given identity (endpoint context or something like this) instead of About inspiration from Netty, they also have kinds of Layer, this is called |
I just don't know the outcome of these intended changes. |
I still don't get too much what I should do now. I understand that :
But I don't get if :
|
FMPOV: The main question for me is, what is the intention:
|
Interesting 🤔 I don't see the situation like a choice between those 2 ways. I mean even if the idea is to start to provide a demonstration (a kind of minimal testable feature). And I also think that doing this could (should?) be an opportunity to maybe improve current californium design.
With this, I will never be able to integrate it in Leshan. So this doesn't really fit my needs. Personally, for Leshan, I never expect that contributors provide a turnkey solution perfectly tested. I always expect to have to polish the contributed code. Often this is opportunity to re-design Leshan or to work on something I put aside by the past. Finally I understand that :
and so this leads you to not want to take too much time on this or take risks to have regression because of this. I can understand that. The past also showed that we have difficulty to collaborate together and we also often have different design preferences, so this makes more difficult the idea to work on this successfully. So maybe Californium is just not the right place to put coap+tcp forward 🤔 ? With that in mind, should we just remove coap+tcp from californium ? |
I hope this does not appear true. Although coap+tcp maybe isn't of the greatest importance now, it could enlarge the number of use-cases significantly in the future IMPOV. It has some unique selling points. |
@rogierc, just by curiosity could you elaborate about :
(This could help me to complete https://github.com/eclipse/leshan/wiki/CoAP-over-TCP, see also this discussion : eclipse-leshan/leshan#1343) On my side,
So all of this, totally discouraging me to invest more effort on this. Currently, I'm playing with |
It has the unique selling points of CoAP in general of course, on top of that:
These features become more important when coap is used at larger (corporate) scale and IoT devices are integrated in a layered IoT service architecture where IoT is seamlessly connected with the API-layers of cloud and datacenters. coap(s)+tcp/ws can be a valuable asset in bridging the IoT and API layers. In some of these layers the information flow tends to get much more dense (information from many devices is gathered and/or distributed). CoAP is useless here when there is a risk of bumping into the message rate limit. For Smart Home, Smart City applications this is maybe not a big issue. But in domains like IIoT there probably are many use cases that benefit from coap(s)+tcp/ws. It is expected that there will be a Fourth Industrial Revolution by using IoT technology in Industrial Automation. I would like to think Californium is part of that.
Isn't this more a question of available resources? When a feature is added it also needs to be maintained. With a small number of committers this always is a challenge. Seems to me a lot of effort is put into the security features. That security gets priority seems right to me. Although I value coap+tcp - security is vital to IoT. Hope we can get both forward with joint efforts. |
@sbernard31 @rogierc |
@rogierc thx for this feedback.
That's a good point. First time I heard about it, I will add it to my wiki page.
Yep, so for me solutions could be :
For now, I see Californium as a 1 man project and if the way it is manage doesn't change I'm not sure the project will really attract new active committer. |
Didn't as yet. Would like to, but time is scarce as - no doubt - it is for others.
In open source projects efforts are welcomed, not claimed. No comments from my side. When it takes longer to complete a feature we have to accept that, I think. Another question is that coap+tcp has - in principle - a place in Californium. I don't think we need to doubt that, apart from the time we can spend, it has, do we?
FMPOV Californium is worth to attract contributers. |
The point is, if it should be "pending" on "main", maybe with consequences, or in a feature branch or try to separate the work in an other module (if possible). That's what I mainly wrote above in my comment from the 19. Dec..
Otherwise I would have removed it. But it has also obvious no place in my calendar. |
Yep but involving real active committer is time consuming. |
forgot to mention:
From the side of Mule CoAP Connector there is no urgency. There is enough work to do on UDP/DTLS side there. Tcp importance is for future usage. Either way "main" or "feature branch" will do there. For Leshan this seems different. There is a wish to merge with main on more shorter term. What is needed to be able to do that?
If the goal is to merge soon, one should be carefull with design changes that have impact on udp, I think. |
About the benefits:
If "insufficient UDP support" turns out to be "HTTP only", also that approach fails. I personally switched in such cases to cellular IoT. That removes all risks for those networks as long as the modems are only feeded via "data diodes".
That's more an topic of RFC7252 4.8. Transmission Parameters. A system either "learns" and optimize these parameters or use an assumption to define matching defaults. As for now, you may therefore use either other parameters, or someone needs to spend time in CongestionControl to provide a stable solution using larger N-START values.
See BERT for non-TCP/WS applications. If your network layer supports larger datagrams, you may use BERT also for UDP. |
Therefore I tried to get the opinion of two other committers about the ratio between changes, risks and benefits. So, lets keep the tcp work in that feature branch and see, what happens. |
There is no other active committers... they didn't work on this project for years...
At least not by me.
I said that : user votes is bad idea to decide about design (and If I remember well @sophokles73 agreed with that) I'm not even sure where vote should be involved in this case ? 🤔 So I came to the conclusion that Achim don't want this feature but are not comfortable with clearly saying it. Anyway, I don't feel that my contribution is welcomed. The more I read Achim's answer the more I'm demotivated. (and this even begin to affect my personal life again) So @boaks please let me out of this. @rogierc Good luck If you decide to work on this. I hope you will be better than me, feel free to reuse my work if you think it's useful 🙂. Of course if you have better idea feel free to drop it 😉. If one day you have a minimal viable feature for coap+tcp in Californium, I could try it with Leshan. |
Looks more like the "always repeating story of misunderstandings and misinterpretations" in the communication between Simon and me. It makes me feel, that even the time invested in that communication is in vain, regardless of my limitation in English or not. |
I don't understand why we are asking for a "statement" from me; I made some contributions in the past as a committer. I did lose interest in developing features for Californium for various reasons. CoAP TCP looks useful for some use cases; Simon is willing to work on it, so let's merge it in the dev version and wait for community feedback. Maybe I'm oversimplifying, but it's how a community-driven open-source project works. |
Thanks for your feedback! |
Just to avoid any ambiguity :
Simon was willing to work on it |
Also thanks for that clarification. |
In the case that someone wants to continue this work, feel free to comment or open an new issue. |
I create this issue to discuss about design of CSM support in Californium.
The RFC says :
Here some ideas I share just to know, if this could be the right approach :
Adding
connected()
/disconnected()
methods inLayer
class. I don't know if this should be directly done inLayer
or if we should create a dedicatedConnectionOrientedLayer
(or any better name) ?I guess we need a way to identify a connection at Californium-core level, with current design this should be
EndpointContext
?Then create a
CapabilitiesSettingsLayer
which will be responsible to handle CSM message :connected
/disconnected
event onConnector
.Maybe adding a
setConnectionEventHandler(ConnectionEventHandler eventHandler)
I guess we could also need a
connect
/disconnect
method onConnector
to force connection or disconnection.I don't know if we should add it directly to
Connector
or create a new InterfaceConnectionOrientedConnector
(we really need a better name...) ?That's just some ideas to start a discussion or at least identify what could looks like a first try on this topic.
The text was updated successfully, but these errors were encountered: