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

CoAP Gateway shorten query identification #10089

Open
TomazCebekAstron opened this issue Mar 8, 2023 · 1 comment
Open

CoAP Gateway shorten query identification #10089

TomazCebekAstron opened this issue Mar 8, 2023 · 1 comment

Comments

@TomazCebekAstron
Copy link

TomazCebekAstron commented Mar 8, 2023

What would you like to be added or enhanced?

Emqx v5.0 feature request:
Currently every query is set as full name:
clientid
token
username
password
qos
retain

Make it possible to use single letter query identification :
clientid = c
token = t
username = u
password = p
qos = q
retain = r

So that the following commands can be transmited with a shorter packet size

connect command:

  • original: coap-client -m post -e "" "coap://127.0.0.1/mqtt/connection?clientid=123&username=admin&password=public"
  • proposed: coap-client -m post -e "" "coap://127.0.0.1/mqtt/connection?c=123&u=admin&p=public"

publish command:
-original: coap-client -m post -e "Hi, this is libcoap" "coap://127.0.0.1/ps/coap/test&clientid=123&token=3404490787"
-proposed: (on every publish we conserve 7(clientid=>c)+4(token => t) = 11 bytes)
coap-client -m post -e "Hi, this is libcoap" "coap://127.0.0.1/ps/coap%2Ftest&c=123&t=3404490787"

heartbeat command:

  • original: coap-client -m put -e "" "coap://127.0.0.1/mqtt/connection?clientid=123&token=3404490787"
  • proposed: coap-client -m put -e "" "coap://127.0.0.1/mqtt/connection?c=123&t=3404490787"

and so on...

Why is this needed?

The pdu sizes are becoming too big just for simple identification of a parameter...

@HJianBo HJianBo self-assigned this Mar 8, 2023
@HJianBo
Copy link
Member

HJianBo commented Mar 8, 2023

Great suggestion! Thanks @TomazCebekAstron We will try to provide it in the near future

HJianBo added a commit to HJianBo/emqx that referenced this issue Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants