Yes, you should provide a client library for your API! (RubyConf 2018)
Tags: ruby, api
Published: 2019-07-08 20:39:39

---
title: Yes, you should provide a client library for your API! (RubyConf 2018)
published: true
tags: ruby, api
canonical_url: https://daniel-azuma.com/articles/talks/rubyconf-2018
---

On Nov 13, 2018, I spoke on "Yes, you should provide a client library for your API!" at RubyConf in Los Angeles, CA. The talk discussed the benefits of providing client libraries for HTTP-based APIs, and some techniques for writing them.

Here’s a small list of resources that I either mentioned in the talk or are closely related. Feel free to share more in the comments!

## Talk resources

- [Video on Confreaks](https://confreaks.tv/videos/rubyconf2018-yes-you-should-provide-a-client-library-for-your-api)
- [Slides on SpeakerDeck](https://speakerdeck.com/dazuma/yes-you-should-provide-a-client-library-for-your-api)

## Code generation frameworks

- [OpenAPI](https://openapis.org) is an open standard that works well for REST APIs.
- [gRPC](https://grpc.io) is a high-performance RPC framework originally developed by Google, that uses HTTP/2 and protocol buffers.
- [Apache Thrift](https://thrift.apache.org/) is an RPC framework originally developed by Facebook.

### Resources related to OpenAPI

- [Schema-first API Design](https://yos.io/2018/02/11/schema-first-api-design/) is a great article for getting oriented with OpenAPI.
- [Generating OpenAPI From Code](https://www.blazemeter.com/blog/how-to-generate-openapi-definitions-from-code)
- [Swagger integration libraries](https://swagger.io/tools/open-source/open-source-integrations/)
- [Swagger editor](https://swagger.io/tools/swagger-editor/) for editing OpenAPI spec.

### Resources related to gRPC

- [Protocol buffers](https://developers.google.com/protocol-buffers/) is the structured data serialization mechanism used by gRPC.
- [HTTP/2: Smarter at Scale](https://www.cncf.io/blog/2018/07/03/http-2-smarter-at-scale/) is a useful article describing HTTP/2 which underlies gRPC.
- [gRPC on HTTP/2: Engineering a Robust High Performance Protocol](https://www.cncf.io/blog/2018/08/31/grpc-on-http-2-engineering-a-robust-high-performance-protocol/) is another article useful for understanding gRPC.

### Related resources

- [Slide deck discussing how Oracle and Azure manage APIs](https://schd.ws/hosted_files/apistrat18/b2/APIStrat-presentation-joe-levy-david-justice.pdf)
- [GraphQL](https://graphql.org/learn/) is a data schema system, similar in some respects but more limited in scope. You might find it useful in conjunction with a full API specification framework.
- [OpenCensus](https://opencensus.io/) is an open framework for collecting and reporting instrumentation information.

## Other API design resources

- [Google’s API design guide](https://cloud.google.com/apis/design/) is public, and describes Google’s API design principles, some of which are specific to Google, but most of which should apply broadly to APIs in general.

## Thanks

Thanks to Jeff who did a bunch of preliminary research and presented an earlier version of this talk at CodeBEAM, and to Graham for reviewing and providing suggestions. Thanks to Google for sponsoring my appearance at RubyConf this year.