SlideShare a Scribd company logo
Build, deploy and scale:
Django, GraphQL and SPA
@dhilipsiva
@dhilipsiva
●
Optimistic Nihilist
●
Democratic Socialist
●
I code for fun & profit
●
I love Science, Python, FOSS & தமிழ்
●
Dad of 2. Environmentalist. Story Teller.
Gamer.
●
Jack of all trades & Master of none
●
A volunteer for progressives
I have no idea what I am talking about 🤪
Credentials
●
11+ years of professional experience in
python
●
Built over 20 different products using
django alone
●
Scaled more than 5 products to serve
millions of requests per second
●
Built a Device Farm (iOS and Android)
●
Involved in building a Bitcoin mining
farm with Rpi + ASIC (aws for miners)
Profession
VP of Engineering @ Reckonsys
Hitoshīkage @ Nitimis
Why GraphQL?
●
Much more standardized than the
fragmented RESTful implementations
●
Out-of-box live & browsable
documentation
●
No back-and-forth communication
between API developer and SPA
developer
●
Precise queries
Let’s look at our (buggy ) demo app
😬
https://stackopenflow.space
It is a very silly StackOverflow
clone
Stack
●
Python
●
Django
●
Graphene
●
Django-graphql-jwt
●
Django-rules
●
postgres
●
JavaScript
●
React
●
Relay
●
easy-peasy
Graphene
●
Custom field defs
●
Syncronous
●
Mature
●
Status Quo
●
Fantastic Django
integration
Strawberry.rocks
●
Dataclasses
●
Asyncronous
●
Not-so-mature
●
Future (maybe)
●
Very minimal
Django integration
Per-object perms
●
Choose a rule based framework (like django-
rules) over a DB-based framework (guardian)
●
Less DB calls = less latency
●
No unnecessary migrations gue to change in
logic
●
Easier to maintain
Why React?
●
Plays really well with GraphQL (Facebook being
a big proponent of both React and GraphQL)
●
Can build native applications with react-
native. So a front-end engineer can easily
scale-up as a mobile application developer.
●
Second only to vue.js in terms of
community/popularity
Why Relay?
●
Relay’s APIs are cleaner compared to
Apollo
●
Hooks are 1st
class citizens
●
Out of box caching support
●
Backed by Facebook (just like GraphQL and
React) so React has excellent
integration.
●
Relay-compiler is fantastic at catching
errors
Why easy-peasy?
●
Hooks are 1st
class citizens
●
Less boilerplate
●
Pleasant APIs
●
Ease of use
Project Layout
●
All other django apps are placed
under the django root
“stackopenflow” app (the module that
contains settings.py, urls.py,
wsgi.py, etc)
●
Therefore, all imports are
namespaced with “stackopenflow”
Typical Modules
●
admin.py
●
apps.py
●
models.py
●
tests.py
●
views.py
Our Modules
●
admin.py
●
apps.py
●
behaviours.py
●
choices.py
●
inputs.py
●
models.py
●
mutations.py
●
queries.py
●
tests.py
●
types.py
Let’s walk through the source code
Django & React
https://github.com/djconeu2021/stackopenflow-api
https://github.com/djconeu2021/stackopenflow-app
bigga
●
https://github.com/djconeu2021/bigga
●
A docker-compose based deployment
●
Can be configured to be used to
docker-swarm with minimal changes
●
Handy for local development too
●
Suitable for cheap, non-production
workloads
●
Code walk through
AWS copilot
●
https://aws.github.io/copilot-cli
●
ECS on AWS Fargate (serverless containers)
●
Very reliable & scaleable, but vendor dependent
●
Easy auto scaling configuration
●
Cheaper & faster than Lambda (serverless functions)
●
But be sure set-up along with tools like Terraform
SPA Deployment
●
S3 + CloudFront + ACM
●
Cheaper than alternatives like Netlify
●
Less latency
●
Manual Setup:
https://github.com/reckonsys/bigga/blob/community/S3_FRONTEND_DEPLOYMENT.md
●
Pyinvoke Script:
https://github.com/reckonsys/bigga/blob/community/tasks.py
Thank You
@dhilipsiva
dhilipsiva@pm.me
https://dhilipsiva.com
https://t.me/dhilipsiva

