question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Potentially competing receiver links when using command and control API

See original GitHub issue

Command and control API uses address control/${tenant_id}/${reply_id} for receiving responses in consumer applications. Users are free to choose ${reply_id}. If an application wants to receive all responses of one tenant, hono docs recommend to use an arbitrary (short) string as ${reply_id} without ${device_id} and to keep the receiver link open.

However, protocol adapters use a very similar addressing scheme to receive commands from applications in the form of control/${tenant_id}/${device_id}. If ${device_id} == ${reply_id} we now have two competing receiver links and messaging network can not distinguish if a message should be sent to protocol adapter or to the application.

One possible solution would be to change addressing scheme for responses to response/${tenant_id}/${reply_id}. Of course this would require an API change.

WDYT?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:22 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
calohmncommented, Jun 7, 2019

@sophokles73 Yes, however that would apply only for the AMQP adapter endpoint.

For HTTP and MQTT adapters, we would just add new command endpoints: HTTP command response: /command/res/${commandRequestId} MQTT command response: command///res/${req-id}/${status}

1reaction
calohmncommented, May 27, 2019

As suggested by @sophokles73, a solution that is easier to implement would be to keep the command response address pattern the same (“control”). For the command requests, the “command” prefix (instead of “control_request”) will be newly introduced.

The changes would then be:

  • Next Hono milestone (M4):
    • Introduce new command/${tenant_id} endpoint for sending commands (with gateway-mapping feature).
    • The existing control/${tenant_id}/${device_id} endpoint for sending commands will still work, but will lack the gateway-mapping feature. It will be marked as deprecated.
    • The existing control/${tenant_id}/${reply_id} address for the command responses stays the same.
  • Hono 1.0 or possibly later:
    • For Command sender links: Change control/${tenant_id}/${device_id} to control_request_internal/${tenant_id}/${device_id}. Only Protocol Adapter users shall get access to control_request_internal addresses then.
      • From that point on: Applications shall only use command/${tenant_id} as endpoint for sending a command, and control/${tenant_id}/${reply_id} for receiving command response(s).
Read more comments on GitHub >

github_iconTop Results From Across the Web

Command & Control API Specification for AMQP 1.0 - Eclipse
This link is used by the Business Application to send command messages. The Business Application has established an AMQP link in role receiver...
Read more >
Command-and-control servers: The puppet masters that ...
Command-and-control servers, also called C&C or C2, are used by attackers to maintain communications with compromised systems within a target network.
Read more >
Cisco Nexus 3400-S Series NX-OS Programmability Guide, Release ...
Cisco NX-OS provides several mechanisms such as SNMP, CLI, and Syslog to collect data from a network. These mechanisms have limitations that restrict...
Read more >
Command and Control (CaC) Tool | Cast - Google Developers
Test and debug Web Receiver apps using the Command and Control (CaC) Tool.
Read more >
Joint All-Domain Command and Control for Modern Warfare
A key concern for the Air Force is the air component commander's ability to integrate capabilities from domains other than air into multidomain...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found