-
Notifications
You must be signed in to change notification settings - Fork 8
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
Design support for @streaming trait (including hand-written TestModel) #275
Comments
Renamed this to reflect the need for defining what the Dafny interfaces to implement will look like, and how they will be adapted to the various kinds of streaming input/output types each target language supports. |
Support for the An example of an operation requiring streaming support is
An example of code generated from this model can be found withIn the AWS SDK Go v2; the In order to support S3 clients in the AWS SDK, Smithy-Dafny must support at least data streams to be able to generate Dafny code that can interact with services such as S3 which have Event streams would allow Smithy-Dafny projects to support async streaming in the AWS SDK for Java which uses Reactive Streams to implement its event streaming functionality. Additionally, support for event streams would enable simpler implementations of other streaming functionality. Ideally, there would also be a way to convert between event streams and data streams. |
There are a number of examples of stream types in various "native" languages/runtimes that Smithy-Dafny will need to be able to handle. They can be broadly classified to one or more of each category:
In more detail: Smithy More specifically, this category refers to the streaming types which Smithy-* code generators generate. In some languages, such as Python and Go, this is defined by the existing codegen. In other languages, such as Java and .NET, this is subject to implementation with the codegen within Smithy-Dafny. AWS SDKs More specifically, this category refers to the streaming types which various AWS SDKs use. These may or may not match the streaming types produced by Smithy, depending on whether or not the given AWS SDK was generating using Smithy or not. Native Code This refers to streaming types which are found in the native language runtimes, and may be used in various implementations outside of the Smithy/AWS SDK dependency closure. ExamplesJava - Java.IOInputStream
OutputStream
Defined in the core Java - ReactiveStreamsSubscriber
See original source for Javadoc comments. Publisher
See original source for Javadoc comments. Defined in the Reactive Streams library, not part of the core Java API. Used by the AWS SDK v2 to support asynchronous programming and thus the S3EC. Note that the AWS SDK also includes and uses the Currently, the Java codegen in Smithy-Dafny generates a |
Also, I have published a branch of Lucas's Python-POC which adds a simple Streaming test model: https://github.com/smithy-lang/smithy-dafny/tree/justplaz/python-poc-streaming |
Depends on dafny-lang/libraries#70 to first define the idiomatic representation of streams in Dafny.
The text was updated successfully, but these errors were encountered: