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

How to support CoAP? #133

Open
tkellogg opened this issue Feb 4, 2014 · 3 comments
Open

How to support CoAP? #133

tkellogg opened this issue Feb 4, 2014 · 3 comments

Comments

@tkellogg
Copy link

tkellogg commented Feb 4, 2014

I'd like to explore the possibility of having a web framework support both HTTP and CoAP. How suitable would Blueeyes be to support an extension that handles both CoAP and HTTP requests and responses for the same resources? My idea would be to use Californium as the CoAP implementation. Even though it's written in Java, Californium should be mostly friendly toward being wrapped in a functional style, except for it's pervasive use of mutable data.

CoAP is a RESTful protocol that mirrors a lot of the functionality of HTTP/1.1 but as a compact binary protocol suitable for embedded devices. It runs over UDP, but the Californium implementation takes care of ACKs and resending messages. The biggest incompatibility is the fact that there aren't any custom CoAP headers and many of the normal HTTP headers don't have a CoAP analogy.

I'd like to pursue this, but I want to know your thoughts. Would this be difficult? Is blueeyes a suitable choice for this?

@jdegoes
Copy link
Owner

jdegoes commented Feb 4, 2014

RedEyes (AKA BlueEyes 2) would be a better fit for this, as it cleanly separates the specification of an API from its compilation to an executable format (this choice also allows but does not require the use of mutable implementation). The real question is, what would be the benefit? The ability to deploy both an HTTP API and a CoAP API simultaneously, from the same description?

@tkellogg
Copy link
Author

tkellogg commented Feb 4, 2014

Yes, precisely. CoAP endpoints are usually described in similar terms, with methods and URIs. There's a lot of overlap between how you interface with both protocols. Where is the repository for RedEyes?

@jdegoes
Copy link
Owner

jdegoes commented Feb 4, 2014

It's not public yet, but it will be at github.com/jdegoes/redeyes/ within the month.

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

No branches or pull requests

2 participants