Re: Tornado web server vs Flask web server?


Tony Hansen
 

Anyone on seccom have an opinion on this?

 

From: <onap-seccom@...> on behalf of "Tony Hansen via lists.onap.org" <tony=att.com@...>
Reply-To: "HANSEN, TONY L" <tony@...>
Date: Thursday, May 13, 2021 at 12:09 PM
To: "onap-seccom@..." <onap-seccom@...>
Subject: [Onap-seccom] Tornado web server vs Flask web server?

 

Is anyone familiar with the use of Tornado as a replacement for Flask?

 

I was asked to review a Gerrit PR based on this JIRA ticket from a SECCOM point of view:

 

JIRA:

https://jira.onap.org/browse/DCAEGEN2-2767

PMSH currently uses flask server, migration to a prodction grade server

PR comments:

https://gerrit.onap.org/r/c/dcaegen2/services/+/121331

 

Change Flask web server to Tornado web server

- Tornado is more suitable web server for production environment

 

 

One of the reviewers on the PR asked this:

 

Could you provide some source/links to confirm that tornado is better than flask ?

 

to which the contributor responded:

the main reason we consider tornado is better than flask is because flask is synchronous on handling its request (could not find Flask documentation that highlights this but here's an article that discuss it https://crossbario.com/blog/Going-Asynchronous-from-Flask-to-Twisted-Klein/). Tornado was chosen specifically rather than other async server is because its one of the available server options for connexion framework (https://pypi.org/project/connexion/1.0.38/)

 

More info on Tornado itself is at <https://www.tornadoweb.org/>. Their github says this:

 

Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. 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.

 

So, SECCOM, what do you think? Is anyone familiar with the use of Tornado as a replacement for Flask?

 

                Tony

 

Join onap-seccom@lists.onap.org to automatically receive all group messages.