We will build a collaborative todo list system that will show you how to utilize Python, Redis/ZeroMQ, Socket.io, and GEvent for real-time communication.
We will focus on the following topics:
Intro to GEvent and co-routines, what it is, how it works, the benefits of using it, and how simple it is to wrap your mind around a co-routine vs the callback methodology of threads.
Intro to pub/sub, the communication model we'll use for our realtime communication and how to utilize ZeroMQ or Redis to achieve this.
Discussion of Polling, Longpolling, Flash sockets, and web sockets and the benefits of each and how Socket.IO lets us not care. I will discuss how to get socket.io client side working with the server side.
We will cover how to architect your co-routine based applications to make them easily testable and how to utilize mock to make things easier. We will cover the gotcha's of testing GEvent based code.
The final portion of the tutorial we discuss deployment and how to manage and monitor your WSGI server that is using GEvent patched libraries. This will cover basics on which webservers to use as well as exception handling.
We leave 30minutes of leeway to further discussion in a certain area that the students are most interested in as well as for questions on things specific that they feel I may not have covered so far.
I will provide the non-realtime code base for the application we will be working on and we will start from there and slowly add in support for the realtime communication as we discuss the technologies needed.
Most introductions to the web with gevent just show a basic chat application which leaves a lot of questions about where to go next once you are building a real application and I hope to cover all of those in this tutorial.