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
Simplification of interface InteractionOutput #292
Comments
I'll start from this hypothesis:
Having said that we could try to cover everything with the interface you're proposing. Simply put the runtime could return a ReadableStream in the What if the application knows that it is running on a constraint device and whats to carefully dimension the reading buffer so that it can accomplish another acquisition task? Runtimes could detect low memory conditions but the applications would not have control over this decision; they would receive randomly a stream or a parsed value as a response accordingly to the current memory conditions of the device. Probably this is a corner case... So I could still accept an API based on your suggestion as a sub-optimal solution to increase the simplicity of the platform. However, we must not drop the support for a streaming-based interaction between things. |
Thanks @relu91 for your feedback!
The application can still not prefer one over the other. It is the the runtime that decides what gets returned. [Edit: I think there is some freedom in interpretation here. Does application mean the application in the runtime or on the consumed side] |
The use case we agreed was like this:
This is pretty straightforward if the impl is using the Fetch API or similar library. Also, it's the most generic and convenient for apps. In Web APIs the usability/user convenience has higher priority than ease of implementation, but in this case the Body mixin is a given, so there is not even any complication, just standard interfaces. |
Scripting API Call 2021-02-01
|
I think this issue has been settled by now and I will close it. |
While looking again at the
interface InteractionOutput
definition I felt it could be very much simplified as follows:Let me try to explain why I think this would be sufficient.
form
may provide hints about the form usedschema
may provide information about the actual type (if various types are possible)value
can be directly processed (without promises)The additional
ArrayBuffer
,ReadableStream
,boolean dataUsed
to me makes it more complex than needed.I am happy to hear your push-back and your arguments :-)
To be honest, I don't have a very strong argument. I just feel scripting should be simple to use...
The text was updated successfully, but these errors were encountered: