$Id: Changes,v 1.75 2008-04-30 17:27:56 mike Exp $ Revision history for Perl extension Keystone::Resolver. 1.23 Thu May 1 10:26:03 BST 2008 - Same as 1.22, except that it is properly date-stamped. 1.22 (IN PROGRESS) - Oracle back-end now fully functional and tested, both with the resolver itself and the Admin UI. See db/README for instructions on making a toy Oracle resource database, and the top-level README for instructions on running the test-suite against this. - Various changes to canonicalise the order of things like equal-priority results in the XML returned from resolve_to_xml(), required so that the same regression-test suite can be used with both MySQL and Oracle. - Add a test-script that invokes the actual "resolve" script. The absence of this was responsible for 1.20 going out while "resolve" itself was still not making its own $resolver object, while the various test-scripts were. - It is now mandatory to pass a $resolver into OpenURL::newFromCGI(), since memory problems will always result if it is allowed to allocate its own. - Change API of OpenURL::newFromCGI() to reflect mandatory $resolver and better match the default constructor, new(). - Add Makefile.PL dependency on Scalar::Util.pm 1.21 Thu Apr 10 15:23:53 BST 2008 - URGENT BUGFIX RELEASE: the resolve script now makes its own $resolver object rather than allowing newFromCGI() to make one on its behalf. This ensures that the resolver stays referenced (not only by the OpenURL's weak reference) until the resolution is complete. 1.20 Thu Apr 10 12:36:28 BST 2008 - Changes to memory management: since the Resolver, Database, OpenURL and ContextObject classes all contain references back and forth, the next of mutually referencing objects was not getting destructed when it went out of scope, leading to memory exhaustion in long-running processes such as Apache servers under heavy load. That is now fixed through the use of weak references back to the "owning" objects. Tests show that resolving 50,000 OpenURLs does not cause noticable process growth. - Changes to regression-test suite to facilitate running when not connected to network. - Added new test script, admin.t, testing the code that underlies the web-based admin interface. - Refactored database-access code in Database.pm, greatly reducing the number of similar functions and unifying logging. - Add support for the Serial Alias object type, both in the code and in the Admin web UI. (Admin support for this is not very useful yet, since, as with other kinds of link, there is no way to maintain the links between an alias object and the serial that it is an alias of.) - Added low-level object-API support for the service-to-serial and genre-to-servicetype link tables. (There's no point in wiring them into the Admin UI, since they contain no information other than link IDs.) - Search-result listing in Admin web UI does not offer links to sort on virtual fields. - Search-result listing in Admin web UI restored to being valid XHTML 1.0. - Top-level "resolve" script runs within a scoped block, to ensure that all local ("my") variables go out of scope when the script ends, whatever Apache's memory management regime may be. This contributes to fixing a memory-exhaustion problem. 1.19 Wed Mar 26 17:22:50 GMT 2008 - Use the DBI module's connect_cached() method to pool similar connections. This is important when running the resolver as a web-service, since (currently) each invocation makes a new Resolver object, which in turn makes its own Database object, which until this change made its own DBI connection. Due to Perl's lazy garbage-collection, each Apache process can accumulate a lot of these connections before they get tidied up, and when (as is usually the case) many Apache processes are used, they can exhaust the back-end database's connection pool. - Log-levels (as specified for example by the opt_loglevel query parameter) can now be specified symbolically, as a comma-separated list of level names, as well as numerically. - New logging level, LIFECYCLE, notes the creation and destruction of Resolver, OpenURL and Database objects. - The DBI logging level can now also be set, using the opt_dbi_trace query parameter. - New function LogLevel::num() that converts a logging-level string into a numeric value, complementing the existing label(). Both these functions now handle composite values (e.g. CONVERT01|LIFECYCLE). - New test-script for log-level utility functions. - Add brief documentation of logging (doc/logging). - Option setting is now always done via the option() method rather than, as previously at Resolver creation time, via direct assignment. This ensures that the logging-related special cases are handled uniformly. - Add static_log() function (not method) to the Resolver class, for use in contexts where no Resolver object is available to invoke the method on. - Copies are included (web/htdocs/1cate-test/) of the KEV context-objects that were part of Openly's OpenURL 1.0 test suite. These will be useful one day for local testing. - More explicit diagnostics for some database problems. - Steps towards support for Oracle as the back-end database: NOT YET COMPLETE. 1.18 Mon Feb 11 11:05:16 GMT 2008 - Add the ability to delete resource database objects from the Admin UI. 1.17 Thu Feb 7 16:26:37 CET 2008 - Fix character-set handling AGAIN :-) The resolver library was correcting accepting any specified character encoding and correctly outputting UTF-8 with the necessary XML and HTML specifications to sayt that's what it was doing, but the top level resolver script was telling Perl to do UTF-8 encoding on output. (Why didn't that cause problems when running under Apache 1/mod_perl 1? Because of the character-set faries.) - Generalise rewrite rule so that /resolve/ URLs are correctly interpreted. This provides an easy means for running against alternative resource databases. - Fix sorting in Admin UI such that it works through successive pages of results. - When editing an object in the web-based Admin UI, drop-down option lists that are populated from the database (e.g. the service-types that a service can belong to) are now sorted. - Fix a bug in editable_fields(), which was omitting from its output those fields used as links to non-dependent sets (e.g. the set of services implementing a service-type) rather than dependent sets (e.g. the one service-type to which a service belongs). The result of that bug was that, for example, the raw numeric service_type_id was included on the service editing page as well as the service-type name. No more. - The resolver now responds more politely if an attempt is made to access a virtual site not supported by the database, and points the user at a new README file that explains the situation. - The service_type table now includes a new "plugin" field which can be used to explicitly specify the name of the Perl plugin to use to implement services of that type, if the required plugin is not named the same as the tag of the service-type. This allows multiple service-types to share the same plugin. (When this field is empty, the plugin named after the service-type's tag is used, as before. Thus the new field is only an override mechanism, and the new arrangement is backwards compatible.) - A database patch script is made available to support the new service_type.plugin field: see db/updates/ - When building URIs from recipes, the resolver now, correctly, accepts the first of several slash-separated candidate fields whose value is defined and non-empty, whereas before it would accept defined but empty values. 1.16 Tue Feb 5 02:57:05 GMT 2008 - Remove advisory dependency on Apache module from Makefile.PL, as the true dependency is now on EITHER Apache or Apache2, and there is no way to specify that in the PREREQ_PM clause. - Modification to how the sample database is built result in a more flexible configuration. - Both the resolver itself and the Admin UI issue more a polite, informative message if the Resource Database is not there. - Documentation tweaks arising from merge of Apache2 CVS branch back into head. - README describes public CVS archive, Debian installation procedure and service-names in the default resource database. 1.15 Mon Jan 28 12:26:37 GMT 2008 - Fix error in Apache2 debian-package configuration file: mod_rewrite's log was written into /var/log/apache rather than /var/log/apache2, which causes Apache2 to refuse to start if Apache 1.x is not also installed. - Comments in Makefile.PL indicate what Debian packages contain each of the prerequisite Perl modules. 1.14 Mon Jan 28 10:49:04 GMT 2008 - Fix the resolver-site's index page to correctly state the baseURL. (No functional changes.) 1.13 Thu Jan 24 18:07:56 GMT 2008 - Small changes to Web configuration to allow Apache 1.x and Apache 2.x installations to co-exist, and to ensure that a Debian install can live side-by-side with a development version. (Yes, this means that you can -- and I do -- run four instances of the resolver on a single computer.) 1.12 Thu Jan 17 15:50:00 GMT 2008 - Support for running under both Apache 1.3/mod_perl and Apache 2.0/mod_perl2. - Add utility function apache_request() and mod_perl_version() to Keystone::Resolver::Utils to support Apache-version independence. 1.11 Mon Dec 17 11:57:16 GMT 2007 - Fix bug #1967, which prevented the creation of certain types of record, including Service and User. 1.10 Thu Dec 13 17:27:15 GMT 2007 - Hardwired username/password pairs for read-only and read-write pairs removed from code. These are now obtained from the KRuser, KRpw, KRrwuser and KRrwpw environment variables. - Set KRuser et al. in web/conf/apache1.3/debian.conf - Set KRuser et al. in t/regression.t - Fixes to the admin system's new-record-creation and editing system. 1.09 Mon Dec 3 09:46:22 GMT 2007 - Add documentation to bin/kr-recipe. - Remove the obsolete PHP-based Web Admin UI from web/htdocs/dbadmin/ - Much better Debian packaging. 1.08 Fri Nov 23 18:23:00 GMT 2007 - Debian packaging. Currently encompasses the Perl part of the application only (libraries and driver scripts). A separate Debian package will follow for the Web Admin UI and the main HTTP entry point. 1.07 Fri Sep 21 10:00:40 BST 2007 - The "deny" boolean field of rule object (both service-type and service rules) is re-cast as an enumeration called "action", with values "include" and "exclude". This is clearer exposition, and better represents the code. The underlying database field is still called "deny" and still uses the boolean values 0 and 1, so no database changes are necessary. 1.06 Thu Sep 20 18:50:54 BST 2007 - Correct implementation of rules: both at the Service-Type and Service levels, and both "include" and "exclude" rules. - Default options for the resolver object may now be set from the environment (though they will be overridden by opt_* keys in the OpenURL being resolved). The KR_OPTIONS environment variable is consulted: it consists of zero or more assignments, separated by commas, each of the form