open-coap / java-coap

CoAP Java library
Apache License 2.0
18 stars 5 forks source link

General questions about coap+tcp usage ? #69

Open sbernard31 opened 8 months ago

sbernard31 commented 8 months ago

I begin to play with coap-tcp API of java-coap.

I understand this is more or less like CoAP over UDP except I need to :

szysas commented 8 months ago

Hi, that is correct. There is only client side integration.

sbernard31 commented 8 months ago

I feel a little silly because I understood that tcp support was available at client and serve side :sweat_smile:.

Is server side support in project scope ? If yes, is it something you plan to add ?

szysas commented 8 months ago

Oh, sorry for misunderstanding. I should clarify that in readme. I'd say that it is in project scope but there are no plans on adding it.

sbernard31 commented 8 months ago

If I want to add coap+tcp support to Leshan, I will need a CoapTcpTransport implementation at server side. :thinking:

I will try to work on this in Leshan repository but I guess if I succeed to get a working solution, maybe it will make more sense to add it in java-coap repository ?

Do you already think about how it should looks like ? Do you think it make sense to go with something based on ServerSocket or we should directly target something based on netty ?

szysas commented 8 months ago

It depends what we want to accomplish. For high load, non blocking, production then definitely netty. For proof of concept or to proof functionality, then maybe easier with ServerSocket.

sbernard31 commented 8 months ago

About proof of concept, there is already SingleConnectionSocketServerTransport, not sure we need more ? so unless you discourage me, I will directly try with netty.

sbernard31 commented 8 months ago

Still work in progress but my first working version is available at : https://github.com/eclipse-leshan/leshan/pull/1528