Skip to content

Interchange: HOLD_WORKER command should not parse its own private protocol #3368

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

Open
benclifford opened this issue Apr 20, 2024 · 2 comments

Comments

@benclifford
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Interchange commands and responses are sent in structured objects (using pickle).

Nevertheless, the HOLD_WORKERS command contains an ad-hoc UTF-8/ASCII protocol to pass its parameter, which is treated as a byte string elsewhere in htex, not UTF-8:

2024-04-20 08:36:13.204 interchange:282 HTEX-Interchange(131272) Interchange-Command _command_server [DEBUG] Received command request: HOLD_WORKER;d9052d12878b

This command should use the existing data structures available for conveying a separate command and byte sequence argument, such as a tagged dictionary {"type": "hold_worker", "manager_id", bytes(d9052d12878b)} or a tuple.

This would remove some construction/parsing complexity and potentially give some cross-network type safety.

@benclifford
Copy link
Collaborator Author

crossref #3839 for another HOLD_WORKER tidyup

@benclifford
Copy link
Collaborator Author

see more protocol structure comment here #3840 (comment)

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

1 participant