Nhu Dinh Tuan

Nhu Dinh Tuan

Audience level:
All
Thursday
11:30 a.m.–noon

Design and implement a scalable and high performance tcp server with tornado

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.

We are looking for sponsors!

If you can help make PyCon SG a success, please message us at conference@pycon.sg

Co-Organizer:

Platinum Sponsors:

Gold Sponsors:

Silver Sponsors:

PyCon SG is a joint effort of the local Python communities: