So you want to be a full-stack developer? How to build a full-stack python web application by Kate Heddleston

So you want to be a full-stack developer? How to build a full-stack python web application by Kate Heddleston

D21717ea76044d31115c573d368e6ff4?s=128

PyCon 2014

April 11, 2014
Tweet

Transcript

  1. Full-stack Python Web Applications

  2. Kate Heddleston @heddle317

  3. Python is often one part of a much larger system.

  4. None
  5. What we’re going to talk about... 1. A (semi) typical

    web application 2. Dev, staging, production, deploy system 3. Helpful python libraries
  6. What we’re not going to talk about... • Massively scalable

    web applications. • Every single installation on the machine. • Nitty gritty details of anything.
  7. Web Application

  8. Parts of a Stack 1. Operating System 2. Web Server

    3. Database 4. Application Language
  9. Web Server Apache mod_wsgi Application Code Python Application Code Python

  10. Postgres Database Data

  11. Web Server Apache mod_wsgi Application Code Python Postgres Database

  12. Web Server Application Code Database

  13. Web Server Nginx/ Gunicorn Apache/ mod_wsgi

  14. Application Code Frameworks Python libraries Frontend Static Files (maybe)

  15. Database PostgreSQL MySQL SQLServer Redis MongoDB

  16. Web Server Application Code Database Logging

  17. Logging Log files on the machine

  18. Web Server Application Code Logging Version Control Database

  19. Version Control git svn Github Bitbucket

  20. Web Server Application Code Logging Version Control Database SMTP Server

  21. SMTP Server PostmarkApp Sendgrid Amazon SES

  22. Web Server Application Code Logging Version Control Database SMTP Server

    Data Store Async Tasks
  23. Async Frameworks Twisted Tornado Async Tasks Python-rq/Redis Celery/RabbitMQ

  24. Web Server Application Code Logging Version Control Database SMTP Server

    Data Store Async Tasks !Exception Handling!
  25. !Exception Handling! Emails

  26. Web Server Application Code Logging Version Control Database SMTP Server

    Data Store Async Tasks !Exception Handling!
  27. Web Server Application Code Logging Version Control Database SMTP Server

    Data Store Async Tasks !Exception Handling!
  28. Web Server Application Code Logging Version Control Database SMTP Server

    Data Store Async Tasks !Exception Handling! Cache
  29. Cache Memcached Redis Varnish

  30. Web Server Application Code Logging Database Data Store Async Tasks

    !Exception Handling! Cache Monitoring
  31. Monitoring New Relic Nagios Pingdom

  32. Web Server Application Code Logging Database Data Store Async Tasks

    !Exception Handling! Cache
  33. Web Server Application Code Logging Database Data Store Async Tasks

    !Exception Handling! Cache
  34. !Exception Handling! Emails Sentry

  35. Web Server Application Code Logging Database Data Store Async Tasks

    !Exception Handling! Cache
  36. Logging Log Server Loggly Splunk

  37. Web Server Application Code Logging Database Data Store Async Tasks

    !Exception Handling! Cache
  38. Web Server Application Code Database Data Store Async Tasks Cache

    Web Server Application Code Cache Load Balancer
  39. Logging !Exception Handling! Monitoring Version Control SMTP Server

  40. Web Server Application Code Database Data Store Async Tasks Cache

    Load Balancer Web Server Application Code Cache Data Store Async Tasks Database Database
  41. System of Systems

  42. Production (aka everything you just built) Dev Deploy

  43. Dev Venv & Venvwrapper Vagrant & VirtualBox

  44. Deploy git pull & restart services

  45. Deploy Production (aka everything you just built) Dev Testing

  46. Testing Jenkins CircleCI TravisCI

  47. Deploy Production Dev Testing Staging Dev Dev

  48. Server Config Chef Puppet Ansible SaltStack Docker

  49. Deploy Chef Puppet Ansible SaltStack Docker

  50. Dev Venv & Venvwrapper Vagrant & VirtualBox

  51. Deploy Production Dev Testing Staging Dev Dev Deploy Production Dev

    Testing Staging Dev Dev
  52. Hosting AWS Rackspace Linode

  53. Chef Repo for a Web Application https://github.com/heddle317/django-chef-application

  54. PaaS Heroku Elastic Beanstalk

  55. Resources Maps https://github.com/heddle317/full-stack- resources/tree/master/resources_maps

  56. None
  57. None
  58. None
  59. Talk Maps https://github.com/heddle317/full-stack- resources/tree/master/talk_maps

  60. None
  61. None
  62. None
  63. None
  64. 3 Takeaways • What are the basic pieces of a

    full-stack. • What do these pieces look like in different environments. • Resources for learning more and working with these pieces.
  65. Ask your questions now. Kate Heddleston @heddle317 https://github.com/heddle317/full-stack-resources

  66. “A complex system that works is invariably found to have

    evolved from a simple system that works.” — John Gall, Systemantics (1975)
  67. “A system is never finished being developed until it ceases

    to be used.” — attributed to Gerald M. Weinberg
  68. “It is as if perfection be attained not when there

    is nothing more to add, but when there is nothing more to take away.” — Antoine de Saint-Exupéry, Terre des Hommes (1939)
  69. “There is no such thing as a small change to

    a large system.” — systems folklore, source lost in the mists of time
  70. “Everything should be made as simple as possible, but no

    simpler.” — commonly attributed to Albert Einstein; it is actually a paraphrase of a comment he made in a 1933 lecture at Oxford