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

Support CoAP #41

Open
beriberikix opened this issue Jan 19, 2019 · 1 comment
Open

Support CoAP #41

beriberikix opened this issue Jan 19, 2019 · 1 comment
Labels

Comments

@beriberikix
Copy link

CoAP is a protocol used in resource-constrained environments like IoT (see http://coap.technology.) libcoap is a popular C implementation of the protocol and includes a trivial server example. Could libcoap be used with facli.io?

@boazsegev
Copy link
Owner

Hi @beriberikix ,

Thanks for the question, I wasn't aware of CoAP until you posted this and I'm still reading through the links.

From an initial overview, I must admit that even though facil.io could support a CoAP application, it might not be the best fit.

CoAP assumes a stateless server, using UDP datagram messages rather than TCP/IP, while a lot of facil.io's library code is focused on managing stateful connections and managing tens of thousands of connections or more.

Also, CoAP assumes a constricted environment, sometimes with as little as 10Kb of memory space (possibly with no support for dynamic memory allocation). In contrast, when facil.io detects a failed memory allocation, it crashes, assuming an irrecoverable memory leak / error rather than a constricted environment.

Sure, there's a lot of code in facil.io that can be used for UDP connections or small footprint IoT communication, but it was designed for heavy loads.

If I had to design a working engine for CoAP, I'd probably use a lot of code from the facil.io core library... but I'm not sure facil.io is the best choice for light UDP loads, since it comes with extra baggage.

Kindly,
Bo.

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

No branches or pull requests

2 participants