Building, testing and profiling efficient micro-services using Tornado



In this workshop, you will learn:

  • to build efficient microservices in Python using Tornado;
  • to make Tornado work with Python's async coroutines and event loop;
  • to write unit and integration tests;
  • abstraction patterns, configurations and mocking tactics to be able to run tests in a sandbox as well as deployed service; and
  • hook in profiling tools for identifying bottlenecks in your service.

This workshop is based on our learnings while building microservices at Slang Labs.


  • Working knowledge of Python3
  • Python3 installed on the laptop

Content URLs:

Here is the List of Content that presentation and GitHub repo will cover:

Data Model and Test Data

  • JSON Schema
  • Test Data
  • Data validation tests

Unit Tests, Mocking, Code Coverage

  • Async/Await
  • Example: DB layer abstraction
  • Implementing simple in-memory DB for testing/debugging
  • Testing async functions
  • Mocking calls to remote DB access
  • Code Coverage


  • Tornado
  • Python's async/await and event loop
  • Putting it all together: a functioning service
  • Unit tests for Tornado handlers
  • Tornado customization hooks

Logging and Profiling

  • Logging
  • Segregating and isolating profiling hooks
  • Putting it all together: profiling the service

Speaker Info:

Satish Chandra Gupta is a co-founder of Slang Labs. Prior to that he has worked in Ola, Amazon, Microsoft Research, and IBM Rational. He has been working in various areas of computer science for over 20 years, spanning from building network management systems of routers to programming and program analysis tools, profiles, compilers, IDEs to high throughput, near real-time web and microservices based on data-flow engines and machine learning. He did his M.S. from the University of Wisconsin - Milwaukee, and B.Tech. from IIT Kanpur.

Speaker Links:


Id: 1142
Section: Web development
Type: Workshop
Target Audience: Intermediate
Last Updated: