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

Building an API Company From the Ground Up

Building an API Company From the Ground Up

Want to build an API company? I'll show you how! This talk covers the entire process from start to finish, with lots of examples and stories along the way.

Randall Degges

July 02, 2013
Tweet

More Decks by Randall Degges

Other Decks in Technology

Transcript

  1. http://rdegges.com
    Randall Degges
    CTO Telephony Research
    @rdegges

    View full-size slide

  2. 1. a command line app
    for the web
    (see also: library)

    View full-size slide

  3. print 'Yo'
    curl http://yo.com

    View full-size slide

  4. Like a web page...

    View full-size slide

  5. ... but easier.

    View full-size slide

  6. Find a
    problem

    View full-size slide

  7. APIs are for

    View full-size slide

  8. Caller ID
    (CNAM)
    1-(818) 217-9229
    Randall Degges

    View full-size slide

  9. Big Companies
    Monopolize
    Infrastructure

    View full-size slide

  10. Telco negotiations
    Data access
    cost $xxx, xxx
    requires special hardware and software

    View full-size slide

  11. Old Standards
    Have been around since early 1900s.
    15 character ASCII string.
    Vary from country to country.
    Aren't available in US mobile networks.
    Are complex....

    View full-size slide

  12. CNAM is complex.
    (925) 333-3333
    (925) 222-2222
    (925) 111-1111

    View full-size slide

  13. Small Community

    View full-size slide

  14. What Doesn't Suck about CNAM?
    CNAM
    sucks!

    View full-size slide

  15. What is
    A simple API for
    programmers that
    want Caller ID --
    without the bullshit.

    View full-size slide

  16. $ curl https://api.opencnam.com/v2/phone/+16502530000

    View full-size slide

  17. $ curl -H "Accept: application/json" \
    https://api.opencnam.com/v2/phone/+16502530000
    {
    "created": "2012-10-
    12T06:53:05.194858",
    "updated": "2012-12-
    05T19:58:13.770770",
    "name": "GOOGLE INC",
    "number": "+16502530000"
    }

    View full-size slide

  18. Make it Affordable
    300% cheaper
    than telcos

    View full-size slide

  19. Free CNAM queries (60 per hour)
    No account necessary

    View full-size slide

  20. (funny story)

    View full-size slide

  21. How Open CNAM Really Works

    View full-size slide

  22. Version 1 (beta)

    View full-size slide

  23. ● Django is well supported.
    ● Tastypie did almost all the API work (initially).
    ● PostgreSQL is reliable and simple.
    ● Celery is configurable and fast.
    ● Heroku is awesome.
    The Good

    View full-size slide

  24. ● Django + PostgreSQL are kinda slow.
    ● Tastypie required lots of customization
    (throttle, API key authentication,
    serialization).
    ● Celery has a lot of configuration options, and
    I kept messing them up.
    The Bad

    View full-size slide

  25. ● One big Django application with
    lots of lines of code.
    ● Tricky to deploy.
    Poor Architecture

    View full-size slide

  26. Goal: Feedback

    View full-size slide

  27. Hacker News
    https://news.ycombinator.com

    View full-size slide

  28. Programming
    Subreddit
    http://www.reddit.com/r/programming

    View full-size slide

  29. #startups
    irc://irc.freenode.net/#startups

    View full-size slide

  30. Listen to Your Users

    View full-size slide

  31. Go
    out of your way
    to help.
    tip:

    View full-size slide

  32. Simplify.
    tip:

    View full-size slide

  33. Keep a clear
    vision.
    tip:

    View full-size slide

  34. Simple
    code base.
    SOA Rocks:

    View full-size slide

  35. Clear
    purpose.
    SOA Rocks:

    View full-size slide

  36. Well defined
    APIs.
    SOA Rocks:

    View full-size slide

  37. Independent
    scaling.
    SOA Rocks:

    View full-size slide

  38. Isolated
    failure.
    SOA Rocks:

    View full-size slide

  39. ● Flask
    ● Amazon DynamoDB
    ● Heroku
    ● PostgreSQL

    View full-size slide

  40. Simple.
    Flask Rocks:

    View full-size slide

  41. Lightweight.
    Flask Rocks:

    View full-size slide

  42. Great
    Libraries.
    Flask Rocks:

    View full-size slide

  43. Simple JSON
    data store.
    DynamoDB Rocks:

    View full-size slide

  44. Hosted by
    Amazon.
    DynamoDB Rocks:

    View full-size slide

  45. Fast. Really
    Fast.
    DynamoDB Rocks:

    View full-size slide

  46. Like 1ms fast.
    DynamoDB Rocks:

    View full-size slide

  47. 2500% faster
    than
    PostgreSQL.
    DynamoDB Rocks:

    View full-size slide

  48. Cheap.
    DynamoDB Rocks:

    View full-size slide

  49. Reliable (data
    replicated).
    DynamoDB Rocks:

    View full-size slide

  50. SSD storage.
    DynamoDB Rocks:

    View full-size slide

  51. "DynamoDB
    is so fast, you
    don't need

    View full-size slide

  52. CNAM Lookup (free)

    View full-size slide

  53. Built on top
    of AWS.
    Heroku Rocks:

    View full-size slide

  54. Simple.
    Heroku Rocks:

    View full-size slide

  55. Reliable
    99.99%
    Heroku Rocks:

    View full-size slide

  56. Easy to scale.
    Heroku Rocks:

    View full-size slide

  57. Lots of
    addons.
    Heroku Rocks:

    View full-size slide

  58. ● heroku addons: add
    heroku-postgresql.
    ● fork
    ● follow
    PostgreSQL Rocks:

    View full-size slide

  59. SSL Everywhere!

    View full-size slide

  60. Which
    libraries do
    you use?

    View full-size slide

  61. dynamodb-mapper

    View full-size slide

  62. dynamodb-mapper Queries

    View full-size slide

  63. flask-login Loader

    View full-size slide

  64. flask-login Decorator

    View full-size slide

  65. How do you
    do billing?

    View full-size slide

  66. Marketing....

    View full-size slide

  67. YOU
    DON'T
    NEED
    MARKETERS

    View full-size slide

  68. You
    need to talk to
    people!

    View full-size slide

  69. Google your
    industry!

    View full-size slide

  70. Find your
    customers.

    View full-size slide

  71. Put contact
    names, company
    names and URLs
    into a Google doc.

    View full-size slide

  72. Email
    3 potential customers
    per day,
    asking for feedback.

    View full-size slide

  73. Listen
    to
    feedback.

    View full-size slide

  74. Best
    Practices

    View full-size slide

  75. Support a single
    serialization
    format (JSON).
    Best Practices

    View full-size slide

  76. Make use of drip
    email (intercom).
    Best Practices

    View full-size slide

  77. Best Practices
    Automate
    everything.

    View full-size slide

  78. Give it a Go
    Automate
    everything.

    View full-size slide

  79. Build Something Awesome

    View full-size slide

  80. http://rdegges.com @rdegges
    Thank
    You

    View full-size slide