• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AS Libraries for stay-open CGIs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AS Libraries for stay-open CGIs


  • Subject: Re: AS Libraries for stay-open CGIs
  • From: SeaSoft Systems <email@hidden>
  • Date: Fri, 16 Feb 2001 12:51:41 -0800

Thank you, Jeff, for a most useful discussion!


At 14:05 -0500 2/16/2001, email@hidden wrote:


May I ask what these scripts do? If it's a shopping cart system, we must
trade notes.

No, it is a pretty specialized environment. Users log onto their server realm/directory and the CGI's do various tasks for them (such as simple directory management tasks, execution of server-based engineering applications, etc.)

I have implemented exactly what you are after. Here are my insights.

1) You do not want "a single stay-open library of utility handlers accessible
to all the CGIs." This will choke under load because it would not be
multithreaded, and my understanding is that it would use a FILO (same as
LIFO, but the acronym order highlights the problem) system for responding to
requests, leading to slowness or worse, timeouts.

Wow. This is a biggie I hadn't considered...

One thing I am unclear on. Does the single-threaded nature of script objects apply to an entire "script object library".

That is, if I have two separate stay-open CGIs, (presumably) they can be in "simultaneous" play, each by separate users (right?). If I then combine the two into a *single* stay-open CGI script with two entry points, does the single-threaded nature of AS *prevent* simultaneous execution of the two handlers because they reside in a single stay-open script? Since my handlers can take some time to complete their tasks (some being finder-related file operations), simultaneous execution is important here.


4) You do want to load the script object library into a property retained
between runs as I demonstrated in a recent post (email me if you missed that).

Sorry, but I did miss that; I would be most grateful to see it.


6) Optimizing Applescript for speed is a valuable learning experience. I now
have a vanilla handler which is 4 times faster than an osax.

Glad to see serious CGI discussion happening.

Likewise...

Thanks again for the insights!

Richard Hartman


References: 
 >Re: AS Libraries for stay-open CGIs (From: email@hidden)

  • Prev by Date: Re: AS Libraries for stay-open CGIs
  • Next by Date: Re: AS Libraries for stay-open CGIs
  • Previous by thread: Re: AS Libraries for stay-open CGIs
  • Next by thread: Re: Re: AS Libraries for stay-open CGIs
  • Index(es):
    • Date
    • Thread