yes, that old nutshell. though in my searches, there appears to be
surprisingly few pearls in all the swine which actually discuss
in some kind of detail (a la the cookbook) the
relative merits of the various solutions.
the problem is: i'd like to have a persistent data structure or set of RDMS data
which persists across multiple cgi script sessions.
the best methods that i can envisage for doing this are:
- using disk-based DB files -- though might there be
a problem with concurrency? one could flock, but then will this
limit performance with many concurrent users?
- using temporary DB tables -- but does this impact
performance too greatly?? how does one ensure that temporary
tables get deleted in due course? and how might one go about
protecting oneself from a malicious user who just hammered
the server with broad queries?
- http cookies -- this is probably unacceptable for
reasons of security -- i would ideally like to cache a
whole sql WHERE clause for instance.
- hidden CGI params -- same as above, but more complicated
- a slightly more elaborate solution involving some
king of daemon which caches data per host.
i'm sure a million monks have broached and solved all these
issues dozens of times... can anyone offer me some wisdom?
my particular site uses MySQL and the database involved is only
fairly small.
advice, comparisons, and links all greatly appreciated.
j.a.dirty.p.h
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.