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

Djangocong Apps to Services

Djangocong Apps to Services

240da217b000604a2302dfc8b02a9cad?s=128

Craig Kerstiens

April 14, 2012
Tweet

Transcript

  1. Django Apps to Services

  2. Craig Kerstiens @craigkerstiens work at @heroku

  3. Project App A collection of configuration and apps for a

    particular Website. (per Django Project) Django
  4. Project App A collection of configuration and apps for a

    particular Website. A web application that does something. I.e. Weblog, Poll, Ticket system (per Django Project) Django
  5. Within Django

  6. Project Within Django

  7. Project App Within Django

  8. Project App App Within Django

  9. Project App App App Within Django

  10. Project App App App Tickets FAQ FaqCreator Within Django

  11. REUSABILITY means faster features due to DRY (Don’t Repeat Yourself)

    REUSABILITY does not always mean SCALABILITY or MAINTAINABILITY
  12. Project App A collection of configuration and apps for a

    particular Website. A web application that does something. I.e. Weblog, Poll, Ticket system (per Django Project) Django
  13. Project App A collection of configuration and apps for a

    particular Website. A web application that does something. I.e. Weblog, Poll, Ticket system Django Service Method of communication over the web. Web APIs allow combination of multiple services
  14. None
  15. Tech imitate Teams Project App App App Tickets FAQ FaqCreator

    Company Support Knowledge Base
  16. App App Support Knowledge Base Teams Grow

  17. App App Support Knowledge Base Billing Teams Grow

  18. App App Support Knowledge Base Billing Marketing Teams Grow

  19. App App Support Knowledge Base Billing Marketing Analytics Mobile API

    Front End Social Teams Grow
  20. App App App Support Knowledge Base Billing Apps Grow Marketing

    Analytics Mobile API Front End Social 3 Apps
  21. App App App Support Knowledge Base Billing Apps Grow App

    App App Marketing Analytics Mobile App App App API Front End Social 9 Apps
  22. Support Knowledge Base Billing Apps Grow Marketing Analytics Mobile API

    Front End Social 9 Apps 1 Codebase
  23. Defined contract for communicating Service

  24. Defined contract for communicating Service $ curl -O $FAQ_API/create/ -X

    “question=my\ question source=123”
  25. In Python

  26. In Python data = { ‘question’: “my question”, ‘source’: 123

    } requests.POST(os.environ[‘FAQ_API’] + ‘/create/’, data=data)
  27. None
  28. Version Bump data = { ‘question’: “my question”, ‘source’: 123,

    ‘related’: [456, 789] } requests.POST(os.environ[‘FAQ_API’] + ‘/v2/create’, data=data)
  29. Version Bump data = { ‘question’: “my question”, ‘source’: 123,

    ‘related’: [456, 789] } requests.POST(os.environ[‘FAQ_API’] + ‘/v2/create’, data=data)
  30. Version Bump

  31. Version Bump data = { ‘question’: “my question”, ‘source’: 123,

    ‘related’: [456, 789] } requests.POST(os.environ[‘FAQ_API’] + ‘/v2/create’, data=data) STILL VALID requests.POST(os.environ[‘FAQ_API’] + ‘/v1/create’, data=data)
  32. Whats a service Provider API_HOST= http://127.0.0.1

  33. Whats a service Provider Endpoint API_HOST= http://127.0.0.1 /v1/create/

  34. Whats a service Provider Endpoint API_HOST= http://127.0.0.1 /v1/create/ Contract {

    ‘question’: ‘foo bar’, ‘source’: 123 }
  35. Service App

  36. Service App Models Views URLs Provider Endpoint Contract

  37. A SERVICE means REUSABILITY and enables SCALABILITY and MAINTAINABILITY

  38. A SERVICE means REUSABILITY and enables SCALABILITY and MAINTAINABILITY

  39. Fin. Resources http://bit.ly/djangocong http://bit.ly/appstoservices http://www.12factor.net