More Related Content

What's hot (19)

PDF
Nimble - iOS dependency management
Nimble
 
PPT
Introduction to Grails
Hiten Pratap Singh
 
ODP
LibreTime: a web-based automation system for radio - presentation at Ohio Li...
Robb Ebright
 
PDF
So I Downloaded Qt, Now What?
Janel Heilbrunn
 
PPTX
stageTEK5_2016_cisner_w
William Cisneros
 
PDF
CI/CD: Lessons from LinkedIn and Mockito
C4Media
 
PDF
Update on the open source browser space (16th GENIVI AMM)
Igalia
 
PDF
Mule soft meetup__jaipur_december_2020_final
Lalit Panwar
 
PDF
Mobile development with JBoss Tools
Gorkem Ercan
 
PPTX
Ivan Pashko ITEM 2018
ITEM
 
PDF
Bootify Yyour App from Zero to Hero
EPAM
 
PDF
J2EE6_DevelopWebApplications_00_Preample
Michael Mountrakis
 
PDF
MuleSoft London Community September 2020 - Project Vita
Pace Integration
 
PDF
Mp25: Mobile dev with QT and Python for the Notorious N9
Montreal Python
 
PDF
Parallel development of Web Apps | Codesushi - Gliwice 2017
Krzysztof (Chris) Ozog
 
PDF
Deploy Multinode GitLab Runner in openSUSE 15.1 Instances with Ansible Automa...
Samsul Ma'arif
 
PDF
Laravel workshop
Jasper Frumau
 
PDF
The Evolving Role of Build Engineering in Managing Open Source
DevOps.com
 
PDF
Let's Go @ St. Louis CocoaHeads
Paul Balogh
 
Nimble - iOS dependency management
Nimble
 
Introduction to Grails
Hiten Pratap Singh
 
LibreTime: a web-based automation system for radio - presentation at Ohio Li...
Robb Ebright
 
So I Downloaded Qt, Now What?
Janel Heilbrunn
 
stageTEK5_2016_cisner_w
William Cisneros
 
CI/CD: Lessons from LinkedIn and Mockito
C4Media
 
Update on the open source browser space (16th GENIVI AMM)
Igalia
 
Mule soft meetup__jaipur_december_2020_final
Lalit Panwar
 
Mobile development with JBoss Tools
Gorkem Ercan
 
Ivan Pashko ITEM 2018
ITEM
 
Bootify Yyour App from Zero to Hero
EPAM
 
J2EE6_DevelopWebApplications_00_Preample
Michael Mountrakis
 
MuleSoft London Community September 2020 - Project Vita
Pace Integration
 
Mp25: Mobile dev with QT and Python for the Notorious N9
Montreal Python
 
Parallel development of Web Apps | Codesushi - Gliwice 2017
Krzysztof (Chris) Ozog
 
Deploy Multinode GitLab Runner in openSUSE 15.1 Instances with Ansible Automa...
Samsul Ma'arif
 
Laravel workshop
Jasper Frumau
 
The Evolving Role of Build Engineering in Managing Open Source
DevOps.com
 
Let's Go @ St. Louis CocoaHeads
Paul Balogh
 

Similar to Build, deploy and scale: Django, GraphQL and SPA (DjangoCon EU 2021) (20)

PPTX
React django
Heber Silva
 
PDF
PiterPy 2016: Parallelization, Aggregation and Validation of API in Python
Max Klymyshyn
 
PDF
Django vs React: Which is Better for Web Development? - Semiosis Software Pri...
Semiosis Software Private Limited
 
PDF
How we realized SOA by Python at PyCon JP 2015
hirokiky
 
PDF
A Day in the Life of a Silicon Valley Startup
Sachin Rekhi
 
PDF
Django for Professionals Production websites with Python Django 4 0 William S...
piipadinney
 
PDF
Django at Scale
bretthoerner
 
PPTX
PyCONKE meetup 2019: Microservices
Samuel Olembo
 
PDF
Building RESTful APIs
Silota Inc.
 
