Differences between revisions 3 and 4
Revision 3 as of 2011-02-10 12:29:59
Size: 2540
Revision 4 as of 2011-02-10 12:30:29
Size: 2560
Deletions are marked like this. Additions are marked like this.
Line 23: Line 23:
This has to be documented extensively in the manual This has to be documented extensively in the manual (suggested by Karl)

Open proposals and issues

  • Karl wishlist's open points:
  • Named separate virtual interpreters.

We use separate virtual interpreters for development (for each developer we diddle auto_path to give them source-controlled private copies of all of our packages) and it's really badass. The problem comes in the all-or-nothing approach of SVI. We set up a virtual host for each developer, for both port 80 (well really 8080 + varnish on 80) and 443. This results in 18 interpreters in each httpd process on our development machine, making for very large httpd processes and slow startup time after a graceful.

  • Virtual interpreter restarts without a graceful

Right now if one of our developers changes a package, private to them, they still have to do an apachectl graceful to pick up the change. This restarts all of the httpd processes and reinitializes all of the interpreters. Our interpreter initialization is intense. Each FlightAware httpd process loads 468 packages.

I'd like to be able to cause only one vhost's Tcl interpreters to be reloaded by a Tcl_DeleteInterp / Tcl_CreateInterp / Rivet initialization process. Instead of a graceful, you'd be able to specify something like a trigger file for each vhost. Every time a vhost (with separate virtual interpreters) serves a page, it gets the mtime of the trigger file. If the mtime of the trigger file has changed since the last time the interpreter served a page, Rivet deletes the virtual host's interpreter, creates and initializes a new one, and then handles the page. [I tried to write this but kind of lost control of it and was not successful.]

This way, developers could totally reload all their libraries without any httpd processes being stopped or started. Also this will lower overall overhead because a lot of times a httpd process won't have ever handled a page in its lifetime for many to most of the virtual interpreters.

An additional improvement would be to create the ability to not even initialize a vhost's separate virtual interpreter until the first time it is needed.

  • Documenting script namespaces in Rivet

.rvt templates run within the ::request namespace. It is a sensible practice to parse other templates or to source other scripts from an .rvt file. Being run within a ::request namespace that is going to be destroyed after the request has been served. There are still consequences on how specific Tcl commands work (e.g. 'package require ...') This has to be documented extensively in the manual (suggested by Karl)

RivetProposals (last edited 2016-09-24 16:08:42 by MassimoManghi)