Hi,
I'm not certain about any of this, but here are my guesses:
> Is "service" the proper term to use here? ("daemon"?)
Daemon would probably be more appropriate.
> What is "the best way" to do this?
If I'm not mistaken, many (most?) internet-type daemons, ftpd for example,
will fork() a process, allowing the original process to terminate. The
fork()ed process runs in the background.
> I believe the best way to do this is via inetd: is this correct?
inetd does the same thing, except whenever a request arrives, it spawns
the appropriate daemon.
Now, I'm assuming that your backend is java, since you mentioned classes.
In my experience, java is slow to start up, but once it's running it's
okay. If you run your backend through inetd, that means that for each
incoming request, inetd will start up a new java virtual machine. In a
word: ouch! Just imagine you have 50 users at once :)
Probably what would be better would be for it to operate the same way as a
standalone daemon. That way, only one jvm would get fired up and it could
handle each incoming request with a fair bit of speed.
> If so, what would be the proper settings for inetd.conf?
I would guess something like:
<port> stream tcp nowait root /usr/local/java/bin/java <your class> <args>
There is, I believe, another alternative that I haven't used and know
basically nothing about: servlets. You can get modules (?) for Apache
that allow it to run server-side java classes. I believe most of them
keep a jvm resident so that handling each incoming request is fast. Look
in the list archives or on the web for "Jserv" or "servlet". Jserv is
just one that comes to mind.
Good luck :)
dstn.
-----------------------------------------------
-- Dustin Lang, [EMAIL PROTECTED] --
(java developer, linux guy, green-haired freak)
Why Linux is so cool: /usr/include/string.h:190:
/* Sautee STRING briskly. */
extern char *strfry __P ((char *__string));
-----------------------------------------------
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]