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.

Confusion with the streaming example in section 13.1 of IDL v2

See original GitHub issue

Link. Example as of writing:

operation StreamingOperation {
    input: StreamingOperationInput
    output: StreamingOperationOutput
}

@input
structure StreamingOperationInput {}

@output
structure StreamingOperationOutput {
    @required
    streamId: String
    output: StreamingBlob
}

@streaming
blob StreamingBlob

I’m confused because:

  1. Smithy IDL v2 introduces a change where members targeting streaming blobs now MUST have @default or @required. However, output in the example above does not have any of the two traits attached.
  2. In IDL v1 there is a restriction on the streaming trait that says:

If a service supports a protocol that supports the httpPayload trait, any member that targets a streaming blob must also be marked as @httpPayload.

However, this restriction does not appear in IDL v2. Is that intentional? The Smithy library is still enforcing it for IDL v2 models:

= Member com.amazonaws.simple#AnOperationInput$streamingBlob referencing @streaming shape com.amazonaws.simple#StreamingBlob must have the @httpPayload trait, as service com.amazonaws.simple#SimpleService has a protocol that supports @httpPayload.

  1. The example is confusing because you can’t send both a string (streamId) and a streaming blob (output) in the same HTTP message body (?). I acknowledge that in another application-level protocol sending both pieces of data might be possible (which one?), but if you want to keep the example as-is, I think it would be better to call out immediately below it that it’s not realizable in HTTP.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mtdowlingcommented, Oct 24, 2022

The streaming blob has a default value assigned using = "" which is exactly the same as @default(""). I’ll add an HTTP binding for the streamId member. (Edit) Actually, we can just remove the streamId member. I don’t think it’s needed for the example.

1reaction
mtdowlingcommented, Oct 21, 2022

Oh! You’re right. I completely glossed over that this targeted a blob. The example is theoretically fine as is, but doesn’t work with any existing protocols, so I’ll change it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Interface Definition Language - Object Management Group
This clause describes OMG Interface Definition Language (IDL) middleware1-agnostic semantics2 and defines the syntax for IDL grammatical constructs. OMG IDL is ...
Read more >
Introducing Smithy IDL 2.0 | AWS Developer Tools Blog
The AWS Smithy team is happy to announce the 2.0 release of the Smithy Interface Definition Language (IDL). This release focuses on ...
Read more >
TAS1020B USB Streaming Controller datasheet (Rev. B)
An example of this is P3.2, which is used as the external interrupt (XINT) input to the TAS1020B. A detailed description of the...
Read more >
Media Source Extensions - W3C
13.1 Attributes. 14. Byte Stream Formats; 15. Examples; 16. Acknowledgments; 17. Revision History; A. References. A.1 Normative references ...
Read more >
HbbTV 2.0.3 Specification
HbbTV 2.0.3 Specification ... Adding and removing stream event listeners . ... A.1 Detailed section-by-section definition for volume 5 .
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