[geeks] Interactive serial terminal programs

Jonathan C. Patschke jp at celestrion.net
Fri May 10 21:44:21 CDT 2002


On Fri, 10 May 2002, James Sharp wrote:

> So I'm going to be writing a rather large application for my fire
> department...including dispatch, training records, fire incident records
> and equipment maintenance.

Is "dispatch" time-sensitive, or is this just record-keeping?

> Since I've got myself a couple of multiport serial boards and a few
> serial terminals, I was planning on doing it as a character-based
> application.

Sounds excellent.  Very retro, but a great use of older technology.

> 1) Write everything in php, run a local web server tied into the
> database engine...create a dummy account that spawns lynx as its login
> shell.  Use lynx to front end those php pages.

Blech!  Eccch!  Hurp!

The only benefit I see to this approach is that you wouldn't have to
recode if someone replaced all your terminals with winders boxen that
didn't have access to a decent telnet/ssh program.

You -don't- want to build a big application in PHP.  It will drive you
certifiably insane.  PHP is ugly shit that is "just ugly enough" for "web
development" but it's inconsistencies, sloth, and memory bloat will kick
your ass on anything large and interactive, especially if you're going to
be carrying any sort of state around.

> 2) Write the program in C and use the ncurses/forms library to handle
>    display formatting.

This is the Right Thing to do.  ncurses is refreshingly easy to use, plus
you can do -real- page/form layout without having to get creative with
lynxish HTML.

However, keep the client/server model in-place.  Don't open N connections
to your data store.  Open N connections to a server process which manages
everything.  This lets you do enforce certain types of coherency with
ease.

> Any other ideas or suggestions?  Preferably something Open Source...I'm
> running on a limited budget here.

ncurses, plain ol' TCP running over IP, PostgreSQL.  And don't skimp on
the terminals, if possible.  Get nice DECs or IBMs.

--Jonathan



More information about the geeks mailing list