Monday, July 28, 2008

Roadmap to JoomlaPack 1.2.1

Just over a week ago the stable 1.2 version was released to the public. As always, the stable release signifies the beggining of a new development cycle. This time, instead of jumping straight to developing version 1.3, we decided to improve the latest release in order to produce a safer, more performing, mature component.

This is the list of features we are currently working on, for version 1.2.1:

  • Administrator directory restructuring and change of class names. CUBE is turning to a framework of its own right, built atop the Joomla! Framework. A big step towards full Joomla! 1.5 framework adoption, much of the guts of our component is being recoded to use only J! 1.5 API calls, while providing a backport layer for J! 1.0.x compatibility.
  • Reduce and concatenate the steps (domains) needed to produce a backup. It occured to me that only two domains are actually required and should be present: database backup and file backup. In order to achieve this, a number of changes have to take place:
    • Avoid extracting the installer files to temporary directory. Use the packaged installer files to "seed" the backup file instead. This also has a security enhancement bonus, as no "live" PHP files are written to the temporary directory, eradicating a direct access attack exploiting such files.
    • Use name mangling on temporary files to minimize possibility of direct file access attacks
    • Store the temporary file names and use this table when cleaning up. Moreover, clean up each temporary file right after it's been put in the archive. This is much more reliable than the current method which almost always leaves leftovers.
    • The file list creation and packing steps are merged. This also means that much less data (in number of SQL queries and in total data size alike) is required to be written to database, solving many errors related to db server overload.
  • Drop the "fast" algorithm. It is meaningless on most servers (crashes with timeouts) and the "smart" algorithm is already fast enough.
  • Introduce Magic Numbers for smart algorithm. This will let you fine-tune the smart algorithm's performance to accomodate for slow, overloaded servers.
  • Re-implement translations. It serves a double purpose: get closer to J! 1.5 compatibility and allow the use of semi-automated translation tools on the translation INI files. Some highlights:
    • Introduce upercase INI keys by concatenating header and key, inserting an underscore between them
    • Separate front-end and back-end language files
    • Make a static method CLangManager::_($key) which translates the string like JText::_($key)
  • Error and warning propagation and handling. Right now, if an error occurs in some part of the backup engine, it is not propagated and the process crashes in an unrelated point or completes to a partial backup (or, worse, no backup at all!). The idea is that if an error occurs anywhere in the code, the execution stops immediately, the error message is displayed to the user and also gets logged. In the case of warnings, they will be displayed just below the backup process messages.
  • Distributed AJAX handling. The AJAX proxy will be taken apart and AJAX handlers will be grouped by page, hopefully creating less overhead during the actual backup process.
  • JoomlaPack Installer 3. We are planning on creating the third iteration of our smart restoration script. This time it will be J!1.5-specific, based on the original J! 1.5 installer application. This is much harder than the traditional approach we took with JPI and JPI2, but it will be more forgiving in the case of errors - as you well know JPI2 is notorious for crashing silent when an error occurs during a J! 1.5 site's restoration. It will also cater for changing the cache and temp directories to their defaults if the pre-configured directories do not exist or are not writable, fulfilling a frequently made feature suggestion.

These are quite a mouthfull for a sub-minor number release! Right now the bulk of heavy refactoring is complete, namely the first two points. The rest of them are quite easy to implement, with the exception of the last two points which are bound to consume lots of our time.

The planned release date for 1.2.1 stable is mid-October 2008. Stay tuned!