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.
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
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.