Open sheosi opened 2 years ago
Honestly, for this type of application where ordering matters quite a bit, if we can, we should go with TCP. UDP is faster because it doesn't use acks and also because it doesn't worry about ordering of messages.
Another option is to use TCP by default and UDP if we run into a scenario where TCP isn't an option due to resource constraints. As I mentioned in another issue, a server can have multiple listeners.
I didn't think about reordering, but you are a 100% right. If a skill sends "hi" and "my name is..." they should arrive in the correct order. Now, in reality this shouldnt happen much since generally a skill wont send to the same client twice in a row, but since it might happen (specially with progressive responses that are resolved too fast) better be prepared.
CoAP can work over both TCP and UDP, which one to choose?