app-server....

R

Ray Dillinger

Okay, most of my career has been spent doing linguistics or
hardcore math, and letting other people write the interfaces
to it. Now I'm up for something a little different and I
need to expand my repertoire into network programming.
So I'm asking for basic pointers and help.

I need to write an application server. Fairly standard stuff,
and I was hoping that people here could recommend examples
and articles to me. Common Lisp, Scheme, or C sources are
especially welcome, as I can easily see what's going on in
those languages. If it's available under a BSD or similar
style license, that would be a plus, but mostly I'm looking
for examples of the process and process-management rather
than library code to actually use. Please let's have no
language or license flamewars.

Here's what I want to do: there is an application I've written
which behaves differently with different configurations. The
app server presents a "virtual" application to each customer,
with separate configurations in each "virtual" application.
These "virtual" applications are then available to users who
interact directly with the app, and customers who both interact
with and configure the app.

Basically there are three types of people who will be
interfacing with this software, and each of them has to have
an HTTP interface.

The "Admin" has priveleges (and interface) to stop and start
the app server, manage customer accounts, do basic (app-wide)
configuration, etc. This is probably going to be restricted
in such a way that it only accepts logins from a particular
IP address, possibly only from localhost, or with hard-core
encryption. Admin actions are not necessarily stateful; each
operation the admin needs to do can be an atomic operation.
Admin actions are also synchronous; there should be no problem
with doing them in the same thread as the main appserver. As
an aside, the admin interface could be in a terminal session
(command line or ncurses) if need be.

The "customer" is accountable to the Admin, but each customer
has their own app configuration information (ranging probably
from 0.5 to 5.5 megabytes or so, which sort of rules out CGI
as an appropriate technology) and their own set of user
information. Customers manage their own user accounts (or
leave their sites in "promiscuous" mode to accept connections
from anyone) and there is a type of interactive session the
app needs to do with customers to give them the ability to
update their configuration info. This also requires substantial
state, as the app has to track progress through stored logfiles
of user interactions. Customer sites and priveleges need to
be password-protected for customer access, but the admin
should be able to get to the customer screen in order to
investigate complaints or do contract work if the customers
don't want to do configuration themselves.

Each customer site may be using a separate ISO character set;
As far as the app is concerned, characters in the 127-256 range
are just letters, and the webpage templates in use are adequate
to give them the semantics of particular ISO characters on the
user's browsers. I believe that this approach will even work
fine with UTF8 Unicode, although I do sort of rely on the
ASCII space as a word separator.

Miscellaneous other customer priveleges include downloading
their config information (a binary blob) and uploading it
again so they can save versions of their site, causing the
system to write named versions of their config info to disk
or read from disk locally (on the server) so they can make
edits, create different versions, do some simplified form
of change control, etc, downloading and erasing logfiles
of customer interactions with "their" app, etc, all subject
to disk-space-per-customer limitations enforced by the app.

"Users" can load up the site with the configuration of a
particular "Customer" and interact with the app as though
configured according to that particular customer's config
information. This requires the preservation of about a
kilobyte of state from one interaction to the next; it
might be simplest or most robust to route it through a
hidden field in the webpage.

I figure one base URL plus 3 or 4 subpages for the site
admin (or possibly an ssh session and no HTTP interface),
one URL plus 3 or 4 subpages per customer interface (probably
password protected or encrypted) and one URL per customer
for user interface.

Assuming the app logic is already done and the page-building
template engine is mostly done, and I've coded CGI applications
before but know that's not adequate here, what resources will
seriously help me?



Bear
 
B

Bradd W. Szonye

["Followup-To:" header set to comp.unix.programmer.]

Ray Dillinger said:
Okay, most of my career has been spent doing linguistics or hardcore
math, and letting other people write the interfaces to it. Now I'm up
for something a little different and I need to expand my repertoire
into network programming. So I'm asking for basic pointers and help.

I need to write an application server. Fairly standard stuff, and I
was hoping that people here could recommend examples and articles to
me. Common Lisp, Scheme, or C sources are especially welcome, as I
can easily see what's going on in those languages. If it's available
under a BSD or similar style license, that would be a plus, but mostly
I'm looking for examples of the process and process-management rather
than library code to actually use ....

I learned network programming mainly from "UNIX Network Programming" by
Stevens, which I highly recommend. His "TCP/IP Illustrated" series is
also helpful, but the UNIX book is more practical and to-the-point.
IIRC, there was a later edition of the book with a different name; it's
been a long time since I've done network programming, and I haven't kept
up. Anyway, I'd generally recommend anything on networking by Stevens.

For Scheme, I'd recommend subscribing to the PLT Scheme mailing list (if
you're not already on it) and asking for pointers there. The list covers
networking topics quite often, and a lot of folks have created Web
servers and Web apps with MzScheme.

By the way, I'm not a regular at comp.unix.programmer, so that may not
be the right place to ask either. However, a Google search showed that
the more polite members of CLC typically direct network programming
questions over there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top