I am about to embark on a (small ?) project to write a server-thing to farm images for a Web-based service we are prototyping.

One of the things that we'd like (to take the opportinity) to prove is some form of persistent, memory-resident server.

(Seeing as you asked, it means we can create Z39:50 connections that persist across multiple HTTP sessions.
Z39.50 is an international standard for communication between computer systems primarily, library and information related systems. It requires a persistant connection to enable subsequent data retrivals.)

So far, I have two thoughts on this (both of which may be wrong :) -

Create a Perl package, and load it into a mod-perl-enabled apache-server at startup.
Use this to create a global nested-hash data-structure that is therefor accessable for all child-processes. It uses a system of session IDs to assocciate references to particular user-requests.
Create a Perl script (completely seperate form any web servers) that sits in an endless loop, and uses IO Sockets to pass data back and forth.
This is a much more complex idea, which worries me... (and I have never done any IPC-stuff before :)

My basic questions are

-- Ian Stuart
A man depriving some poor village, somewhere, of a first-class idiot.


In reply to perl-based server for use by CGI scripts. by kiz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.