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

Why is an API like a puppy?

Why is an API like a puppy?

There are many answers but the essence of this presentation from #CraftConf 2015 is that puppies and APIs are long-term commitments that most of us aren't ready for until we can show that we have thought through all the implications.

Ade Oshineye

April 24, 2015
Tweet

More Decks by Ade Oshineye

Other Decks in Technology

Transcript

  1. Share what you learn This is Dave and I at

    PLOP 2005. We’re grateful to the people who shared what they’ve learned. That’s why I’m going to share some things I’ve learned today.
  2. Who here has young children? Imagine I were to visit

    you and give your children a free puppy. What would happen?
  3. Free as in speech/beer/puppy Free as in beer/speech/puppy The worst

    kind of free. Overlooks the costs, responsibilities and consequences
  4. Real puppies Public APIs are different Let’s talk about some

    common but incorrect beliefs that people hold about public APIs
  5. Public API with real users doing business-valuable things in a

    competitive environment It also means that when I say API (in this presentation) I mean...
  6. Public API with real users doing business-valuable things in a

    competitive environment It also means that when I say API (in this presentation) I mean...
  7. Public API with real users doing business-valuable things in a

    competitive environment It also means that when I say API (in this presentation) I mean...
  8. Public API with real users doing business-valuable things in a

    competitive environment It also means that when I say API (in this presentation) I mean...
  9. Public API with real users doing business-valuable things in a

    competitive environment It also means that when I say API (in this presentation) I mean...
  10. Experience comes from mistakes At Google we’ve been around long

    enough to have believed and regretted all of the following misconceptions
  11. 1 2 3 4 Private API Consumer-facing UI Public API

    Ship it! Building a new feature First you build a private API then you build the consumer-facing product on top of it then you expose a public API that others can use and then you find out if it’s a good idea.
  12. • Who writes your public documentation? • Who answers questions

    on Stack Overflow? • Who promotes your API? Costs and consequences
  13. • Who prioritises and fixes API-specific bugs? • Who identifies

    and resolves API abuse/spam? Costs and consequences
  14. API design is a solved problem “Just use ReST” Generic

    clients and HATEOAS will take care of the rest
  15. API design is a solved problem Just use ReST “Just

    use ReST” Generic clients and HATEOAS will take care of the rest
  16. • You find yourself saying HATEOAS to angry people and

    it doesn’t make them less angry about the lack of documentation • You discover that the ways people want to use your APIs don’t map cleanly to the collections of resources that you designed Costs and consequences
  17. • You discover that you need client libraries for a

    variety of languages • You discover painful trade-offs involving API keys and OAuth Costs and consequences
  18. ???? This is a hackathon for Buzz in Stockholm in

    2010. We did everything right from an API perspective but it wasn’t enough. We broke McKellar’s Law.
  19. “A developer platform is only useful and interesting if it

    enhances something that’s already useful and is already used.” McKellar’s Law
  20. These APIs have something in common Twitter Snapchat Google Translate

    They became popular and then realised that wasn’t why they built an API
  21. Twitter’s quadrants Twitter realised that they could only make money

    with advertising if they controlled the most popular clients
  22. Google Translate and abuse Translate was sunset and then revived

    with a pricing plan because that’s the only way to control the kinds of abuse that happens with machine translation
  23. Short* answer: maturity This is why parents typically tell their

    children “when you’re older” rather than “you’re not mature enough”
  24. The API has a good reason to exist Whatever benefit

    you get from the API is enough to justify all of the costs
  25. You have a value exchange that works You know why

    your API is valuable You give something You get something Both sides are happy
  26. It scales with traffic 1 million QPD makes you happy

    1 billion QPD also makes you happy 1 trillion QPD makes you even happier
  27. You know how much your API will cost In terms

    of: - development -maintenance -support -staffing -opportunity cost for your core product
  28. Do you have the right team? You understand all the

    aspects that need to exist for your team to succeed
  29. Customers? You know who the potential customers and competitors are.

    You know how you will drive adoption of your API amongst those customers and in the face of competitive pressure
  30. Competitors? You know who the potential customers and competitors are.

    You know how you will drive adoption of your API amongst those customers and in the face of competitive pressure
  31. I’ve covered a lot of the pitfalls involved in launching

    a public API and hopefully it’s made you think twice. You now realise that the free puppy has hidden costs but my goal wasn’t to scare you away.