SlideShare a Scribd company logo
1 of 25
Download to read offline
A2P Printing System
using Django-Channels
Sin-Woo Bang at Add2paper
Add2paper
- providing a free-printing service.
- used by 700k college students.
- In detail : www.add2paper.com
User flow
- A user login and try to print on PC.
User flow
- Then the user go to a printing machine,
- pay for printing and complete it.
It is easy
An architecture in detail
When a user try to print
Send spool files info
to EC2
Save spool files in local
Payment
Request a payment
Printing
Send a printing signal
via WebSocket
Printing
Deliver spool files
Summary
(1) Send a spool file info to a server
(2) Request a payment to the server
(3) When the server detect payment
completed, sends a printing signal
(4) PC delivers spool files to
a printing machine.
As you know in Python
- Famous web frameworks had not done support WebSocket.
- like Flask, Django.
- So we had to consider gevent, Twisted to use that.
But in 2016
Now Django/Channels in 2018
- Updated to 2.x version.
- Activated open source activities.
- A lot of pull requests are opened and merged now.
- Fine to use in production.
We chose it
- since our backend applications are written in Python.
- to send a printing signal when a payment is finished.
It was very easy
- Just add some settings if you want to add it.
- Settings for
- ASGI
- Channel-Layers (for using In-memory DB like Redis)
- Routing for asynchronous requests
Developed quickly
Write a business logic
- awesome productivity
- could take strength of Django as it is
But, when it comes to deployment
Deployment
- Daphne which is a protocol server for ASGI does not support graceful reload.
- had to use blue-green way by adjusting a load balancer.
Now
- The service works fine.
- Since it is scalable, our team could add additional servers.
- If you consider to use it
- Recommending
- if you should keep a deadline.
- if a project is not too much big.
- But
- Please remember Daphne does not support graceful reload.
Thank you
- Q&A : dev@add2paper.com or sinwoobang@gmail.com

More Related Content

Similar to A2P Printing System using Django-Channels

Extending Piwik At R7.com
Extending Piwik At R7.comExtending Piwik At R7.com
Extending Piwik At R7.comLeo Lorieri
 
Tv and video on the Internet
Tv and video on the InternetTv and video on the Internet
Tv and video on the InternetDivante
 
Famo.us - build native quality apps using html5 within a day
Famo.us - build native quality apps using html5 within a dayFamo.us - build native quality apps using html5 within a day
Famo.us - build native quality apps using html5 within a dayDebnath Sinha
 
AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09Chris Purrington
 
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP ProtocolSerial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP ProtocolSanjay Kumar
 
Scala services in action
Scala services in actionScala services in action
Scala services in actionUnderscore
 
Stream, Stream, Stream: Different Streaming Methods with Apache Spark and Kafka
Stream, Stream, Stream: Different Streaming Methods with Apache Spark and KafkaStream, Stream, Stream: Different Streaming Methods with Apache Spark and Kafka
Stream, Stream, Stream: Different Streaming Methods with Apache Spark and KafkaDatabricks
 
Js foo famo.us- build native quality apps using html5 within a day
Js foo  famo.us- build native quality apps using html5 within a dayJs foo  famo.us- build native quality apps using html5 within a day
Js foo famo.us- build native quality apps using html5 within a dayDebnath Sinha
 
Dictionary Within the Cloud
Dictionary Within the CloudDictionary Within the Cloud
Dictionary Within the Cloudgueste4978b94
 
EQR Reporting: Rails + Amazon EC2
EQR Reporting:  Rails + Amazon EC2EQR Reporting:  Rails + Amazon EC2
EQR Reporting: Rails + Amazon EC2jeperkins4
 
PyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applicationsPyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applicationsCesar Cardenas Desales
 
Stream, Stream, Stream: Different Streaming Methods with Spark and Kafka
Stream, Stream, Stream: Different Streaming Methods with Spark and KafkaStream, Stream, Stream: Different Streaming Methods with Spark and Kafka
Stream, Stream, Stream: Different Streaming Methods with Spark and KafkaDataWorks Summit
 
Introduction to Apache Spark 2.0
Introduction to Apache Spark 2.0Introduction to Apache Spark 2.0
Introduction to Apache Spark 2.0Knoldus Inc.
 
Js foo famo.us- build native quality apps using html5 within a day
Js foo  famo.us- build native quality apps using html5 within a dayJs foo  famo.us- build native quality apps using html5 within a day
Js foo famo.us- build native quality apps using html5 within a dayDebnath Sinha
 
An introduction to workflow-based programming with Node-RED
An introduction to workflow-based programming with Node-REDAn introduction to workflow-based programming with Node-RED
An introduction to workflow-based programming with Node-REDBoris Adryan
 

Similar to A2P Printing System using Django-Channels (20)

