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

[#1582] CoAP endpoints in Ditto gateway #1588

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thjaeckle
Copy link
Member

Initial draft of CoAP support in Ditto gateway:

  • provides (currently unsecure, plain UDP) CoAP endpoint
  • providing equivalent CoAP resources as the HTTP resources:
    • /things, /policies, /whoami
      • and all of the existing subresources of the above, see HTTP API
    • supporting verbs: GET, PUT, POST, DELETE, PATCH, IPATCH
    • managed to re-use the complete code for the Ditto HTTP routes without the need to do an additional network "hop" to HTTP
  • providing "observe" functionality for watching changes of resources:
    • managed to use existing "Server Sent Event" functionality for getting change notifications
    • including all of the features of SSE, field selectors, extra fields, etc.
    • managed to "prolong" existing observe-sessions when client observes again after "max-age" with the same "CoAP token"
    • "unobserve" cancels the backend subscription for changes

Open TODOs:

  • configuration of all Californium CoAP related settings (e.g. max payload sizes, timeouts, etc.)
  • coaps - CoAP via DTLS and different authentication types (PSK, Certificates)
  • ensure receiving Ditto "messages" (from inbox/outbox) works via "CoAP observe"
  • cancel observe streaming sessions once 1 or 2 "observe" prolongements from a client were missed
  • ensure timeout handling works, e.g. if Ditto takes too long for a request to answer
  • check/fix threading in the added DittoCoapResourceFacade - is single threaded enough? probably not
  • register the DittoCoapServer in CoordinatedShutdown
  • resolving open TODOs in code
  • provide unit tests
  • provide system-tests testing with a CoAP client
  • add documentation

Eventually resolves: #1582

* provides (unsecure, plain UDP) CoAP endpoint
* providing equivalent CoAP resources as the HTTP resources:
   * /things, /policies, /whoami
   * supporting verbs: GET, PUT, POST, DELETE, PATCH, IPATCH
* providing "observe" functionality for watching changes of resources

Signed-off-by: Thomas Jaeckle <ditto@jaeckles.de>
@thjaeckle thjaeckle added the on hold Waiting for feedback / requested changes on an issue/PR label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold Waiting for feedback / requested changes on an issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide CoAP endpoint in Ditto's gateway, providing the Ditto HTTP API via CoAP
1 participant