4 ms·
> [...]I'm not the biggest fan of CoAP (because I think it's hardly possible to implement it correctly)[...] Out of curiosity, do you have any more details on
by azdle 11y ago
> [...]I'm not the biggest fan of CoAP (because I think it's hardly possible to implement it correctly)[...]
Out of curiosity, do you have any more details on what you think is impossible to implement correctly?
I've been doing a lot with CoAP and I'd agree that the RFC isn't as clear as it could be about some behavior, but I haven't come across anything that I'd say is impossible to implement or implement correctly.
- Matthias247 11y agoI thought the base protocol was quite OK, but the complexity arrives as soon as you try to integrate blockwise access and notifications. From my look on it there are quite a lot of possibilites for race conditions there (e.g. bigger data chunks changing while transfers to clients are in progress) for which you might need to implement additional functionality (e.g. making copies of that data). But then you also need to exactly track how many clients are subscribed to that data und how long you need to keep that it (you want timers, and probably more timers than in any other protocol). I don't recall the exact thing, but there was also something that I didn't like about the message IDs which you somehow need to keep ordered and check which ID might be used at the current point of time by which peer. A correct implementation may not send something while no ID is available, but to track all of those you needed lots of memory (much more than TCP buffers), and the open source implementations I looked at all elided that detail.