Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A Public API

A Public API

I spoke at the Full Stack Engineering Meetup about Gilt's Public API, which I worked on in 2011 and 2012.

Avatar for Casey Kolderup

Casey Kolderup

December 17, 2013

More Decks by Casey Kolderup

Other Decks in Technology

Transcript

  1. HI HELLO • Senior Software Engineer at Gilt • 2011-2012:

    Public API • 2012-Present: Gilt City
  2. Public API • nearly 1k registered, including Shopstyle and Yipit

    • serving ~100k requests per hour • 4% affiliate commission program available
  3. • Client library JAR • Written in Scala with a

    Java-compatible API • Very light caching in these clients Commons
  4. The Commons repository should contain the highest examples of quality

    code at Gilt. This means that: Commons —Mike Bryzek, ~/src/commons-core/README.md
  5. Methods are concise and each function does at most 1

    thing Commons —Mike Bryzek, ~/src/commons-core/README.md
  6. You have reviewed each line of code and can honestly

    say that at the moment you have no idea how to improve the clarity of the code Commons —Mike Bryzek, ~/src/commons-core/README.md
  7. • no more Map<String, Object> • instead: User, Product, Sale,

    Size, Country • “Commons-style clients” now expected Commons
  8. • Pure Scala service • If Commons were a database,

    this would be a view • Moderate caching • 75% marshaling svc-syndication
  9. The API Stack Three layers • Web (and Cache… and

    Auth…) • Syndication • Commons
  10. • Apigee Gateway (VM running a Java app) • Apigee

    Key Manager (Ruby on Rails) • Gilt Developer Portal (Play Framework) Web
  11. • Attend hackathons around the community • Engage with outside

    developers • Use as an optional way to screen incoming candidates • Work with bloggers & partners Recruiting & Evangelism
  12. • What's overly complex/hard to document? • What's dangerous to

    expose? • What’s hard to get to? Reflection
  13. • Currently missing features we would want on the frontend

    like checkout, search, etc • In some ways, because of Commons, it’d just be another layer of indirection Using Your Own API
  14. • 1.0 of our Public API matured quickly, so we

    feel confident about the quality & documentation • It has reliable automated testing & monitoring in place across the full stack—just like any internal app Using Your Own API
  15. So?