Extending Piwik At R7.com
Extending Piwik At R7.comExtending Piwik At R7.com
Extending Piwik At R7.com
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
 
Tv and video on the Internet
Tv and video on the InternetTv and video on the Internet
Tv and video on the Internet
 
The PRPL Pattern
The PRPL PatternThe PRPL Pattern
The PRPL Pattern
 
Famo.us - build native quality apps using html5 within a day
Famo.us - build native quality apps using html5 within a dayFamo.us - build native quality apps using html5 within a day
Famo.us - build native quality apps using html5 within a day
 
AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09
 
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP ProtocolSerial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
 
Scala services in action
Scala services in actionScala services in action
Scala services in action
 
Stream, Stream, Stream: Different Streaming Methods with Apache Spark and Kafka
Stream, Stream, Stream: Different Streaming Methods with Apache Spark and KafkaStream, Stream, Stream: Different Streaming Methods with Apache Spark and Kafka
Stream, Stream, Stream: Different Streaming Methods with Apache Spark and Kafka
 
Js foo famo.us- build native quality apps using html5 within a day
Js foo  famo.us- build native quality apps using html5 within a dayJs foo  famo.us- build native quality apps using html5 within a day
Js foo famo.us- build native quality apps using html5 within a day
 
Dictionary Within the Cloud
Dictionary Within the CloudDictionary Within the Cloud
Dictionary Within the Cloud
 
EQR Reporting: Rails + Amazon EC2
EQR Reporting:  Rails + Amazon EC2EQR Reporting:  Rails + Amazon EC2
EQR Reporting: Rails + Amazon EC2
 
PyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applicationsPyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applications
 
JOSA TechTalks - Downgrade your Costs
JOSA TechTalks - Downgrade your CostsJOSA TechTalks - Downgrade your Costs
JOSA TechTalks - Downgrade your Costs
 
Stream, Stream, Stream: Different Streaming Methods with Spark and Kafka
Stream, Stream, Stream: Different Streaming Methods with Spark and KafkaStream, Stream, Stream: Different Streaming Methods with Spark and Kafka
Stream, Stream, Stream: Different Streaming Methods with Spark and Kafka
 
Introduction to Apache Spark 2.0
Introduction to Apache Spark 2.0Introduction to Apache Spark 2.0
Introduction to Apache Spark 2.0
 
Monkey Server
Monkey ServerMonkey Server
Monkey Server
 
Js foo famo.us- build native quality apps using html5 within a day
Js foo  famo.us- build native quality apps using html5 within a dayJs foo  famo.us- build native quality apps using html5 within a day
Js foo famo.us- build native quality apps using html5 within a day
 
An introduction to workflow-based programming with Node-RED
An introduction to workflow-based programming with Node-REDAn introduction to workflow-based programming with Node-RED
An introduction to workflow-based programming with Node-RED
 
DevOps as a Contract
DevOps as a ContractDevOps as a Contract
DevOps as a Contract
 

Recently uploaded

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 

Recently uploaded (20)

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 

A2P Printing System using Django-Channels

  • 1. A2P Printing System using Django-Channels Sin-Woo Bang at Add2paper
  • 2. Add2paper - providing a free-printing service. - used by 700k college students. - In detail : www.add2paper.com
  • 3. User flow - A user login and try to print on PC.
  • 4. User flow - Then the user go to a printing machine, - pay for printing and complete it.
  • 7. When a user try to print Send spool files info to EC2 Save spool files in local
  • 9. Printing Send a printing signal via WebSocket
  • 11. Summary (1) Send a spool file info to a server (2) Request a payment to the server (3) When the server detect payment completed, sends a printing signal (4) PC delivers spool files to a printing machine.
  • 12.
  • 13. As you know in Python - Famous web frameworks had not done support WebSocket. - like Flask, Django. - So we had to consider gevent, Twisted to use that.
  • 15.
  • 16. Now Django/Channels in 2018 - Updated to 2.x version. - Activated open source activities. - A lot of pull requests are opened and merged now. - Fine to use in production.
  • 17. We chose it - since our backend applications are written in Python. - to send a printing signal when a payment is finished.
  • 18. It was very easy - Just add some settings if you want to add it. - Settings for - ASGI - Channel-Layers (for using In-memory DB like Redis) - Routing for asynchronous requests
  • 20. Write a business logic - awesome productivity - could take strength of Django as it is
  • 21. But, when it comes to deployment
  • 22.
  • 23. Deployment - Daphne which is a protocol server for ASGI does not support graceful reload. - had to use blue-green way by adjusting a load balancer.
  • 24. Now - The service works fine. - Since it is scalable, our team could add additional servers. - If you consider to use it - Recommending - if you should keep a deadline. - if a project is not too much big. - But - Please remember Daphne does not support graceful reload.
  • 25. Thank you - Q&A : dev@add2paper.com or sinwoobang@gmail.com