Tntnet
Encyclopedia
Tntnet is a free
in C++
coded Web server
, which enables other C++-programs to bundle requests modules. This way, users are enabled to develop Web application
s in C++. The GET and POST requests are interpreted by the tntnet server and sent to the web application program, which will sent a reply back over the network.
Tntnet provides many of the same features as script-based
CGI, but with different tradeoffs. Being C++ based, tntnet allows the use of techniques such as Object-oriented programming
and polymorphism
, which are also supported in modern scripting languages.
Under tntnet, the web application is compiled ahead of time, while script-based CGIs are often interpreted. Compiled modules, being native, will generally be faster than scripts. Programs such as cgid or fastcgi
can be used to improve the performance of script-based CGIs.
Tntnet directly integrates the web application into the webserver. Webservers often have APIs for doing this. Apache HTTP Server
uses a module system, where Internet Information Services
uses ISAPI. Tntnet, in fact, originally used Apache's module system. This was changed due to the difficulty of interfacing with Apache through its C
API while maintaining the benefits of using C++.
In this situation, Tommi Mäkitalo developed the tntnet framework
. Tntnet is also a webserver, which is present in the source code
. This way, tntnet acts as a layer in front of the actual web application. When in use, the webserver part receives the HTTP requests, interpretes them and sends them to the (binary) web application part. The web application and the webserver are constantly talking to each other.
Tntnet claims that Benchmarks
have shown that tntnet, with its particular setup, is faster for dynamic websites than all other tested webservers.
Tntnet was compared with a lot of Apache modules and lighttpd
. Lighttpd
performed better than tntnet when serving static files because it directly calls the sendfile kernel call.
. The programs developed using Tntdb do not depend on a specific type of underlying database system. Tntdb can handle the following database systems:
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...
in C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...
coded Web server
Web server
Web server can refer to either the hardware or the software that helps to deliver content that can be accessed through the Internet....
, which enables other C++-programs to bundle requests modules. This way, users are enabled to develop Web application
Web application
A web application is an application that is accessed over a network such as the Internet or an intranet. The term may also mean a computer software application that is coded in a browser-supported language and reliant on a common web browser to render the application executable.Web applications are...
s in C++. The GET and POST requests are interpreted by the tntnet server and sent to the web application program, which will sent a reply back over the network.
Tntnet provides many of the same features as script-based
Scripting language
A scripting language, script language, or extension language is a programming language that allows control of one or more applications. "Scripts" are distinct from the core code of the application, as they are usually written in a different language and are often created or at least modified by the...
CGI, but with different tradeoffs. Being C++ based, tntnet allows the use of techniques such as Object-oriented programming
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...
and polymorphism
Polymorphism in object-oriented programming
Subtype polymorphism, almost universally called just polymorphism in the context of object-oriented programming, is the ability to create a variable, a function, or an object that has more than one form. The word derives from the Greek "πολυμορφισμός" meaning "having multiple forms"...
, which are also supported in modern scripting languages.
Under tntnet, the web application is compiled ahead of time, while script-based CGIs are often interpreted. Compiled modules, being native, will generally be faster than scripts. Programs such as cgid or fastcgi
FastCGI
FastCGI is a protocol for interfacing interactive programs with a web server. FastCGI is a variation on the earlier Common Gateway Interface ; FastCGI's main aim is to reduce the overhead associated with interfacing the web server and CGI programs, allowing a server to handle more web page...
can be used to improve the performance of script-based CGIs.
Tntnet directly integrates the web application into the webserver. Webservers often have APIs for doing this. Apache HTTP Server
Apache HTTP Server
The Apache HTTP Server, commonly referred to as Apache , is web server software notable for playing a key role in the initial growth of the World Wide Web. In 2009 it became the first web server software to surpass the 100 million website milestone...
uses a module system, where Internet Information Services
Internet Information Services
Internet Information Services – formerly called Internet Information Server – is a web server application and set of feature extension modules created by Microsoft for use with Microsoft Windows. It is the most used web server after Apache HTTP Server. IIS 7.5 supports HTTP, HTTPS,...
uses ISAPI. Tntnet, in fact, originally used Apache's module system. This was changed due to the difficulty of interfacing with Apache through its C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....
API while maintaining the benefits of using C++.
In this situation, Tommi Mäkitalo developed the tntnet framework
Software framework
In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by user code, thus providing application specific software...
. Tntnet is also a webserver, which is present in the source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...
. This way, tntnet acts as a layer in front of the actual web application. When in use, the webserver part receives the HTTP requests, interpretes them and sends them to the (binary) web application part. The web application and the webserver are constantly talking to each other.
Tntnet claims that Benchmarks
Benchmark (computing)
In computing, a benchmark is the act of running a computer program, a set of programs, or other operations, in order to assess the relative performance of an object, normally by running a number of standard tests and trials against it...
have shown that tntnet, with its particular setup, is faster for dynamic websites than all other tested webservers.
Tntnet was compared with a lot of Apache modules and lighttpd
Lighttpd
lighttpd is an open-source web server more optimized for speed-critical environments than common products while remaining standards-compliant, secure and flexible...
. Lighttpd
Lighttpd
lighttpd is an open-source web server more optimized for speed-critical environments than common products while remaining standards-compliant, secure and flexible...
performed better than tntnet when serving static files because it directly calls the sendfile kernel call.
Cxxtools
Tntnet uses a library of tools named Cxxtools. To build applications written using tntnet, Cxxtools is needed.Tntdb
The library Tntdb is a database abstraction layerDatabase abstraction layer
A database abstraction layer is an application programming interface which unifies the communication between a computer application and databases such as SQL Server, DB2, MySQL, PostgreSQL, Oracle or SQLite...
. The programs developed using Tntdb do not depend on a specific type of underlying database system. Tntdb can handle the following database systems:
- Postgres
- SQLite3SQLiteSQLite is an ACID-compliant embedded relational database management system contained in a relatively small C programming library. The source code for SQLite is in the public domain and implements most of the SQL standard...
- MySQLMySQLMySQL officially, but also commonly "My Sequel") is a relational database management system that runs as a server providing multi-user access to a number of databases. It is named after developer Michael Widenius' daughter, My...
- OracleOracle DatabaseThe Oracle Database is an object-relational database management system produced and marketed by Oracle Corporation....
Applications
- tntzenoreader - a system for using the Wikipedia-DVD
- live Weboberfläche für VDR - a free software package for the recording of digital video (DVB)
- Several commercial websites and websites for projects
- Several example applications (in the /demos/ directory of the tntnet package)
External links
- Tntnet homepage
- Example applications
- Interview with Tommi Mäkitalo at the 16th of November 2006 November 2006 by RadioTuxRadioTuxRadioTux is a German internet radio show. The topics are mostly around free and open source software, free operating systems like *BSD and Linux, as well as on sociopolitical issues...
(in GermanGerman languageGerman is a West Germanic language, related to and classified alongside English and Dutch. With an estimated 90 – 98 million native speakers, German is one of the world's major languages and is the most widely-spoken first language in the European Union....
) - Podcast with Tommi Mäkitalo at the LinuxTag 2011 in Berlin by NiceGeekCast (German)