Skip to content

Proposal: bi-directional stdin/stdout communication interface #450

Open
@prusnak

Description

@prusnak

Currently the communication with HWI goes like this:

exec hwi enumerate
read from stdout [ list of devices in json ]

exec hwi -t device command arguments
read from stdout ... json response ...

While this might be a better match:

exec hwi enumerate
read from stdout [ list of devices in json ]

exec hwi -t device connect
write to stdin { "command" : "command1", "args": { "arg1": "...", "arg2" : "...", ... } }
read from stdout { json response }
write to stdin { "command" : "command2", "args": { "arg1": "...", "arg2" : "...", ... } }
read from stdout { json another response }

Or even:

exec hwi
write to stdin { "command": "enumerate" }
read from stdout [ list of devices in json ]
write to stdin { "command" : "command1", "args": { "arg1": "...", "arg2" : "...", ... } }
read from stdout { json response }
write to stdin { "command" : "command2", "args": { "arg1": "...", "arg2" : "...", ... } }
read from stdout { json another response }

This would enable us to add so badly needed sessions into HWI and these sessions will exist only on memory, so we don't need to ponder how to store them on the filesystem. Having this would allow us to fix issues #326 or #447 easily without any hacks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions