Re: Tornado web server vs Flask web server?
Anyone on seccom have an opinion on this?
From: <onap-seccom@...> on behalf of "Tony Hansen via lists.onap.org" <tony=att.com@...>
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:
PMSH currently uses flask server, migration to a prodction grade server
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?