Tornado (web server)

Last updated
Tornado
Original author(s) FriendFeed
Developer(s) Ben Darnell, Meta, Bret Taylor
Initial release2009;16 years ago (2009)
Stable release
6.4.2 [1]   OOjs UI icon edit-ltr-progressive.svg / 22 November 2024;5 months ago (22 November 2024)
Repository github.com/tornadoweb/tornado
Written in Python
Operating system Cross-platform
Available inEnglish
Type Web server
License Apache licence 2.0
Website www.tornadoweb.org   OOjs UI icon edit-ltr-progressive.svg

Tornado is a scalable, non-blocking web server and web application framework written in Python. [2] It was developed for use by FriendFeed; the company was acquired by Facebook in 2009 and Tornado was open-sourced soon after. [3]

Contents

Performance

Tornado is noted for its high performance. Its design enables handling a large number of concurrent connections (i.e., tries to solve the "C10k problem").

Modules

Example

The following code shows a simple web application that displays "Hello World!" when visited: [4]

importasyncioimporttornado.webclassMainHandler(tornado.web.RequestHandler):defget(self):self.write("Hello, world")defmake_app():returntornado.web.Application([(r"/",MainHandler),])asyncdefmain():app=make_app()app.listen(8888)awaitasyncio.Event().wait()if__name__=="__main__":asyncio.run(main())

See also

References

  1. "Release 6.4.2". 22 November 2024. Retrieved 1 December 2024.
  2. "Home - tornado - GitHub". GitHub . Retrieved 2009-09-10.
  3. "Facebook open-sources real-time FriendFeed facet". CNet. Archived from the original on 2012-01-30. Retrieved 2009-09-10.
  4. "Hello, world" . Retrieved 2022-09-14.