Swagger, OpenAPI and Thrift vs Protobuf

3,322 views
Skip to first unread message

Yaswanth

unread,
Feb 15, 2016, 3:20:18 AM2/15/16
to Swagger
Hell All,

I am a part of a large organization that is planning to come up with a new API layer that is quick, developer friendly, standards based and easy to work on.
We are considering two types of APIs,

1. External APIs:
There are a few hundred API endpoints that are used by tens of thousands of developers. We want them to REST (pragmatic), yet easily available kits or code snippets in different languages like Java, PHP, Python, Scala, NodeJS, ObjC.

2. Internal APIs:
These are also in few hundreds of endpoints, but are used by internal systems (Web Services to Data Store, communication between different services etc). These need to be robust, available in Java, PHP, Python and NodeJS.

I have came across Swagger aka OpenAPI recently and I wanted the group's opinions, thoughts on different approaches one can take.

From what I read, I feel that External APIs should be done in Swagger generating code snippets in different languages.

For internatl APIs, I feel that Thrift or Protobuff are a better option to consider.

Ideally, I would want all the APIs (internal and external) to be on the same/similar platform for lower maintenance. Is RESTifying Thrift and Protobuff possible? Or would you suggest Swagger for everything? (isn't efficiency a problem?).

As part of the API layer, we would want to build a facade, followed by mediators and proxies in between to support different data formats and protocols like SOAP.

Is this a good approach or do you guys suggest a different one?

Any brick bats, comments and suggestions are most welcome. Thank you in advance.

Regards,
Yaswanth

Ron Ratovsky

unread,
Mar 16, 2016, 4:46:53 PM3/16/16
to swagger-sw...@googlegroups.com
Hi Yaswanth,

As you probably know, Thrift and Protobuf or more comparable to REST than to Swagger. Swagger is means to describe your REST API and automate processes around it.
Externally, yes, you’d probably want to go with a REST API, if only for it being the more common standard for such APIs and deals with some potentially known issues easily (security for example).

Internally, there are things to be said for either approach, and I don’t think there’s one right solution. 
The benefit of using REST internally is simplicity. The benefits of Thrift/Protobuf can indeed be performance.
Question is, what’s more important to you? Does the cost of performance wins the cost of simplicity? That depends on the product and the goals, and only you can answer that.

We’re looking into expanding the OpenAPI spec in the next version to include additional protocols – you can follow https://github.com/OAI/OpenAPI-Specification/issues/586 for progress.

Ron

PayUmoney hai #FaydeKiAadat

Disclaimer:


"This message is intended only for the use of the addressee and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify us immediately by return e-mail and delete this e-mail and all attachments from your system."

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages