October 2016
Intermediate to advanced
418 pages
9h 52m
English
In this chapter, we understood the difference between synchronous and asynchronous execution. We created a new version of the RESTful API that takes advantage of the non-blocking features in Tornado combined with asynchronous execution. We improved scalability for our existing API and we made it possible to start executing other requests while waiting for the slow I/O operations with sensors and actuators. We avoided splitting our methods into multiple methods with callbacks by using the tornado.gen generator-based interface that Tornado provides to make it easier to work in an asynchronous environment.
Then, we set up a testing environment. We installed nose2 to make it easy to discover and execute unit tests. We wrote a first round of ...