API Driven Development with Goliath

API Driven Development with Goliath

APIs Rule Everything Around Us. Its the glue that binds the internet operating system together and is partly responsible for the run-away success of a number of startups including Twitter, Facebook and Foursquare.

General purpose frameworks don’t always make for great tools when designing a Service Oriented Architecture or for building Hypermedia APIs. Sure, you can develop everything as a set of RESTful resources, but the temptation to mix presentation logic with your business logic is quite high and can lead to a cluttered and bloated codebase.

What we need is a dedicated API framework, one that speaks HTTP natively and is flexible enough to bend to the will of even the most demanding API designers.

Enter Goliath, the asynchronous ruby framework by Postrank Labs, that was created with the sole purpose of building and deploying Hypermedia APIs, ready to serve a massive amount of concurrent traffic. Built on Event Machine and Rack, this low level framework provides just enough structure and middleware to get you up and running and then gets out of your way.

In this session we’ll explore its feature set, talk a bit about good RESTful API design, and highlight some of the pros and cons of using Goliath instead of Sinatra or Rails for building your next Web Service.

E83d41789fe69fc6b149992cc0abc4e7?s=128

Eric Marden

April 24, 2012
Tweet

Transcript

  1. API Driven Development with Goliath Eric Marden @xentek

  2. Hello, World { name: “Eric Marden”, twitter: “@xentek”, blog: “xentek.net”,

    self_link: “ericmarden.com” } 200 OK
  3. Hypermedia APIs REST vs Hypermedia Discoverable Cacheable Linkable HATEOAS API

    Driven Development
  4. Goliath what is it? how can I use it to

    build awesome hypermedia apis? how does it compare to...? tips, tricks, and gotchas
  5. Goliath what is it?

  6. Goliath asynchronous low level rack-based built on event machine (reactor

    pattern) ruby fibers native http parser
  7. Goliath features

  8. Goliath easy to learn easy to test rich middleware stack

    fast
  9. Goliath request cycle

  10. Goliath

  11. None
  12. Goliath

  13. Goliath route map

  14. Goliath

  15. Goliath middleware

  16. None
  17. Goliath endpoint

  18. None
  19. Goliath how does it compare to…?

  20. Goliath rails versus

  21. Goliath sinatra versus

  22. Goliath tips, tricks, and gotchas

  23. Goliath models, modules, and objects OH MY

  24. None
  25. None
  26. Goliath configuration

  27. None
  28. Goliath headers

  29. Goliath

  30. Goliath status codes

  31. None
  32. Goliath validation

  33. Goliath Goliath::Rack::Validation::RequiredParam Goliath::Rack::Validation::RequiredValue Goliath::Rack::Validation::RequestMethod ...and many more

  34. Goliath error handling

  35. None
  36. Goliath blocking the reactor

  37. Goliath testing

  38. None
  39. KTHXBYE { name: “Eric Marden”, twitter: “@xentek”, blog: “xentek.net”, self_link:

    “ericmarden.com” } 410 GONE
  40. Further Reading http://goliath.io http://designinghypermediaapis.com/ http://j.mp/rest-fielding-dissertation http://j.mp/api-only-apps-with-rails https://gimmebar.com/loves/xentek/tag/hypermedia http://httpstatus.es/