DEV Community

Cover image for Tornado : ASYNC Framework for Python
Bek Brace
Bek Brace

Posted on

1 1

Tornado : ASYNC Framework for Python

Tornado is a Python open source framework, but also an asynchronous networking library, and it was originally developed for a company called FriendFeed, which was acquired by Facebook recently in 2009. To understand Tornado we need to know what is it good for.

Make sure to check out my last video on tornado Framework

Tornado is ideal for building apps asking for high performance and several thousand concurrent users; it can handle 10K connections at once, in addition to that it's non-blocking network IO. Asynchronous programming was introduced to python since python 3.5 when the asyncio library was introduced.

Before anything, you need to know that Asynchronous programming, more specifically async syntax makes you code faster to execute.

Async is a way of Concurrent ProgrammingAsync is one way of doing concurrent programming, which means doing many things at once or achieving multiple tasks at once.

How does Python achieve multiple tasks at once ?

1 OS makes multi-sharing and multi-tasking happen: One way is to run multiple terminal instances and run your server, and all of them will work concurrently in the same time; and your operating system takes care of sharing your CPU resources among those terminal instances.

2 Another way of achieving multiple tasks at once is by using threads. A thread is a line of execution for several instructions which means that they all share access to common resources, and here the operating system intervens to share your CPU with these threads

3 The last way is asynchronous programming which what Tornado does, even though the opperating system will not have any role here, yet we'll be able to achieve multiple things at once with asynchronous programming

Drop your comment or contact me on: info@bekbrace.com
Github page: https://github.com/BekBrace​

Thank you for reading and watching
Until next time - Peace out,
Bek

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (0)

Neon image

Next.js applications: Set up a Neon project in seconds

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Get started →

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, cherished by the supportive DEV Community. Coders of every background are encouraged to bring their perspectives and bolster our collective wisdom.

A sincere “thank you” often brightens someone’s day—share yours in the comments below!

On DEV, the act of sharing knowledge eases our journey and forges stronger community ties. Found value in this? A quick thank-you to the author can make a world of difference.

Okay