4 ms·
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 d
by aszen 5y ago
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.
- monstrado 5y agoI feel like OP might be thinking of gRPC, which seems to closely resemble the use case Smithy is tackling.
- aszen 5y agogRPC to my knowledge uses protocol buffers to define services. But it's more of a framework for doing RPC. Smithy is a much more abstract notation for defining services independent of any implementation details, and it is resource based rather than message based.
- inshadows 5y ago> 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.
- aszen 5y agoThe main use case is to auto generate clients for services and even create stubs for service implementations. 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.
- jonhohle 5y agoAmazon has done this internally across several different iterations and it's fantastic. Being able to write a service definition and object model and then generating clients and service stubs makes it easy to model what client/server interaction will look like apart from implementation. When I was there, there were at least 3 protocol representations that you could expose for the same model, make it simple to support a variety of use cases.
- gravypod 5y agoProtobuf is commonly used to refer to both the serialization format and the IDL. You can use protos to specify JSON/REST endpoints. In past companies I've also used it to specify DB schemas.