go-coap icon indicating copy to clipboard operation
go-coap copied to clipboard

HTTP <> CoAP support via RFC 8075

Open beriberikix opened this issue 5 years ago • 12 comments

RFC 8075 provides guidelines for creating a cross-proxy, allowing HTTP endpoints to communicate with CoAP servers. That's very convenient for mobile clients and especially useful for web clients that can only make HTTP or WS requests.

Is there any plans or interest to support RFC 8075, either in go-coap or as a separate repo?

beriberikix avatar Apr 19 '20 20:04 beriberikix

There's an example implementation from IBM, but it's unclear how closely it implements the spec.

beriberikix avatar Apr 19 '20 20:04 beriberikix

I implemented something similar for Kistler(private repository) according to OCF specification.

Is there any plans or interest to support RFC 8075, either in go-coap or as a separate repo?

We don't have budget to implement such nice feature. And I' m for separate repo because it's brings http server, websocket's and other dependencies.

jkralik avatar Apr 20 '20 07:04 jkralik

Excellent, that's something I'd like to see done as well, and hope to get the resources in the future! In the meantime @boaks helped me get a demo of californium up and running for testing purposes.

beriberikix avatar Apr 29 '20 23:04 beriberikix

I created event(https://opencollective.com/go-coap/events/http-over-go-coap-59cefab8) to get budget. It will be implemented in new version - v2 (https://github.com/go-ocf/go-coap/pull/122)

jkralik avatar May 07 '20 20:05 jkralik

Great! I'm new opencollective but I seeded it with 32 + 1 :)

beriberikix avatar May 07 '20 21:05 beriberikix

Just noticed #122 was merged! What's still needed to implement RFC8075?

beriberikix avatar May 29 '20 18:05 beriberikix

I'm preparing user stories for similar project and I want to implement it with similar features (RFC8075) and then want take some of parts to the http. I guess that work will be done in September.

jkralik avatar Jun 03 '20 05:06 jkralik

FYI I've started to develop a CoAP proxy library (current in a private repo) that I hope to make public in the near future. It is standalone for the time being, though I'd be happy to explore how it could be integrated into go-coap in the future!

beriberikix avatar Jul 19 '20 16:07 beriberikix

Hi @beriberikix I grant you write access to go-coap repository -> so you can directly create there http package. Im very happy that you want provide such feature.

jkralik avatar Jul 21 '20 11:07 jkralik

Awesome! I still have a bunch of iteration before it's ready to contribute but that's the plan. The current work is a bit more than just HTTP support, but rather a full CoAP proxy library. Of course, we can cherry-pick & upstream many of the features (like HTTP support) , as well as make the library simpler. Here's the design goals:

A general purpose proxy server for the Constrained Application Protocol (CoAP.) It's goal is to support a broad range of proxying requirements when used in CoAP deployments - typically constrained IoT networks - and evolve with future versions of CoAP and related specifications.

Three types of proxies are planned to be supported:

  • CoAP to CoAP
  • CoAP to HTTP
  • HTTP to CoAP

There are plans to support different roles for each proxy type:

  • Forward
  • Reverse
  • Intercepting, aka transparent

There is a long list of possible features:

  • Support for all CoAP methods
    • GET, POST, PUT, DELETE
    • PATCH, iPATCH, FETCH
  • Secure messaging, aka coaps:// & https://
  • All options, including OBSERVE & Hop-Limit
  • Block transfers
  • Caching
  • Resource discovery
  • Protocol security upgrades. Ex. coap:// to coaps://
  • Group messaging
  • Congestion control

///

I've started with CoAP-to-CoAP proxying to lay the foundation and are working on DTLS & Caching. HTTP is next!

beriberikix avatar Jul 21 '20 14:07 beriberikix

Hi @beriberikix , Is there any new update on this initiative? I'd be interested to contribute/add features if there is an existing repo.

Thanks

arun1587 avatar Sep 22 '20 19:09 arun1587

Hi @arun1587! We haven't released the repo just yet but would love to chat more about your interest! Can we connect offline?

beriberikix avatar Sep 22 '20 19:09 beriberikix