News for hackers. Stuff that matters.
Re:Smithy: A language for defining services and SDKs by aszen on Friday May 07, 2021 @07:35PM (#27082029)
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 by gravypod on Friday May 07, 2021 @08:31PM (#27082451)
Protobuf 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.
Re:Smithy: A language for defining services and SDKs by inshadows on Friday May 07, 2021 @07:48PM (#27082116)
> 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.

Re:Smithy: A language for defining services and SDKs by aszen on Friday May 07, 2021 @07:53PM (#27082176)
The 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.

Re:Smithy: A language for defining services and SDKs by jonhohle on Monday May 10, 2021 @04:45PM (#27110715)
Amazon 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.
Re:Smithy: A language for defining services and SDKs by monstrado on Friday May 07, 2021 @07:41PM (#27082069)
I feel like OP might be thinking of gRPC, which seems to closely resemble the use case Smithy is tackling.
Re:Smithy: A language for defining services and SDKs by aszen on Friday May 07, 2021 @07:49PM (#27082125)
gRPC 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.