StackShareStackShare
Follow on
StackShare

Discover and share technology stacks from companies around the world.

Follow on

© 2025 StackShare. All rights reserved.

Product

  • Stacks
  • Tools
  • Feed

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  1. Stackups
  2. Application & Data
  3. Frameworks
  4. Frameworks
  5. Tornado vs asyncio

Tornado vs asyncio

OverviewDecisionsComparisonAlternatives

Overview

Tornado
Tornado
Stacks530
Followers409
Votes167
GitHub Stars22.3K
Forks5.5K
asyncio
asyncio
Stacks126
Followers158
Votes13

Tornado vs asyncio: What are the differences?

Introduction

In this article, we will explore the key differences between Tornado and asyncio, two popular frameworks used for asynchronous programming in Python.

  1. Execution Model: Tornado is an event-driven framework, while asyncio is based on coroutines. Tornado uses an event loop to manage events and callbacks, allowing it to handle a large number of simultaneous connections efficiently. On the other hand, asyncio employs coroutines, which are lightweight functions that can be paused and resumed, to achieve asynchronous execution.

  2. Compatibility: Tornado is compatible with both Python 2 and Python 3, making it suitable for a wider range of projects. asyncio, on the other hand, is specifically designed for Python 3.4 and above, taking advantage of the language improvements introduced in later versions.

  3. Code Structure: Tornado follows a more traditional approach with explicit callbacks and the use of decorator-based syntax for defining request handlers. It provides a comprehensive set of features for building web applications, including routing, template rendering, and WebSocket support. asyncio, on the other hand, provides a more lightweight and flexible framework for asynchronous programming, allowing developers to create custom event loops and use coroutines in a more modular manner.

  4. Community and Support: Tornado has been around for a longer time and has a larger community of users and contributors. It has been extensively used in production environments and has a well-documented API. asyncio, being a relatively newer framework, is still evolving and may have fewer third-party libraries and resources available.

  5. Concurrency Models: Tornado uses a single-threaded, non-blocking I/O approach to achieve high concurrency. It achieves this by using asynchronous networking and non-blocking file I/O operations. asyncio, on the other hand, provides a more granular control over concurrency through the use of coroutines and can handle more complex concurrency patterns, such as concurrent HTTP requests.

In summary, the key differences between Tornado and asyncio lie in their execution models, compatibility, code structure, community support, and concurrency models. These differences make them suitable for different types of projects and use cases.

Share your Stack

Help developers discover the tools you use. Get visibility for your team's tech choices and contribute to the community's knowledge.

View Docs
CLI (Node.js)
or
Manual

Advice on Tornado, asyncio

aryan
aryan

Python Developer at Fyers Securities

Dec 31, 2019

Needs advice

I want to use Redis non-blocking with Tornado. How I should use the Redis code using tornadis to achieve max number of connections. I had used the tornadis and with WebSocket handler, I inherited the Redis based pub/sub client inside a class and in the main loop we created the instance of a class. but it decreases the numbr of connections with a huge amount. how we should configure?

3.76k views3.76k
Comments

Detailed Comparison

Tornado
Tornado
asyncio
asyncio

By using non-blocking network I/O, Tornado can scale to tens of thousands of open connections, making it ideal for long polling, WebSockets, and other applications that require a long-lived connection to each user.

This module provides infrastructure for writing single-threaded concurrent code using coroutines, multiplexing I/O access over sockets and other resources, running network clients and servers, and other related primitives.

Statistics
GitHub Stars
22.3K
GitHub Stars
-
GitHub Forks
5.5K
GitHub Forks
-
Stacks
530
Stacks
126
Followers
409
Followers
158
Votes
167
Votes
13
Pros & Cons
Pros
  • 37
    Open source
  • 31
    So fast
  • 27
    Great for microservices architecture
  • 20
    Websockets
  • 17
    Simple
Cons
  • 2
    Event loop is complicated
Pros
  • 4
    I/O Wait
  • 4
    Cooperative Multitasking
  • 3
    Network Call
  • 2
    I/O bound computation
Integrations
Python
Python
No integrations available

What are some alternatives to Tornado, asyncio?

Node.js

Node.js

Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

Rails

Rails

Rails is a web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.

Django

Django

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

Laravel

Laravel

It is a web application framework with expressive, elegant syntax. It attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, and caching.

.NET

.NET

.NET is a general purpose development platform. With .NET, you can use multiple languages, editors, and libraries to build native applications for web, mobile, desktop, gaming, and IoT for Windows, macOS, Linux, Android, and more.

ASP.NET Core

ASP.NET Core

A free and open-source web framework, and higher performance than ASP.NET, developed by Microsoft and the community. It is a modular framework that runs on both the full .NET Framework, on Windows, and the cross-platform .NET Core.

ExpressJS

ExpressJS

Express is a minimal and flexible node.js web application framework, providing a robust set of features for building single and multi-page, and hybrid web applications.

Symfony

Symfony

It is written with speed and flexibility in mind. It allows developers to build better and easy to maintain websites with PHP..

Spring

Spring

A key element of Spring is infrastructural support at the application level: Spring focuses on the "plumbing" of enterprise applications so that teams can focus on application-level business logic, without unnecessary ties to specific deployment environments.

Spring Boot

Spring Boot

Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.

Related Comparisons

Bootstrap
Materialize

Bootstrap vs Materialize

Laravel
Django

Django vs Laravel vs Node.js

Bootstrap
Foundation

Bootstrap vs Foundation vs Material UI

Node.js
Spring Boot

Node.js vs Spring-Boot

Liquibase
Flyway

Flyway vs Liquibase