Design and implement a scalable and high performance tcp server with tornado - PyConSG 2016

Published on: Wednesday, 6 July 2016

Speaker: Nhu Dinh Tuan

Description
Developing and maintaining a robust, scalable, high performance tcp server is usually quite tricky, even more so with Python where worker threads running on multiple cpu cores are absent due to GPI (Global Interpreter Lock). This talk covers the design and implementation of tcp/ip communication components, the way how to handle requests and assign the tasks efficiently.

Abstract
Developing and maintaining a robust, scalable, high performance tcp server is usually quite tricky, even more so with Python where worker threads running on multiple cpu cores are absent due to GPI (Global Interpreter Lock). This talk covers the design and implementation of tcp/ip communication components, the way how to handle requests and assign the tasks efficiently. A scalable, high-performance and easy-to-use framework based on Tornado is also introduced to help you to set up a tcp server in short time, so you can just focus on writing the logic part.

Contents

1/ Design aspects - tcp servers - scale vs performance - design targets - sync vs async vs coroutines. - what options for network library in Python

2/ System Architecture and flow

3/ Implementation overview - Network components - CPython restrictions - Partial data transmission - Socket Tips - worker processor manager

4/ Demo - small instant message application.

Event Page: https://pycon.sg

Produced by Engineers.SG

Help us caption & translate this video!

http://amara.org/v/P6SM/

Organization
Presenter