PPTX
Build GraphQL APIs with Graphene (Big Mountain Data & Dev 2019)
Ayla Khan
 
PDF
GraphQL: Enabling a new generation of API developer tools
Sashko Stubailo
 
PDF
GraphQL With Relay Part Deux
Brad Pillow
 
PPTX
Realtime web2012
Timothy Fitz
 
PDF
Lightweight Django 1st Edition Julia Elman
zenuredosik
 
PDF
Advantages Of Using Django Framework To Build Scalable.pdf
Mindfire LLC
 
PDF
PyCon Korea - Real World Graphene
Marcin Gębala
 
PDF
Free django
Eugen Oskin
 
PDF
貴圈真亂 React生態圈
Ben Liu
 
PDF
Django Javascript Integration Ajax And Jquery 1st Edition Jonathan Hayward
enaidamatoti
 
PPTX
Relay: Seamless Syncing for React (VanJS)
Brooklyn Zelenka
 
React django
Heber Silva
 
PiterPy 2016: Parallelization, Aggregation and Validation of API in Python
Max Klymyshyn
 
Django vs React: Which is Better for Web Development? - Semiosis Software Pri...
Semiosis Software Private Limited
 
How we realized SOA by Python at PyCon JP 2015
hirokiky
 
A Day in the Life of a Silicon Valley Startup
Sachin Rekhi
 
Django for Professionals Production websites with Python Django 4 0 William S...
piipadinney
 
Django at Scale
bretthoerner
 
PyCONKE meetup 2019: Microservices
Samuel Olembo
 
Building RESTful APIs
Silota Inc.
 
Build GraphQL APIs with Graphene (Big Mountain Data & Dev 2019)
Ayla Khan
 
GraphQL: Enabling a new generation of API developer tools
Sashko Stubailo
 
GraphQL With Relay Part Deux
Brad Pillow
 
Realtime web2012
Timothy Fitz
 
Lightweight Django 1st Edition Julia Elman
zenuredosik
 
Advantages Of Using Django Framework To Build Scalable.pdf
Mindfire LLC
 
PyCon Korea - Real World Graphene
Marcin Gębala
 
Free django
Eugen Oskin
 
貴圈真亂 React生態圈
Ben Liu
 
Django Javascript Integration Ajax And Jquery 1st Edition Jonathan Hayward
enaidamatoti
 
Relay: Seamless Syncing for React (VanJS)
Brooklyn Zelenka
 
Ad

More from Dhilipsiva DS (12)

PDF
Introduction To DevOps Workshop @ New Horizon College
Dhilipsiva DS
 
PDF
Deploy your Python code on Azure Functions
Dhilipsiva DS
 
PDF
Garuda: Automagically Exposing Djagno ORM over gRPC for microservices written...
Dhilipsiva DS
 
PDF
AWS LearnUp - Intro to AWS Services - Venturesity
Dhilipsiva DS
 
PDF
Python Workshop Day - 2 (REVA University)
Dhilipsiva DS
 
PDF
Full-Stack Development
Dhilipsiva DS
 
PDF
BangML Meetup 1: The Path to Becoming an Machine Learning Expert
Dhilipsiva DS
 
PDF
Architecture @ Appknox
Dhilipsiva DS
 
PDF
Microservices with Swagger, Flask and Docker
Dhilipsiva DS
 
PDF
Container (Docker) Orchestration Tools
Dhilipsiva DS
 
PPT
IEEE
Dhilipsiva DS
 
PPT
MuLiST
Dhilipsiva DS
 
Introduction To DevOps Workshop @ New Horizon College
Dhilipsiva DS
 
Deploy your Python code on Azure Functions
Dhilipsiva DS
 
Garuda: Automagically Exposing Djagno ORM over gRPC for microservices written...
Dhilipsiva DS
 
AWS LearnUp - Intro to AWS Services - Venturesity
Dhilipsiva DS
 
Python Workshop Day - 2 (REVA University)
Dhilipsiva DS
 
Full-Stack Development
Dhilipsiva DS
 
BangML Meetup 1: The Path to Becoming an Machine Learning Expert
Dhilipsiva DS
 
Architecture @ Appknox
Dhilipsiva DS
 
Microservices with Swagger, Flask and Docker
Dhilipsiva DS
 
Container (Docker) Orchestration Tools
Dhilipsiva DS
 
Ad

Recently uploaded (20)

PPTX
Maternal and Child Tracking system & RCH portal
Ms Usha Vadhel
 
PPTX
CONVULSIVE DISORDERS: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PPTX
Blanket Order in Odoo 17 Purchase App - Odoo Slides
Celine George
 
PDF
Federal dollars withheld by district, charter, grant recipient
Mebane Rash
 
PDF
FULL DOCUMENT: Read the full Deloitte and Touche audit report on the National...
Kweku Zurek
 
PPTX
SCHOOL-BASED SEXUAL HARASSMENT PREVENTION AND RESPONSE WORKSHOP
komlalokoe
 
PPTX
Explorando Recursos do Summer '25: Dicas Essenciais - 02
Mauricio Alexandre Silva
 
PPTX
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
PPTX
SAMPLING: DEFINITION,PROCESS,TYPES,SAMPLE SIZE, SAMPLING ERROR.pptx
PRADEEP ABOTHU
 
PDF
07.15.2025 - Managing Your Members Using a Membership Portal.pdf
TechSoup
 
PPTX
classroom based quiz bee.pptx...................
ferdinandsanbuenaven
 
PDF
Ziehl-Neelsen Stain: Principle, Procedu.
PRASHANT YADAV
 
PDF
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
PPTX
Nutrition Month 2025 TARP.pptx presentation
FairyLouHernandezMej
 
PPTX
Folding Off Hours in Gantt View in Odoo 18.2
Celine George
 
PDF
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
PPTX
HEAD INJURY IN CHILDREN: NURSING MANAGEMENGT.pptx
PRADEEP ABOTHU
 
PDF
water conservation .pdf by Nandni Kumari XI C
Directorate of Education Delhi
 
PPTX
ROLE OF ANTIOXIDANT IN EYE HEALTH MANAGEMENT.pptx
Subham Panja
 
PDF
IMP NAAC-Reforms-Stakeholder-Consultation-Presentation-on-Draft-Metrics-Unive...
BHARTIWADEKAR
 
Maternal and Child Tracking system & RCH portal
Ms Usha Vadhel
 
CONVULSIVE DISORDERS: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
Blanket Order in Odoo 17 Purchase App - Odoo Slides
Celine George
 
Federal dollars withheld by district, charter, grant recipient
Mebane Rash
 
FULL DOCUMENT: Read the full Deloitte and Touche audit report on the National...
Kweku Zurek
 
SCHOOL-BASED SEXUAL HARASSMENT PREVENTION AND RESPONSE WORKSHOP
komlalokoe
 
Explorando Recursos do Summer '25: Dicas Essenciais - 02
Mauricio Alexandre Silva
 
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
SAMPLING: DEFINITION,PROCESS,TYPES,SAMPLE SIZE, SAMPLING ERROR.pptx
PRADEEP ABOTHU
 
07.15.2025 - Managing Your Members Using a Membership Portal.pdf
TechSoup
 
classroom based quiz bee.pptx...................
ferdinandsanbuenaven
 
Ziehl-Neelsen Stain: Principle, Procedu.
PRASHANT YADAV
 
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
Nutrition Month 2025 TARP.pptx presentation
FairyLouHernandezMej
 
Folding Off Hours in Gantt View in Odoo 18.2
Celine George
 
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
HEAD INJURY IN CHILDREN: NURSING MANAGEMENGT.pptx
PRADEEP ABOTHU
 
water conservation .pdf by Nandni Kumari XI C
Directorate of Education Delhi
 
ROLE OF ANTIOXIDANT IN EYE HEALTH MANAGEMENT.pptx
Subham Panja
 
IMP NAAC-Reforms-Stakeholder-Consultation-Presentation-on-Draft-Metrics-Unive...
BHARTIWADEKAR
 

Build, deploy and scale: Django, GraphQL and SPA (DjangoCon EU 2021)