Article Preview
Buy Now
| Print: | |
| PDF: |
Feature
Easy Servers on OS X
Using xinetd to Make Painless Servers in REALbasic
Issue: 3.1 (September/October 2004)
Author: Brady Duga
Author Bio: Brady Duga has been a professional programmer for over a decade. He has been using REALbasic at every opportunity for the last several years. When he is not at his day job or spending time with his family, he can be found writing freeware and shareware for the La Jolla Underground.
Article Description: No description available.
Article Length (in bytes): 17,592
Starting Page Number: 21
RBD Number: 3110
Resource File(s):
3110.sit Updated: Wednesday, September 15, 2004 at 4:26 PM
Related Web Link(s):
http://www.xinetd.org/
Known Limitations: None
Excerpt of article text...
In our increasingly connected computing world, it is only a matter of time until you will have a need for a custom server application. This could be anything from a simple CGI script for a web server to the web server itself. In the former case, the web server handles most of the work for you, establishing connections, authenticating users, and balancing server load, among others tasks. At the other end of the spectrum is writing a high-performance, scalable server that handles asynchronous, secure, threaded connections. Of course, there are numerous simple servers that are not suitable to be implemented through a web server. Does that mean you have to jump directly to the difficult task of writing a server from scratch?
Not if you are running a current version of Mac OS X (10.3 or higher) and have a copy of REALbasic (Professional version 5.5.1 or higher). Using software available to UNIX programmers for years and the new Mach-O console applications of REALbasic, it is possible to write a server without knowing a thing about sockets, server or otherwise. The key to this lies with the extended internet services daemon (xinetd) super-server. Once upon a time, in the deep, dark history of the computing world (ten years ago), an internet "super-server" was created called inetd. Sometime during the 'nix renaissance, an extended version, xinetd, was crafted by BSD monks and it is this version that is currently used by Mac OS X. What is its nefarious purpose? Originally, inetd listened for connections on various ports of your computer. When an incoming connection was detected, the network stream was passed off to a smaller console application that actually handled the data. Xinetd does this, plus a lot more, like preventing some types of Denial of Service attacks and performing extensive logging.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|







