plgd-dev / go-coap

Implementation of CoAP Server & Client in Go
https://coap.technology
Apache License 2.0
450 stars 116 forks source link

HTTP <> CoAP support via RFC 8075 #117

Open beriberikix opened 4 years ago

beriberikix commented 4 years ago

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 commented 4 years ago

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

jkralik commented 4 years ago

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.

beriberikix commented 4 years ago

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.

jkralik commented 4 years ago

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)

beriberikix commented 4 years ago

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

beriberikix commented 4 years ago

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

jkralik commented 4 years ago

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.

beriberikix commented 4 years ago

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!

jkralik commented 4 years ago

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.

beriberikix commented 4 years ago

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:

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

There is a long list of possible features:

///

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

arun1587 commented 4 years ago

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

beriberikix commented 4 years ago

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