Skip to content
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

General questions about coap+tcp usage ? #69

Open
sbernard31 opened this issue Oct 20, 2023 · 7 comments
Open

General questions about coap+tcp usage ? #69

sbernard31 opened this issue Oct 20, 2023 · 7 comments

Comments

@sbernard31
Copy link
Collaborator

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 :

  • use TcpCoapServer.builder(),
  • provide TCP capabilities using : .blockSize(...).maxIncomingBlockTransferSize(...).maxMessageSize(...) ,
  • provide a CoapTcpTransport.

For the last point (providing a CoapTcpTransport), I only found implementation for client : SocketClientTransport. but nothing for server. Except an out of API SingleConnectionSocketServerTransport class in tests which seems to support only 1 client at a time.

Then I tell myself that maybe there is only server implementation based on netty ? but it seems that NettyCoapTransport implements CoapTransport only.

Did I missed something ? 🤔

@szysas
Copy link
Collaborator

szysas commented Oct 20, 2023

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

@sbernard31
Copy link
Collaborator Author

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

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

@szysas
Copy link
Collaborator

szysas commented Oct 20, 2023

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
Copy link
Collaborator Author

sbernard31 commented Oct 20, 2023

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

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
Copy link
Collaborator

szysas commented Oct 20, 2023

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

Still work in progress but my first working version is available at : eclipse-leshan/leshan#1528

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants