How does this compare to Google’s protocol buffers? [0] It looks like smithy has a broader set of applications. [0] https://developers.google.com/protocol-buffers
To me it seems like protocol buffers are a serialisation format while Smithy is just an idl used to describe services. The services are free to serialize the data in any way be it json, XML or even protocol buffers. So Smithy is more comparable to OpenApi than Protocal buffers.
Smithy: A language for defining services and SDKs
11–20 of 77 posts
Re: Smithy: A language for defining services and SDKs
#12How does this compare to Google’s protocol buffers? [0] It looks like smithy has a broader set of applications. [0] https://developers.google.com/protocol-buffers
To me it seems like protocol buffers are a serialisation format while Smithy is just an idl used to describe services. The services are free to serialize the data in any way be it json, XML or even protocol buffers. So Smithy is more comparable to OpenApi than Protocal buffers.
What's the use of such descriptions aside from diagrams? I realize there's e.g. terraform that use similar kind of language to describe what to create/destroy.
Re: Smithy: A language for defining services and SDKs
#13Earlier quoted context omitted.
To me it seems like protocol buffers are a serialisation format while Smithy is just an idl used to describe services. The services are free to serialize the data in any way be it json, XML or even protocol buffers. So Smithy is more comparable to OpenApi than Protocal buffers.
I feel like OP might be thinking of gRPC, which seems to closely resemble the use case Smithy is tackling.
Smithy is a much more abstract notation for defining services independent of any implementation details, and it is resource based rather than message based.
Re: Smithy: A language for defining services and SDKs
#14I think it's a really powerful paradigm. I think an org adopting such patterns widespread leads to some really rad capabilities. GDPR compliance, for example, is really tough in SOA architectures in companies without a ton of engineering capacity, but this sort of data/api introspection could do a lot to change that.
Any plans to open source projection for languages other than Java?
edit: I see that typescript and rust are available on github as well
Re: Smithy: A language for defining services and SDKs
#15Earlier quoted context omitted.
To me it seems like protocol buffers are a serialisation format while Smithy is just an idl used to describe services. The services are free to serialize the data in any way be it json, XML or even protocol buffers. So Smithy is more comparable to OpenApi than Protocal buffers.
> while Smithy is just an idl used to describe services What's the use of such descriptions aside from diagrams? I realize there's e.g. terraform that use similar kind of language to describe what to create/destroy.
AWS sdks need to be implemented in dozens of languages so something like Smithy helps in code gen for multiple languages, avoiding the massively manual task of creating client apis.
Re: Smithy: A language for defining services and SDKs
#16Re: Smithy: A language for defining services and SDKs
#17How does this compare to Google’s protocol buffers? [0] It looks like smithy has a broader set of applications. [0] https://developers.google.com/protocol-buffers
To me it seems like protocol buffers are a serialisation format while Smithy is just an idl used to describe services. The services are free to serialize the data in any way be it json, XML or even protocol buffers. So Smithy is more comparable to OpenApi than Protocal buffers.
Re: Smithy: A language for defining services and SDKs
#18How does this compare to Google’s protocol buffers? [0] It looks like smithy has a broader set of applications. [0] https://developers.google.com/protocol-buffers
We started working on Smithy around 2018 because we wanted to improve the scale of our API program and the AWS SDK team to deal with the growing number of services (over 250 now!) and languages we want to support in official AWS SDKs (like the newly released Rust SDK). We had a ton of existing services that we needed to be compatible with, but we also wanted to add new features to improve new services going forward too.
We needed a very flexible meta-model that allows us to continue to evolve the model to account for things like integrating with other systems and to model service-specific customizations that each AWS SDK team can implement independently. Smithy's meta-model is based on traits, a self-describing way to add more information to models. Lots of validation can be built in to custom traits, which helps to ensure that service teams are using traits properly and adhere to their specifications. Smithy's resource modeling helps us here too because it allows AWS service teams, as they adopt Smithy, to essentially automatically support CloudFormation resource schemas. Resources also help us to point service teams in the right direction to make their services work well over HTTP (which methods to use, URIs, safety, idempotency, etc).
We needed an integrated model validation, linting, and diff tool to keep services consistent and detect breaking changes, and it needed to support company-wide standards as well as service-specific standards. We use Smithy’s validation system to automatically enforce API standards, and service teams often create their own service-specific rules to keep their own internal consistency.
We needed built-in input validation constraints so that they're standard across services and clients (e.g., length, range, pattern, etc). We didn't want to rely on third-party extensions to provide this feature since validating inputs is important. AWS uses internal service frameworks that enforce these constraints and are compatible with Smithy models. We're working to create open source service frameworks for Smithy as well.
We also wanted to support various serialization formats so that clients work with all of our existing services spread across JSON, XML, query strings, RPC, and HTTP APIs, but we also wanted to be able to evolve our serialization formats in the future as new technology comes along. That's why Smithy is protocol agnostic (like gRPC actually). The serialization format is an implementation detail. Smithy has some support for MQTT as well.
And finally, we need our code generators to be really flexible to support service customizations. There's quite a few customizations across AWS services, and we needed a way to inject custom code generation logic in various parts of our generators.
Smithy is still in heavy development, and we're working on building out more of the tooling so it can be used easily outside of AWS SDKs too, including client and server code generation.
Re: Smithy: A language for defining services and SDKs
#19Is this how the Python `aws` CLI and boto is implemented?
Kind of. The AWS CLI uses an Amazon internal modeling format used to define services that's based on another Amazon internal modeling format that has been in use for about 15 years (and it's based on another internal model etc..). Smithy is basically the open source v2 of both, but with a public spec and tooling. Eventually all the AWS SDKs and the AWS CLI will adopt Smithy. (I work on the AWS SDKs and created Smithy…
Re: Smithy: A language for defining services and SDKs
#20Earlier quoted context omitted.
Kind of. The AWS CLI uses an Amazon internal modeling format used to define services that's based on another Amazon internal modeling format that has been in use for about 15 years (and it's based on another internal model etc..). Smithy is basically the open source v2 of both, but with a public spec and tooling. Eventually all the AWS SDKs and the AWS CLI will adopt Smithy. (I work on the AWS SDKs and created Smithy…
Are there examples of utilizing Smithy with WebSockets as the transport? I found the documentation of MQTT bindings and the general information about event streams. However, I'm struggling to map it all together. I imagine there will need to exist WebScoket bindings?