NNTP Clients and Servers

Usenet is a long-standing network of servers used for public discussion on the Internet. Each discussion forum in Usenet is called a newsgroup, and each Usenet server can host any number of newsgroups. Messages in a Usenet newsgroup are referred to as articles. Usenet servers communicate with each other to keep their copies of each newsgroup up-to-date, so that an article posted to a newsgroup on one server will eventually propagate to all the servers that host that newsgroup. This setup allows many people to participate in Usenet discussions without putting the load on any one central server.

The Usenet system dates back to before the Internet and TCP/IP had become widely accepted. Originally, computers participating in Usenet would connect to each other directly using dial-up modem connections, and then push articles back and forth using UUCP, the Unix-to-Unix Copy Protocol. After TCP/IP became the standard way to transfer data between computers, a new protocol was developed for Usenet communications. This Network News Transfer Protocol, or NNTP, is defined in RFC 977 (http://www.faqs.org/rfc/rfc977.txt). NNTP is used by Usenet clients for reading and posting articles to servers, as well as for server-to-server article transfers.

Support for NNTP in Twisted is provided by the twisted.news package. This chapter demonstrates how to use twisted.news to build Usenet clients and servers.

Категории