]> git.mxchange.org Git - hub.git/commitdiff
A lot new methods/class added and many cleanups:
authorRoland Häder <roland@mxchange.org>
Sat, 12 Mar 2011 00:24:29 +0000 (00:24 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 12 Mar 2011 00:24:29 +0000 (00:24 +0000)
- Double-quotes converted to single to speed-up things a little
- Wrong BaseconnectionInstance fixed
- New methods introduced to cruncher:
  + doFetchWorkUnits(): To fetch WUs or generate test units
  + enableIsActive/isActive(): To test/set if the cruncher is active
  + initBufferQueues(): To initialize in/out buffer queues
- addExtraCruncherFilters() renamed to addExtraFilters()
- This method has now project-wide a Controller instance as first argument
- Dublicate method call to addExtraFilters() removed which happens in the
  rewriting process
- $appInstance renamed to $applicationInstance to have a better naming
  convention
- Some deprecated classes removed (they where named wrong)
- BaseHubCruncher (a generic class) extended:
  + It does now check if the in-buffer queue is filled (depending on a
    configurable threshold)
  + It implements initBufferQueues() from CruncherHelper interface
- Copyright fixed in HubMcryptCruncher
- The idle-loop task is now "genericly" registered in the TaskHandler class:
  + This implies that all task-based application will always have at least
    one (but really generic) task.
  + The method hasTasksLeft() will return 'true' in all situations unless the
    idle-loop task "kills" itself
- Generic cruncher-activation filter added
- The mentioned buffer queues are now initialized by a newly added filter class
  and handled by an own task class
- More minor code-cleanups
- TODOs.txt updated

37 files changed:
.gitattributes
application/hub/config.php
application/hub/data.php
application/hub/init.php
application/hub/interfaces/cruncher/class_CruncherHelper.php
application/hub/interfaces/package/fragmenter/class_Fragmentable.php
application/hub/main/commands/console/class_HubConsoleCruncherCommand.php
application/hub/main/commands/console/class_HubConsoleMainCommand.php
application/hub/main/cruncher/class_BaseHubCruncher.php
application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php
application/hub/main/cruncher/test/.htaccess [deleted file]
application/hub/main/cruncher/test/class_HubMcryptCruncher.php [deleted file]
application/hub/main/cruncher/test/class_HubTestCruncher.php [deleted file]
application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrap
application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapBufferQueueInitializerFilter.php [new file with mode: 0644]
application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapExtraBootstrappingFilter.php
application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php [new file with mode: 0644]
application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php
application/hub/main/filter/node/class_NodeInitializationFilter.php
application/hub/main/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php
application/hub/main/filter/task/node/class_NodeTaskHandlerInitializerFilter.php
application/hub/main/handler/tasks/class_TaskHandler.php
application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php
application/hub/main/helper/hub/connection/class_HubSelfConnectHelper.php
application/hub/main/package/fragmenter/class_PackageFragmenter.php
application/hub/main/resolver/command/console/class_HubConsoleCommandResolver.php
application/hub/main/resolver/controller/console/class_HubConsoleControllerResolver.php
application/hub/main/tags/package/class_PackageTags.php
application/hub/main/tasks/class_
application/hub/main/tasks/cruncher/.htaccess [new file with mode: 0644]
application/hub/main/tasks/cruncher/class_ [new file with mode: 0644]
application/hub/main/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php [new file with mode: 0644]
application/hub/main/template/announcement/class_AnnouncementTemplateEngine.php
application/hub/main/template/connect/class_SelfConnectTemplateEngine.php
application/hub/main/template/objects/class_ObjectRegistryTemplateEngine.php
docs/TODOs.txt
index.php

index 5847ecfbbdea8a6471d8976c5e2abc523f6c5fcc..a612fca3ac82a3dba0c250faef07db306cb07f42 100644 (file)
@@ -140,9 +140,6 @@ application/hub/main/cruncher/class_ -text
 application/hub/main/cruncher/class_BaseHubCruncher.php svneol=native#text/plain
 application/hub/main/cruncher/mcrypt/.htaccess svneol=native#text/plain
 application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php svneol=native#text/plain
-application/hub/main/cruncher/test/.htaccess svneol=native#text/plain
-application/hub/main/cruncher/test/class_HubMcryptCruncher.php svneol=native#text/plain
-application/hub/main/cruncher/test/class_HubTestCruncher.php svneol=native#text/plain
 application/hub/main/database/.htaccess -text svneol=unset#text/plain
 application/hub/main/database/wrapper/.htaccess -text svneol=unset#text/plain
 application/hub/main/database/wrapper/class_NodeInformationDatabaseWrapper.php -text svneol=unset#text/plain
@@ -191,7 +188,9 @@ application/hub/main/filter/bootstrap/class_HubBootstrapListenerPoolFilter.php -
 application/hub/main/filter/bootstrap/class_HubBootstrapRestoreNodeListFilter.php -text svneol=unset#text/plain
 application/hub/main/filter/bootstrap/cruncher/.htaccess svneol=native#text/plain
 application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrap -text
+application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapBufferQueueInitializerFilter.php svneol=native#text/plain
 application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapExtraBootstrappingFilter.php svneol=native#text/plain
+application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php svneol=native#text/plain
 application/hub/main/filter/bootstrap/node/.htaccess svneol=native#text/plain
 application/hub/main/filter/bootstrap/node/class_NodeBootstrap -text
 application/hub/main/filter/bootstrap/node/class_NodeBootstrapExtraBootstrappingFilter.php svneol=native#text/plain
@@ -398,6 +397,9 @@ application/hub/main/tags/package/class_PackageTags.php svneol=native#text/plain
 application/hub/main/tasks/.htaccess -text svneol=unset#text/plain
 application/hub/main/tasks/class_ -text svneol=unset#text/plain
 application/hub/main/tasks/class_BaseTask.php -text svneol=unset#text/plain
+application/hub/main/tasks/cruncher/.htaccess svneol=native#text/plain
+application/hub/main/tasks/cruncher/class_ -text
+application/hub/main/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php svneol=native#text/plain
 application/hub/main/tasks/hub/.htaccess -text svneol=unset#text/plain
 application/hub/main/tasks/hub/announcement/.htaccess -text svneol=unset#text/plain
 application/hub/main/tasks/hub/announcement/class_HubSelfAnnouncementTask.php -text svneol=unset#text/plain
index 89d2adfec7e2a0a1e120180bca1b11246e211a3c..8d69b82e4b3704ef0cf1adf57d3b3eead5f0588e 100644 (file)
@@ -42,7 +42,7 @@ $cfg->setConfigEntry('boot_node_udp_listen_port', 9061);
 // CFG: NODE-DEFAULT-MODE (can be 'regular', 'list', 'master' or 'boot', default is 'regular')
 $cfg->setConfigEntry('node_default_mode', 'regular');
 
-// CFG: CRUNCHER-DEFAULT-MODE (can be 'mcrypt' at the moment)
+// CFG: CRUNCHER-DEFAULT-MODE (can be only 'mcrypt' at the moment)
 $cfg->setConfigEntry('cruncher_default_mode', 'mcrypt');
 
 // CFG: TEMPLATE-ENGINE
@@ -171,6 +171,15 @@ $cfg->setConfigEntry('node_activation_task_handler_initializer_filter', 'NodeTas
 // CFG: CRUNCHER-BOOTSTRAP-TASK-HANDLER-INITIALIZER-FILTER
 $cfg->setConfigEntry('cruncher_bootstrap_task_handler_initializer_filter', 'CruncherTaskHandlerInitializerFilter');
 
+// CFG: CRUNCHER-BOOTSTRAP-EXTRA-BOOTSTRAPPING-FILTER
+$cfg->setConfigEntry('cruncher_bootstrap_extra_bootstrapping_filter', 'CruncherBootstrapExtraBootstrappingFilter');
+
+// CFG: CRUNCHER-BOOTSTRAP-BUFFER-QUEUE-INITIALIZER-FILTER
+$cfg->setConfigEntry('cruncher_bootstrap_buffer_queue_initializer_filter', 'CruncherBootstrapBufferQueueInitializerFilter');
+
+// CFG: CRUNCHER-BOOTSTRAP-GENERIC-ACTIVATION-FILTER
+$cfg->setConfigEntry('cruncher_bootstrap_generic_activation_filter', 'CruncherBootstrapGenericActivationFilter');
+
 // CFG: NODE-ACTIVATION-SELF-ANNOUNCEMENT-TASK-FILTER
 $cfg->setConfigEntry('node_activation_self_announcement_task_filter', 'NodeActivationSelfAnnouncementFilter');
 
@@ -192,8 +201,8 @@ $cfg->setConfigEntry('node_bootstrap_restore_nodelist_filter', 'NodeBootstrapRes
 // CFG: NODE-BOOTSTRAP-INIT-QUEUES-FILTER
 $cfg->setConfigEntry('node_bootstrap_init_queues_filter', 'NodeBootstrapInitQueuesFilter');
 
-// CFG: NODE-BOOTSTRAP-EXTRA-BOOTSTRAP-FILTER
-$cfg->setConfigEntry('node_bootstrap_extra_bootstrap_filter', 'NodeBootstrapExtraBootstrappingFilter');
+// CFG: NODE-BOOTSTRAP-EXTRA-BOOTSTRAPPING-FILTER
+$cfg->setConfigEntry('node_bootstrap_extra_bootstrapping_filter', 'NodeBootstrapExtraBootstrappingFilter');
 
 // CFG: NODE-BOOTSTRAP-LISTENER-POOL-FILTER
 $cfg->setConfigEntry('node_bootstrap_listener_pool_filter', 'NodeBootstrapListenerPoolFilter');
@@ -261,6 +270,9 @@ $cfg->setConfigEntry('code_template_type', 'xml');
 // CFG: PACKAGE-STACKER-CLASS
 $cfg->setConfigEntry('package_stacker_class', 'FiFoStacker');
 
+// CFG: CRUNCHER-BUFFER-STACKER-CLASS
+$cfg->setConfigEntry('cruncher_buffer_stacker_class', 'FiFoStacker');
+
 // CFG: STACKER-ANNOUNCEMENT-MAX-SIZE
 $cfg->setConfigEntry('stacker_announcement_max_size', 20);
 
@@ -276,6 +288,12 @@ $cfg->setConfigEntry('stacker_declared_max_size', 1000);
 // CFG: STACKER-OUTGOING-MAX-SIZE
 $cfg->setConfigEntry('stacker_outgoing_max_size', 100);
 
+// CFG: STACKER-IN-QUEUE-MAX-SIZE
+$cfg->setConfigEntry('stacker_in_queue_max_size', 10000);
+
+// CFG: STACKER-OUT-QUEUE-MAX-SIZE
+$cfg->setConfigEntry('stacker_out_queue_max_size', 10000);
+
 // CFG: STACKER-OBJECT-REGISTRY-MAX-SIZE
 $cfg->setConfigEntry('stacker_object_registry_max_size', 100);
 
@@ -375,6 +393,9 @@ $cfg->setConfigEntry('hub_self_announcement_task_class', 'HubSelfAnnouncementTas
 // CFG: HUB-PACKAGE-WRITER-TASK-CLASS
 $cfg->setConfigEntry('hub_package_writer_task_class', 'NetworkPackageWriterTask');
 
+// CFG: CRUNCHER-WORK-UNIT-FETCHER-TASK-CLASS
+$cfg->setConfigEntry('cruncher_work_unit_fetcher_task_class', 'CruncherWorkUnitFetcherTask');
+
 // CFG: TASK-NETWORK-PACKAGE-WRITER-STARTUP-DELAY
 $cfg->setConfigEntry('task_network_package_writer_startup_delay', 2500);
 
@@ -384,6 +405,15 @@ $cfg->setConfigEntry('task_network_package_writer_interval_delay', 10);
 // CFG: TASK-NETWORK-PACKAGE-WRITER-MAX-RUNS
 $cfg->setConfigEntry('task_network_package_writer_max_runs', 0);
 
+// CFG: TASK-CRUNCHER-WORK-UNIT-FETCHER-STARTUP-DELAY
+$cfg->setConfigEntry('task_cruncher_work_unit_fetcher_startup_delay', 1000);
+
+// CFG: TASK-CRUNCHER-WORK-UNIT-FETCHER-INTERVAL-DELAY
+$cfg->setConfigEntry('task_cruncher_work_unit_fetcher_interval_delay', 10);
+
+// CFG: TASK-CRUNCHER-WORK-UNIT-FETCHER-MAX-RUNS
+$cfg->setConfigEntry('task_cruncher_work_unit_fetcher_max_runs', 0);
+
 // CFG: TASK-LIST-CLASS
 $cfg->setConfigEntry('task_list_class', 'TaskList');
 
@@ -480,5 +510,11 @@ $cfg->setConfigEntry('external_ip', '');
 // CFG: PACKAGE-FRAGMENTER-CLASS
 $cfg->setConfigEntry('package_fragmenter_class', 'PackageFragmenter');
 
+// CFG: CRUNCHER-ALLOW-TEST-WORK-UNITS
+$cfg->setConfigEntry('cruncher_allow_test_units', 'Y');
+
+// CFG: CRUNCHER-IN-BUFFER-MIN-THRESHOLD
+$cfg->setConfigEntry('cruncher_in_buffer_min_threshold', 3);
+
 // [EOF]
 ?>
index be91c665945a52c96aa962c0f8f5af2e4271230c..6e8b67cc09fe31739c914bfbcbbde9dfda9542c3 100644 (file)
@@ -43,9 +43,9 @@ $app = call_user_func_array(
 );
 
 // Set application name and version
-$app->setAppName("Generic Object Sharing Hub");
-$app->setAppVersion("0.0.0");
-$app->setAppShortName("hub");
+$app->setAppName('Generic Object Sharing Hub');
+$app->setAppVersion('0.0.0');
+$app->setAppShortName('hub');
 
 // [EOF]
 ?>
index b3cd98935ad3634403edd2742dea7312424aa8d5..b6e43954592d7dbf03b80f7ca7836b985f828e54 100644 (file)
@@ -38,12 +38,6 @@ $cfg = FrameworkConfiguration::getInstance();
 // Initialize output system
 require($cfg->getConfigEntry('base_path') . 'inc/output.php');
 
-// Initialize file i/o system
-require($cfg->getConfigEntry('base_path') . 'inc/file_io.php');
-
-// Include the language sub-system
-require($cfg->getConfigEntry('base_path') . 'inc/language.php');
-
 // This application needs a database connection then we have to simply include
 // the inc/database.php script
 require($cfg->getConfigEntry('base_path') . 'inc/database.php');
index 3aaf7bb431a3768d46820e954c07da6ec9db11e5..68b791d11c800d34338b22e7b607362f03a9a29b 100644 (file)
@@ -32,6 +32,15 @@ interface CruncherHelper extends FrameworkInterface {
         */
        function doBootstrapping ();
 
+       /**
+        * This method determines if the in-buffer is going to depleted and if so,
+        * it fetches more WUs from the network. If no WU can be fetched from the
+        * network and if enabled, a random test WU is being generated.
+        *
+        * @return      void
+        */
+       function doFetchWorkUnits ();
+
        /**
         * Outputs the console teaser. This should only be executed on startup or
         * full restarts. This method generates some space around the teaser.
@@ -43,9 +52,33 @@ interface CruncherHelper extends FrameworkInterface {
        /**
         * Add some cruncher-specific filters
         *
+        * @param       $controllerInstance             An object of a Controller instance
+        * @param       $responseInstance               An object of a Responseable instance
+        * @return      void
+        */
+       function addExtraFilters (Controller $controllerInstance, Responseable $responseInstance);
+
+       /**
+        * Enables/disables the cruncher (just sets a flag)
+        *
+        * @param       $version        Version number of this cruncher
+        * @return      void
+        */
+       function enableIsActive ($isActive = true);
+
+       /**
+        * Determines wether the cruncher is active
+        *
+        * @return      $isActive       Wether the cruncher is active
+        */
+       function isActive ();
+
+       /**
+        * Initializes all buffer queues (mostly in/out)
+        *
         * @return      void
         */
-       function addExtraCruncherFilters ();
+       function initBufferQueues ();
 }
 
 // [EOF]
index e2336c4c37856b5c00d3b7569fc88fa0272c5749..b511efd6647ed5ca9462c018b975bde53d76c271 100644 (file)
@@ -31,7 +31,7 @@ interface Fragmentable extends FrameworkInterface {
         * @param       $connectionInstance             A helper instance for connections
         * @return      void
         */
-       function fragmentPackageArray (array $packageData, BaseconnectionInstance $connectionInstance);
+       function fragmentPackageArray (array $packageData, BaseConnectionHelper $connectionInstance);
 
        /**
         * This method gets the next chunk from the internal FIFO which should be
index 21743bd64dda5b8a22a9def37ef006268225e5cb..d62a939d5b55c66c5ad6adf27be327e33561bd77 100644 (file)
@@ -61,10 +61,12 @@ class HubConsoleCruncherCommand extends BaseCommand implements Commandable {
                // Get a registry and the application instance from it
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
-               // ----------------------- Bootstrapping phase ------------------------
-               // Try to bootstrap the node and pass the request instance to it for
-               // extra arguments which mostly override config entries or enable special
-               // features within the hub (none is ready at this development stage)
+               /*
+                * ----------------------- Bootstrapping phase ------------------------
+                * Try to bootstrap the node and pass the request instance to it for
+                * extra arguments which mostly override config entries or enable special
+                * features within the hub (none is ready at this development stage)
+                */
                $this->debugOutput('BOOTSTRAP: Beginning with bootstrap...');
                $applicationInstance->getControllerInstance()->executeBootstrapFilters($requestInstance, $responseInstance);
                $this->debugOutput('BOOTSTRAP: Bootstrap finished.');
@@ -72,20 +74,19 @@ class HubConsoleCruncherCommand extends BaseCommand implements Commandable {
                // Get cruncher instance
                $cruncherInstance = Registry::getRegistry()->getInstance('cruncher');
 
-               // Add some cruncher-specific filters, e.g. announcement
-               $cruncherInstance->addExtraCruncherFilters();
-
                // Get task handler instance
                $handlerInstance = Registry::getRegistry()->getInstance('task');
 
                // Debug message
                $this->debugOutput('MAIN: --- Entering main loop. ---');
 
-               // ----------------------------- Main loop ----------------------------
-               // This is the main loop. Queried calls should come back here very fast
-               // so the whole application runs on nice speed. This while-loop goes
-               // until the cruncher is no longer active or all tasks are killed.
-               while ($handlerInstance->hasTasksLeft()) {
+               /*
+                * ----------------------------- Main loop ----------------------------
+                * This is the main loop. Queried calls should come back here very fast
+                * so the whole application runs on nice speed. This while-loop goes
+                * until the cruncher is no longer active or all tasks are killed.
+                */
+               while (($cruncherInstance->isActive()) && ($handlerInstance->hasTasksLeft())) {
                        // Handle all tasks here
                        $handlerInstance->handleTasks();
                } // END - while
@@ -110,12 +111,16 @@ class HubConsoleCruncherCommand extends BaseCommand implements Commandable {
 
                // Add bootstrap filters
                $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_task_handler_initializer_filter'));
-               //$controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_generate_nodeid_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_extra_bootstrapping_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_buffer_queue_initializer_filter'));
+
+               // This is the last generic boostrap filter
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_generic_activation_filter'));
 
                // Add shutdown filters
                //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('cruncher_shutdown_task_handler_filter'));
 
-               // This is the last generic filter
+               // This is the last generic shutdown filter
                $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('cruncher_shutdown_cruncher_filter'));
        }
 }
index e9140aa8b38aeb9e117385143a60112d3190bc02..f6af44969b2bca60945218f814774cfb722fcb3c 100644 (file)
@@ -61,10 +61,12 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
                // Get a registry and the application instance from it
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
-               // ----------------------- Bootstrapping phase ------------------------
-               // Try to bootstrap the node and pass the request instance to it for
-               // extra arguments which mostly override config entries or enable special
-               // features within the hub (none is ready at this development stage)
+               /*
+                * ----------------------- Bootstrapping phase ------------------------
+                * Try to bootstrap the node and pass the request instance to it for
+                * extra arguments which mostly override config entries or enable special
+                * features within the hub (none is ready at this development stage)
+                */
                $this->debugOutput('BOOTSTRAP: Beginning with bootstrap...');
                $applicationInstance->getControllerInstance()->executeBootstrapFilters($requestInstance, $responseInstance);
                $this->debugOutput('BOOTSTRAP: Bootstrap finished.');
@@ -75,9 +77,11 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
                // Add some node-specific filters, e.g. announcement
                $nodeInstance->addExtraNodeFilters();
 
-               // -------------------------- Hub activation --------------------------
-               // Activates the hub by doing some final preparation steps and setting
-               // the attribute $hubIsActive to true
+               /*
+                * -------------------------- Hub activation --------------------------
+                * Activates the hub by doing some final preparation steps and setting
+                * the attribute $hubIsActive to true
+                */
                $nodeInstance->activateNode($requestInstance, $responseInstance);
 
                // Get task handler instance
@@ -86,10 +90,12 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
                // Debug message
                $this->debugOutput('MAIN: --- Entering main loop. ---');
 
-               // ----------------------------- Main loop ----------------------------
-               // This is the main loop. Queried calls should come back here very fast
-               // so the whole application runs on nice speed. This while-loop goes
-               // until the hub is no longer active or all tasks are killed.
+               /*
+                * ----------------------------- Main loop ----------------------------
+                * This is the main loop. Queried calls should come back here very fast
+                * so the whole application runs on nice speed. This while-loop goes
+                * until the hub is no longer active or all tasks are killed.
+                */
                while (($nodeInstance->getIsActive()) && ($handlerInstance->hasTasksLeft())) {
                        // Handle all tasks here
                        $handlerInstance->handleTasks();
@@ -118,7 +124,7 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
                $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_generate_sessionid_filter'));
                $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_restore_nodelist_filter'));
                $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_init_queues_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_extra_bootstrap_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_extra_bootstrapping_filter'));
                $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_listener_pool_filter'));
 
                // Add hub activation filters
@@ -129,7 +135,7 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
                $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_deinit_queues_filter'));
                $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_task_handler_filter'));
 
-               // This is the last generic filter
+               // This is the last generic shutdown filter
                $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_node_filter'));
        }
 }
index 60ef0cb345bf1ae8fce13a5e523899782edaaadc..54c5c3dec4d8962a75935257a73a55b2abfd041f 100644 (file)
@@ -27,6 +27,16 @@ class BaseHubCruncher extends BaseHubSystem implements Updateable {
         */
        private $version = 'x.x';
 
+       /**
+        * By default no cruncher is active
+        */
+       private $isActive = false;
+
+       /**
+        * All buffer queue instances (a FIFO)
+        */
+       private $bufferInstance = null;
+
        /**
         * Protected constructor
         *
@@ -57,6 +67,60 @@ class BaseHubCruncher extends BaseHubSystem implements Updateable {
                $this->version = (string) $version;
        }
 
+       /**
+        * Checks wether the in-buffer queue is filled by comparing it's current
+        * amount of entries against a threshold.
+        *
+        * @return      $isFilled       Wether the in-buffer is filled
+        */
+       protected function isInBufferQueueFilled () {
+               // Determine it
+               $isFilled = ($this->bufferInstance->getStackCount('in_queue') > $this->getConfigInstance()->getConfigEntry('cruncher_in_buffer_min_threshold'));
+
+               // And return the result
+               return $isFilled;
+       }
+
+       /**
+        * Enables/disables the cruncher (just sets a flag)
+        *
+        * @param       $version        Version number of this cruncher
+        * @return      void
+        */
+       public final function enableIsActive ($isActive = true) {
+               $this->isActive = (bool) $isActive;
+       }
+
+       /**
+        * Determines wether the cruncher is active
+        *
+        * @return      $isActive       Wether the cruncher is active
+        */
+       public final function isActive () {
+               return $this->isActive;
+       }
+
+       /**
+        * Initializes all buffer queues (mostly in/out), this method is demanded
+        * by the CruncherHelper interface.
+        *
+        * @return      void
+        */
+       public function initBufferQueues () {
+               /*
+                * Initialize both buffer queues, we can use the FIFO class here
+                * directly and encapsulate its method calls with protected methods.
+                */
+               $this->bufferInstance = ObjectFactory::createObjectByConfiguredName('cruncher_buffer_stacker_class');
+
+               // Initialize common stackers, like in/out
+               $this->bufferInstance->initStacker('in_queue');
+               $this->bufferInstance->initStacker('out_queue');
+
+               // Output debug message
+               $this->debugOutput('CRUNCHER: All buffers are now initialized.');
+       }
+
        /**
         * Updates a given field with new value
         *
index d23236d86309e1bb8bf0653243bb7cc69ffc03e2..c31309971efefc8e0d3023e964c4ddec59ad8159 100644 (file)
@@ -54,18 +54,37 @@ class HubMcryptCruncher extends BaseHubCruncher implements CruncherHelper, Regis
 
        /**
         * Method to "bootstrap" the cruncher. This step does also apply provided
-        * command-line arguments stored in the request instance. The regular cruncher
-        * should communicate with the bootstrap-crunchers at this point.
+        * command-line arguments stored in the request instance. No buffer queue
+        * will be initialized here, we do only "general" things here.
         *
         * @return      void
         * @todo        Implement this method
         */
        public function doBootstrapping () {
-               // Call generic (parent) bootstrapping method first
-               parent::doGenericBootstrapping();
                $this->partialStub('Please implement this method.');
        }
 
+       /**
+        * This method determines if the in-buffer is going to depleted and if so,
+        * it fetches more WUs from the network. If no WU can be fetched from the
+        * network and if enabled, a random test WU is being generated.
+        *
+        * @return      void
+        */
+       public function doFetchWorkUnits () {
+               // Simply check if we have enough WUs left in the in-buffer queue (a FIFO)
+               if (!$this->isInBufferQueueFilled()) {
+                       // The in-buffer queue needs filling, so head out and get some work
+                       $this->fillInBufferQueueWithWorkUnits();
+
+                       // Is the buffer still not filled and are test-packages allowed?
+                       if ((!$this->isInBufferQueueFilled()) && ($this->getConfigInstance()->getConfigEntry('cruncher_allow_test_units') == 'Y')) {
+                               // Then fill the in-buffer with (one) test-unit(s)
+                               $this->fillInBufferQueueWithTestUnits();
+                       } // END - if
+               } // END - if
+       }
+
        /**
         * Outputs the console teaser. This should only be executed on startup or
         * full restarts. This method generates some space around the teaser.
@@ -76,7 +95,7 @@ class HubMcryptCruncher extends BaseHubCruncher implements CruncherHelper, Regis
                // Output all lines
                $this->debugOutput(' ');
                $this->debugOutput('MCrypt Cruncher v' . $this->getVersion() . ' is starting ...');
-               $this->debugOutput('Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2011 Hub Developer Team');
+               $this->debugOutput('Copyright (c) 2011 MCrypt Cruncher Developer Team');
                $this->debugOutput(' ');
                $this->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.');
                $this->debugOutput('This is free software, and you are welcome to redistribute it under certain');
@@ -87,11 +106,14 @@ class HubMcryptCruncher extends BaseHubCruncher implements CruncherHelper, Regis
        /**
         * Add some cruncher-specific filters
         *
+        * @param       $controllerInstance     An object of a Controller instance
+        * @param       $responseInstance       An object of a Responseable instance
         * @return      void
         * @todo        0% done
         */
-       public function addExtraCruncherFilters () {
+       public function addExtraFilters (Controller $controllerInstance, Responseable $responseInstance) {
                // Add some filters here
+               $this->partialStub('Please add some cruncher-specific filters, if required.');
        }
 }
 
diff --git a/application/hub/main/cruncher/test/.htaccess b/application/hub/main/cruncher/test/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/hub/main/cruncher/test/class_HubMcryptCruncher.php b/application/hub/main/cruncher/test/class_HubMcryptCruncher.php
deleted file mode 100644 (file)
index f551ef4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-// @DEPRECATED
-?>
diff --git a/application/hub/main/cruncher/test/class_HubTestCruncher.php b/application/hub/main/cruncher/test/class_HubTestCruncher.php
deleted file mode 100644 (file)
index f551ef4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-// @DEPRECATED
-?>
index b5541131c33905ad134bfc499873b66a138aea0e..8f77e8ab7ae0e77c6dc12b7aee21278ae888a21c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * A ??? filter for bootstrapping
+ * A ??? filter for bootstrapping crunchers
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
diff --git a/application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapBufferQueueInitializerFilter.php b/application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapBufferQueueInitializerFilter.php
new file mode 100644 (file)
index 0000000..7a5fd80
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/**
+ * A BufferQueue filter for bootstrapping crunchers
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Cruncher Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class CruncherBootstrapBufferQueueInitializerFilter extends BaseFilter implements Filterable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this filter class
+        *
+        * @return      $filterInstance         An instance of this filter class
+        */
+       public final static function createCruncherBootstrapBufferQueueInitializerFilter () {
+               // Get a new instance
+               $filterInstance = new CruncherBootstrapBufferQueueInitializerFilter();
+
+               // Return the instance
+               return $filterInstance;
+       }
+
+       /**
+        * Executes the filter with given request and response objects
+        *
+        * @param       $requestInstance        An instance of a class with an Requestable interface
+        * @param       $responseInstance       An instance of a class with an Responseable interface
+        * @return      void
+        * @todo        0% done
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Get cruncher instance
+               $cruncherInstance = Registry::getRegistry()->getInstance('cruncher');
+
+               // Init all buffer queues
+               $cruncherInstance->initBufferQueues();
+       }
+}
+
+// [EOF]
+?>
index 17deffef9539d5a422bdb3482caf236a0dd93b18..ca55ffd81d74d5a7bba278a5cf604a441c2a2cd4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * A ExtraBootstrapping filter for bootstrapping
+ * A ExtraBootstrapping filter for bootstrapping crunchers
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
diff --git a/application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php b/application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php
new file mode 100644 (file)
index 0000000..7b12643
--- /dev/null
@@ -0,0 +1,69 @@
+<?php
+/**
+ * A GenericActivation filter for bootstrapping crunchers
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class CruncherBootstrapGenericActivationFilter extends BaseFilter implements Filterable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this filter class
+        *
+        * @return      $filterInstance         An instance of this filter class
+        */
+       public final static function createCruncherBootstrapGenericActivationFilter () {
+               // Get a new instance
+               $filterInstance = new CruncherBootstrapGenericActivationFilter();
+
+               // Return the instance
+               return $filterInstance;
+       }
+
+       /**
+        * Executes the filter with given request and response objects
+        *
+        * @param       $requestInstance        An instance of a class with an Requestable interface
+        * @param       $responseInstance       An instance of a class with an Responseable interface
+        * @return      void
+        * @todo        Maybe we want to do somthing more here?
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Get a cruncher instance
+               $cruncherInstance = Registry::getRegistry()->getInstance('cruncher');
+
+               // Set the flag
+               $cruncherInstance->enableIsActive();
+
+               // Debug message
+               $this->debugOutput('BOOTSTRAP: The cruncher has been activated.');
+       }
+}
+
+// [EOF]
+?>
index 1c6c9af29ef8ccaf958cf58cb1cb145793c00689..f33ff1d5977954feca4f645ff3a9dd486e1ae02b 100644 (file)
@@ -75,13 +75,13 @@ class CruncherInitializationFilter extends BaseFilter implements Filterable {
                        $cruncherInstance = ObjectFactory::createObjectByName($className, array($requestInstance));
 
                        // Get a registry
-                       $appInstance = Registry::getRegistry()->getInstance('app');
+                       $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                        // Set the app instance
-                       $cruncherInstance->setApplicationInstance($appInstance);
+                       $cruncherInstance->setApplicationInstance($applicationInstance);
 
                        // Add cruncher-specific filters
-                       $cruncherInstance->addExtraFilters($requestInstance, $responseInstance);
+                       $cruncherInstance->addExtraFilters($applicationInstance->getControllerInstance(), $responseInstance);
                } catch (ClassNotFoundException $e) {
                        // This exception means, the cruncher mode is invalid.
                        // @TODO Can we rewrite this to app_die() ?
index 4abb7d99e21e1fdcff2e3690066b3feb4dbadd63..8b90f65fdd8f6e14c8885a5ccc39d6a5a09fbdb7 100644 (file)
@@ -75,13 +75,13 @@ class NodeInitializationFilter extends BaseFilter implements Filterable {
                        $nodeInstance = ObjectFactory::createObjectByName($className, array($requestInstance));
 
                        // Get a registry
-                       $appInstance = Registry::getRegistry()->getInstance('app');
+                       $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                        // Set the app instance
-                       $nodeInstance->setApplicationInstance($appInstance);
+                       $nodeInstance->setApplicationInstance($applicationInstance);
 
                        // Add node-specific filters
-                       $nodeInstance->addExtraFilters($requestInstance, $responseInstance);
+                       $nodeInstance->addExtraFilters($applicationInstance->getControllerInstance(), $responseInstance);
                } catch (ClassNotFoundException $e) {
                        // This exception means, the node mode is invalid.
                        // @TODO Can we rewrite this to app_die() ?
index 895223257344cd420986505baf1f99ff1ddda2b4..15152b2e7eeedd127853ddce6919a041771bd147 100644 (file)
@@ -52,7 +52,7 @@ class CruncherTaskHandlerInitializerFilter extends BaseFilter implements Filtera
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         * @throws      FilterChainException    If we need to interrupt the filter chain
-        * @todo        0% done
+        * @todo        5% done
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Get cruncher instance
@@ -61,6 +61,11 @@ class CruncherTaskHandlerInitializerFilter extends BaseFilter implements Filtera
                // Get a new task handler instance
                $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class');
 
+               // Register all tasks:
+               // 1) A task for fetching WUs (work units)
+               $taskInstance = ObjectFactory::createObjectByConfiguredName('cruncher_work_unit_fetcher_task_class');
+               $handlerInstance->registerTask('cruncher_work_unit_fetcher', $taskInstance);
+
                // Put the task handler in registry
                Registry::getRegistry()->addInstance('task', $handlerInstance);
        }
index 0d0a24989b70e3e1fd8b599ad6a3e46b7aae6b2c..1ae1a5af61df47b5d66172e6f64821dfc7412976 100644 (file)
@@ -61,12 +61,6 @@ class NodeTaskHandlerInitializerFilter extends BaseFilter implements Filterable
                // Get a new task handler instance
                $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class');
 
-               // Generate idle task
-               $taskInstance = ObjectFactory::createObjectByConfiguredName('idle_task_class');
-
-               // Register it as well
-               $handlerInstance->registerTask('idle_loop', $taskInstance);
-
                // Network package reader, needs to be delayed a little
                $handlerInstance->registerTask('network_package_reader', $nodeInstance->getListenerPoolInstance());
 
index 7a267f9e352fe460bda9343b33254afbc08bd980..02fd4b7c55a3570b27c526a013c64363d43cfa19 100644 (file)
@@ -64,6 +64,10 @@ class TaskHandler extends BaseHandler implements Registerable, HandleableTask {
                // Output debug message
                $handlerInstance->debugOutput('TASK-HANDLER: Task handler initialized.');
 
+               // Register the first (and generic) idle-loop task
+               $taskInstance = ObjectFactory::createObjectByConfiguredName('idle_task_class');
+               $handlerInstance->registerTask('idle_loop', $taskInstance);
+
                // Return the prepared instance
                return $handlerInstance;
        }
index 87f35e7f2f954bb5b26620616b3d9f0eb53e2b39..a3a62ee9c62ef4c1a1cfa63bef8dc1ef8dd1ba45 100644 (file)
@@ -69,10 +69,10 @@ class HubDescriptorHelper extends BaseHubHelper implements HelpableHub {
                $this->debugOutput('HELPER: Starting with announcement to upper hubs...');
 
                // Get the application instance
-               $appInstance = Registry::getRegistry()->getInstance('app');
+               $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Get a XML template instance
-               $templateInstance = ObjectFactory::createObjectByConfiguredName('announcement_template_class', array($appInstance));
+               $templateInstance = ObjectFactory::createObjectByConfiguredName('announcement_template_class', array($applicationInstance));
 
                // Disable language support
                $templateInstance->enableLanguageSupport(false);
index dee29469cd1b43b48448873dd218303c4c8380bd..9f11626adc9615f42e77ece1d7261cc4b43a974e 100644 (file)
@@ -68,10 +68,10 @@ class HubSelfConnectHelper extends BaseHubHelper implements HelpableHub {
                $this->debugOutput('HELPER: Attempting self-connect...');
 
                // Get the application instance
-               $appInstance = Registry::getRegistry()->getInstance('app');
+               $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Get a XML template instance
-               $templateInstance = ObjectFactory::createObjectByConfiguredName('self_connect_template_class', array($appInstance));
+               $templateInstance = ObjectFactory::createObjectByConfiguredName('self_connect_template_class', array($applicationInstance));
 
                // Disable language support
                $templateInstance->enableLanguageSupport(false);
index 1d221578ee0fb54218470002244f97e216179d0a..6d69683c2ed4216485db9674389e3a0fbc6dd2d1 100644 (file)
@@ -57,7 +57,7 @@ class PackageFragmenter extends BaseFrameworkSystem implements Fragmentable {
         * @param       $connectionInstance             A helper instance for connections
         * @return      void
         */
-       public function fragmentPackageArray (array $packageData, BaseconnectionInstance $connectionInstance) {
+       public function fragmentPackageArray (array $packageData, BaseConnectionHelper $connectionInstance) {
        }
 
        /**
index 5c7b742072af8484120baa3b784e2d4ede103911..d5aba0faefe490d724f90658ffb51edcb3e7ee85 100644 (file)
@@ -39,12 +39,12 @@ class HubConsoleCommandResolver extends BaseCommandResolver implements CommandRe
         * Creates an instance of a HubConsole command resolver with a given default command
         *
         * @param       $commandName                            The default command we shall execute
-        * @param       $appInstance                            An instance of a manageable application helper class
+        * @param       $applicationInstance            An instance of a manageable application helper class
         * @return      $resolverInstance                       The prepared command resolver instance
         * @throws      EmptyVariableException          Thrown if default command is not set
         * @throws      InvalidCommandException         Thrown if default command is invalid
         */
-       public static final function createHubConsoleCommandResolver ($commandName, ManageableApplication $appInstance) {
+       public static final function createHubConsoleCommandResolver ($commandName, ManageableApplication $applicationInstance) {
                // Create the new instance
                $resolverInstance = new HubConsoleCommandResolver();
 
@@ -58,7 +58,7 @@ class HubConsoleCommandResolver extends BaseCommandResolver implements CommandRe
                }
 
                // Set the application instance
-               $resolverInstance->setApplicationInstance($appInstance);
+               $resolverInstance->setApplicationInstance($applicationInstance);
 
                // Return the prepared instance
                return $resolverInstance;
index 62030a930c6e4028dc750859f977f8e9031d0973..0eaadb7071ed2ed962e7be9b5b63e64605c0918f 100644 (file)
@@ -39,12 +39,12 @@ class HubConsoleControllerResolver extends BaseControllerResolver implements Con
         * Creates an instance of a resolver class with a given command
         *
         * @param       $controllerName                         The controller we shall resolve
-        * @param       $appInstance                            An instance of a manageable application helper class
+        * @param       $applicationInstance            An instance of a manageable application helper class
         * @return      $resolverInstance                       The prepared controller resolver instance
         * @throws      EmptyVariableException          Thrown if default command is not set
         * @throws      InvalidControllerException      Thrown if default controller is invalid
         */
-       public static final function createHubConsoleControllerResolver ($controllerName, ManageableApplication $appInstance) {
+       public static final function createHubConsoleControllerResolver ($controllerName, ManageableApplication $applicationInstance) {
                // Create the new instance
                $resolverInstance = new HubConsoleControllerResolver();
 
@@ -58,7 +58,7 @@ class HubConsoleControllerResolver extends BaseControllerResolver implements Con
                }
 
                // Set the application instance
-               $resolverInstance->setApplicationInstance($appInstance);
+               $resolverInstance->setApplicationInstance($applicationInstance);
 
                // Set command name
                $resolverInstance->setControllerName($controllerName);
index e8e0b6a9f1cbe477fa5ba07347b39fb9ee743a4f..f7aa8ff622a2bb57496da1f1eeebbba78ef343a0 100644 (file)
@@ -71,10 +71,10 @@ class PackageTags extends BaseTags implements Tagable {
                $this->debugOutput('TAGS: Initializing object registry - START');
 
                // Get the application instance
-               $appInstance = Registry::getRegistry()->getInstance('app');
+               $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Get a XML template instance
-               $templateInstance = ObjectFactory::createObjectByConfiguredName('object_registry_template_class', array($appInstance));
+               $templateInstance = ObjectFactory::createObjectByConfiguredName('object_registry_template_class', array($applicationInstance));
 
                // Disable language support
                $templateInstance->enableLanguageSupport(false);
index febfdb81eb8a2c20b922dfb78d9587eb7b4c1f11..ca9549023a201a06a0d6264e11558f99514c2d78 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * A ??? task
+ * A ??? task for crunchers
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
@@ -21,7 +21,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
-class ???Task extends BaseTask implements Taskable, Visitable {
+class Cruncher???Task extends BaseTask implements Taskable, Visitable {
        /**
         * Protected constructor
         *
@@ -37,9 +37,9 @@ class ???Task extends BaseTask implements Taskable, Visitable {
         *
         * @return      $taskInstance   An instance of a Visitable class
         */
-       public final static function create???Task () {
+       public final static function createCruncher???Task () {
                // Get new instance
-               $taskInstance = new ???Task();
+               $taskInstance = new Cruncher???Task();
 
                // Return the prepared instance
                return $taskInstance;
@@ -50,7 +50,7 @@ class ???Task extends BaseTask implements Taskable, Visitable {
         *
         * @param       $visitorInstance        An instance of a Visitor class
         * @return      void
-        * @todo        0%
+        * @todo        Maybe visit some sub-objects
         */
        public function accept (Visitor $visitorInstance) {
                // Visit this task
@@ -61,8 +61,9 @@ class ???Task extends BaseTask implements Taskable, Visitable {
         * Executes the task
         *
         * @return      void
+        * @todo        0%
         */
-       public function execute () {
+       public function executeTask () {
                $this->partialStub('Unimplemented task.');
        }
 }
diff --git a/application/hub/main/tasks/cruncher/.htaccess b/application/hub/main/tasks/cruncher/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/tasks/cruncher/class_ b/application/hub/main/tasks/cruncher/class_
new file mode 100644 (file)
index 0000000..ca95490
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+/**
+ * A ??? task for crunchers
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+class Cruncher???Task extends BaseTask implements Taskable, Visitable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $taskInstance   An instance of a Visitable class
+        */
+       public final static function createCruncher???Task () {
+               // Get new instance
+               $taskInstance = new Cruncher???Task();
+
+               // Return the prepared instance
+               return $taskInstance;
+       }
+
+       /**
+        * Accepts the visitor to process the visit "request"
+        *
+        * @param       $visitorInstance        An instance of a Visitor class
+        * @return      void
+        * @todo        Maybe visit some sub-objects
+        */
+       public function accept (Visitor $visitorInstance) {
+               // Visit this task
+               $visitorInstance->visitTask($this);
+       }
+
+       /**
+        * Executes the task
+        *
+        * @return      void
+        * @todo        0%
+        */
+       public function executeTask () {
+               $this->partialStub('Unimplemented task.');
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php b/application/hub/main/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php
new file mode 100644 (file)
index 0000000..6b1181b
--- /dev/null
@@ -0,0 +1,80 @@
+<?php
+/**
+ * A WorkUnitFetcher task for crunchers
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+class CruncherWorkUnitFetcherTask extends BaseTask implements Taskable, Visitable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $taskInstance   An instance of a Visitable class
+        */
+       public final static function createCruncherWorkUnitFetcherTask () {
+               // Get new instance
+               $taskInstance = new CruncherWorkUnitFetcherTask();
+
+               // Return the prepared instance
+               return $taskInstance;
+       }
+
+       /**
+        * Accepts the visitor to process the visit "request"
+        *
+        * @param       $visitorInstance        An instance of a Visitor class
+        * @return      void
+        * @todo        Maybe visit some sub-objects
+        */
+       public function accept (Visitor $visitorInstance) {
+               // Visit this task
+               $visitorInstance->visitTask($this);
+       }
+
+       /**
+        * Executes the task
+        *
+        * @return      void
+        */
+       public function executeTask () {
+               /*
+                * Get the cruncher instance and call a method which should check if
+                * the in-buffer is going to depleted. If so, new WUs are fetched from
+                * network or (if enabled in config) a random test WU is being
+                * generated. This test WU is for developing only or, if you like, to
+                * test your cruncher loop.
+                *
+                * Please report any bugs you encounter to me.
+                */
+               Registry::getRegistry()->getInstance('cruncher')->doFetchWorkUnits();
+       }
+}
+
+// [EOF]
+?>
index 1a6143fe460ae6e943b3c5cf7caacffe5c361554..ccfdb498d75731ceea61ec51d02acb86213bcd48 100644 (file)
@@ -69,8 +69,8 @@ class AnnouncementTemplateEngine extends BaseTemplateEngine implements Compileab
        /**
         * Creates an instance of the class TemplateEngine and prepares it for usage
         *
-        * @param       $appInstance    A manageable application
-        * @return      $templateInstance       An instance of TemplateEngine
+        * @param       $applicationInstance    A manageable application
+        * @return      $templateInstance               An instance of TemplateEngine
         * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
         * @throws      InvalidBasePathStringException  If $templateBasePath is no string
         * @throws      BasePathIsNoDirectoryException  If $templateBasePath is no
@@ -78,16 +78,12 @@ class AnnouncementTemplateEngine extends BaseTemplateEngine implements Compileab
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       public static final function createAnnouncementTemplateEngine (ManageableApplication $appInstance) {
+       public static final function createAnnouncementTemplateEngine (ManageableApplication $applicationInstance) {
                // Get a new instance
                $templateInstance = new AnnouncementTemplateEngine();
 
-               // Get language and file I/O instances from application
-               $langInstance = $appInstance->getLanguageInstance();
-               $ioInstance = $appInstance->getFileIoInstance();
-
                // Determine base path
-               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
+               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
@@ -107,10 +103,6 @@ class AnnouncementTemplateEngine extends BaseTemplateEngine implements Compileab
                // Set the base path
                $templateInstance->setTemplateBasePath($templateBasePath);
 
-               // Set the language and IO instances
-               $templateInstance->setLanguageInstance($langInstance);
-               $templateInstance->setFileIoInstance($ioInstance);
-
                // Set template extensions
                $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension'));
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('announcement_template_extension'));
index ca60f142e28e3c6072171cb48d52d6f122b94017..5d33ef7fc74ae2e733d2f61b3f99581e0f9c75f9 100644 (file)
@@ -62,8 +62,8 @@ class SelfConnectTemplateEngine extends BaseTemplateEngine implements Compileabl
        /**
         * Creates an instance of the class TemplateEngine and prepares it for usage
         *
-        * @param       $appInstance    A manageable application
-        * @return      $templateInstance       An instance of TemplateEngine
+        * @param       $applicationInstance    A manageable application
+        * @return      $templateInstance               An instance of TemplateEngine
         * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
         * @throws      InvalidBasePathStringException  If $templateBasePath is no string
         * @throws      BasePathIsNoDirectoryException  If $templateBasePath is no
@@ -71,16 +71,12 @@ class SelfConnectTemplateEngine extends BaseTemplateEngine implements Compileabl
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       public static final function createSelfConnectTemplateEngine (ManageableApplication $appInstance) {
+       public static final function createSelfConnectTemplateEngine (ManageableApplication $applicationInstance) {
                // Get a new instance
                $templateInstance = new SelfConnectTemplateEngine();
 
-               // Get language and file I/O instances from application
-               $langInstance = $appInstance->getLanguageInstance();
-               $ioInstance = $appInstance->getFileIoInstance();
-
                // Determine base path
-               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
+               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
@@ -100,10 +96,6 @@ class SelfConnectTemplateEngine extends BaseTemplateEngine implements Compileabl
                // Set the base path
                $templateInstance->setTemplateBasePath($templateBasePath);
 
-               // Set the language and IO instances
-               $templateInstance->setLanguageInstance($langInstance);
-               $templateInstance->setFileIoInstance($ioInstance);
-
                // Set template extensions
                $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension'));
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('self_connect_template_extension'));
index bd8a99c431e12120de15a240cbc2c31cb0045c28..39f6be92e751086b6fd67af1059d384760a8b5ee 100644 (file)
@@ -74,8 +74,8 @@ class ObjectRegistryTemplateEngine extends BaseTemplateEngine implements Compile
        /**
         * Creates an instance of the class TemplateEngine and prepares it for usage
         *
-        * @param       $appInstance    A manageable application
-        * @return      $templateInstance       An instance of TemplateEngine
+        * @param       $applicationInstance    A manageable application
+        * @return      $templateInstance               An instance of TemplateEngine
         * @throws      BasePathIsEmptyException                If the provided $templateBasePath is empty
         * @throws      InvalidBasePathStringException  If $templateBasePath is no string
         * @throws      BasePathIsNoDirectoryException  If $templateBasePath is no
@@ -83,16 +83,12 @@ class ObjectRegistryTemplateEngine extends BaseTemplateEngine implements Compile
         * @throws      BasePathReadProtectedException  If $templateBasePath is
         *                                                                                      read-protected
         */
-       public static final function createObjectRegistryTemplateEngine (ManageableApplication $appInstance) {
+       public static final function createObjectRegistryTemplateEngine (ManageableApplication $applicationInstance) {
                // Get a new instance
                $templateInstance = new ObjectRegistryTemplateEngine();
 
-               // Get language and file I/O instances from application
-               $langInstance = $appInstance->getLanguageInstance();
-               $ioInstance = $appInstance->getFileIoInstance();
-
                // Determine base path
-               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
+               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
@@ -112,10 +108,6 @@ class ObjectRegistryTemplateEngine extends BaseTemplateEngine implements Compile
                // Set the base path
                $templateInstance->setTemplateBasePath($templateBasePath);
 
-               // Set the language and IO instances
-               $templateInstance->setLanguageInstance($langInstance);
-               $templateInstance->setFileIoInstance($ioInstance);
-
                // Set template extensions
                $templateInstance->setRawTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('raw_template_extension'));
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('object_registry_template_extension'));
index ecdfbd6e55d2c69367ad5c4661fc6772605bc892..3b0fc8c743934150bf9ba3d6982951d51b2007d5 100644 (file)
@@ -2,18 +2,21 @@
 ### DO NOT EDIT THIS FILE. ###
 ./application/hub/interfaces/cruncher/class_CruncherHelper.php:10: * @todo             We need to find a better name for this interface
 ./application/hub/interfaces/nodes/class_NodeHelper.php:10: * @todo            We need to find a better name for this interface
+./application/hub/main/commands/console/class_HubConsoleCruncherCommand.php:104:        * @todo        Should we add some more filters?
 ./application/hub/main/commands/console/class_HubConsoleCruncherCommand.php:58:         * @todo        Try to create a CruncherActivationTask or so
-./application/hub/main/commands/console/class_HubConsoleCruncherCommand.php:97:         * @todo        Should we add some more filters?
-./application/hub/main/commands/console/class_HubConsoleMainCommand.php:108:    * @todo        Should we add some more filters?
+./application/hub/main/commands/console/class_HubConsoleMainCommand.php:114:    * @todo        Should we add some more filters?
 ./application/hub/main/commands/console/class_HubConsoleMainCommand.php:58:     * @todo        Try to create a HubActivationTask or so
 ./application/hub/main/connectors/query/local/class_LocalQueryConnector.php:10: * @todo                Find an interface for: handleAllQueries()
 ./application/hub/main/connectors/query/local/class_LocalQueryConnector.php:78:         * @TODO        0% done: Unfinished work here
 ./application/hub/main/connectors/queues/local/class_LocalQueueConnector.php:58:        * @TODO        0% done: Unfinished work here
-./application/hub/main/cruncher/class_BaseHubCruncher.php:43:   * @todo        Try to make this method more generic so we can move it in BaseFrameworkSystem
-./application/hub/main/cruncher/test/class_HubTestCruncher.php:58:      * @todo        Implement this method
+./application/hub/main/cruncher/class_BaseHubCruncher.php:131:  * @todo        Try to make this method more generic so we can move it in BaseFrameworkSystem
+./application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php:112:         * @todo        0% done
+./application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php:61:  * @todo        Implement this method
 ./application/hub/main/discovery/socket/class_PackageSocketDiscovery.php:102:                  // @TODO We may need some locking here
 ./application/hub/main/factories/socket/class_SocketFactory.php:10: * @todo            Find an interface for hub helper
-./application/hub/main/filter/activation/class_HubActivationSelfAnnouncementFilter.php:54:      * @todo        0% done
+./application/hub/main/filter/activation/node/class_NodeActivationSelfAnnouncementFilter.php:54:        * @todo        0% done
+./application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapBufferQueueInitializerFilter.php:54:    * @todo        0% done
+./application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php:54:         * @todo        Maybe we want to do somthing more here?
 ./application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php:54:       * @todo        0% done
 ./application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php:87:                      // @TODO Can we rewrite this to app_die() ?
 ./application/hub/main/filter/cruncher/class_CruncherPhpRequirementsFilter.php:55:      * @todo        Add more test and try to add an extra message to the thrown exception
 ./application/hub/main/filter/node/class_NodeInitializationFilter.php:87:                      // @TODO Can we rewrite this to app_die() ?
 ./application/hub/main/filter/node/class_NodePhpRequirementsFilter.php:55:      * @todo        Add more test and try to add an extra message to the thrown exception
 ./application/hub/main/filter/node/class_NodeWelcomeTeaserFilter.php:55:        * @todo        Handle over the $responseInstance to outputConsoleTeaser()
-./application/hub/main/filter/shutdown/class_HubShutdownDeinitQueuesFilter.php:55:      * @todo        0% done
-./application/hub/main/filter/shutdown/class_HubShutdownFlushNodeListFilter.php:55:     * @todo        0% done
-./application/hub/main/filter/shutdown/class_HubShutdownTaskHandlerFilter.php:55:       * @todo        0% done
-./application/hub/main/filter/task/class_CruncherTaskHandlerInitializerFilter.php:55:   * @todo        0% done
-./application/hub/main/filter/task/class_HubTaskHandlerInitializerFilter.php:55:        * @todo        0% done
+./application/hub/main/filter/shutdown/node/class_NodeShutdownDeinitQueuesFilter.php:55:        * @todo        0% done
+./application/hub/main/filter/shutdown/node/class_NodeShutdownFlushNodeListFilter.php:55:       * @todo        0% done
+./application/hub/main/filter/shutdown/node/class_NodeShutdownTaskHandlerFilter.php:55:         * @todo        0% done
+./application/hub/main/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php:55:  * @todo        5% done
+./application/hub/main/filter/task/node/class_NodeTaskHandlerInitializerFilter.php:55:  * @todo        0% done
 ./application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php:96:       * @todo        ~10% done
 ./application/hub/main/handler/network/udp/class_UdpNetworkPackageHandler.php:58:       * @todo        0%
-./application/hub/main/handler/tasks/class_TaskHandler.php:136:                // @TODO Messurement can be added around this call
+./application/hub/main/handler/tasks/class_TaskHandler.php:140:                // @TODO Messurement can be added around this call
 ./application/hub/main/helper/connection/tcp/class_TcpConnectionHelper.php:10: * @todo         Find an interface for hub helper
 ./application/hub/main/helper/connection/tcp/class_TcpConnectionHelper.php:139:         * @todo        We may want to implement a filter for ease notification of other objects like our pool
 ./application/hub/main/helper/connection/udp/class_UdpConnectionHelper.php:10: * @todo         Find an interface for hub helper
 ./application/hub/main/pools/peer/class_DefaultPeerPool.php:148:                       // @TODO Check for IP
 ./application/hub/main/resolver/state/network/class_NetworkStateResolver.php:68:        * @todo        ~30% done
 ./application/hub/main/resolver/state/network/class_NetworkStateResolver.php:80:                       // @TODO On some systems it is 134, on some 107?
+./application/hub/main/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php:53:         * @todo        Maybe visit some sub-objects
 ./application/hub/main/tasks/hub/announcement/class_HubSelfAnnouncementTask.php:53:     * @todo        0%
 ./application/hub/main/tasks/hub/class_HubSelfConnectTask.php:53:       * @todo        0%
 ./application/hub/main/tasks/hub/ping/class_HubPingTask.php:63:         * @todo        0%
 ./application/hub/main/tasks/hub/update/class_HubUpdateCheckTask.php:53:        * @todo        0%
 ./application/hub/main/template/announcement/class_AnnouncementTemplateEngine.php:10: * @todo          This template engine does not make use of setTemplateType()
-./application/hub/main/template/announcement/class_AnnouncementTemplateEngine.php:253:  * @todo        Find something useful with this!
+./application/hub/main/template/announcement/class_AnnouncementTemplateEngine.php:245:  * @todo        Find something useful with this!
 ./application/hub/main/template/connect/class_SelfConnectTemplateEngine.php:10: * @todo                This template engine does not make use of setTemplateType()
-./application/hub/main/template/connect/class_SelfConnectTemplateEngine.php:246:        * @todo        Find something useful with this!
+./application/hub/main/template/connect/class_SelfConnectTemplateEngine.php:238:        * @todo        Find something useful with this!
 ./application/hub/main/template/objects/class_ObjectRegistryTemplateEngine.php:10: * @todo             This template engine does not make use of setTemplateType()
-./application/hub/main/template/objects/class_ObjectRegistryTemplateEngine.php:257:     * @todo        Find something useful with this!
+./application/hub/main/template/objects/class_ObjectRegistryTemplateEngine.php:249:     * @todo        Find something useful with this!
 ./application/hub/main/tools/class_HubTools.php:128:                           // @TODO We may want to encapsulate this PHP call into an own class
 ./application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php:105:   * @todo        Does a query needs to perform some actions as an active task?
 ./application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php:116:   * @todo        Does a queue needs to perform some actions as an active task?
 ./inc/classes/exceptions/main/class_MissingMethodException.php:13: * @todo             Try to rewrite user/guest login classes and mark this exception as deprecated
 ./inc/classes/exceptions/main/class_NoConfigEntryException.php:10: * @todo             Rename this class to NoFoundEntryException
 ./inc/classes/interfaces/class_FrameworkInterface.php:11: * @todo              Find a better name for this interface
-./inc/classes/main/class_BaseFrameworkSystem.php:1142:  * @todo        Write a logging mechanism for productive mode
-./inc/classes/main/class_BaseFrameworkSystem.php:1156:                 // @TODO Finish this part!
+./inc/classes/main/class_BaseFrameworkSystem.php:1133:  * @todo        Write a logging mechanism for productive mode
+./inc/classes/main/class_BaseFrameworkSystem.php:1147:                 // @TODO Finish this part!
 ./inc/classes/main/class_BaseFrameworkSystem.php:154:  // @todo Try to clean these constants up
-./inc/classes/main/class_BaseFrameworkSystem.php:235:   * @todo        This is old code. Do we still need this old lost code?
-./inc/classes/main/class_BaseFrameworkSystem.php:303:   * @todo        SearchableResult and UpdateableResult shall have a super interface to use here
+./inc/classes/main/class_BaseFrameworkSystem.php:233:   * @todo        This is old code. Do we still need this old lost code?
+./inc/classes/main/class_BaseFrameworkSystem.php:301:   * @todo        SearchableResult and UpdateableResult shall have a super interface to use here
 ./inc/classes/main/commands/web/class_WebLoginAreaCommand.php:64:       * @todo        Add some stuff here: Some personal data, app/game related data
 ./inc/classes/main/commands/web/class_WebProblemCommand.php:58:         * @todo        0% done
 ./inc/classes/main/commands/web/class_WebStatusCommand.php:58:  * @todo        0% done
 ./inc/classes/main/controller/web/class_WebStatusController.php:10: * @todo            This controller shall still provide some headlines for sidebars
 ./inc/classes/main/criteria/search/class_SearchCriteria.php:114:        * @todo        Find a nice casting here. (int) allows until and including 32766.
 ./inc/classes/main/criteria/search/class_SearchCriteria.php:94:         * @todo        Find a nice casting here. (int) allows until and including 32766.
-./inc/classes/main/database/databases/class_LocalFileDatabase.php:363:  * @todo        Do some checks on the database directory and files here
+./inc/classes/main/database/databases/class_LocalFileDatabase.php:360:  * @todo        Do some checks on the database directory and files here
 ./inc/classes/main/decorator/template/class_XmlRewriterTemplateDecorator.php:426:       * @todo        Find something useful with this!
 ./inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php:82:        * @todo        0% done
 ./inc/classes/main/filter/change/class_EmailChangeFilter.php:54:        * @todo        Implement email change of the user here. HINT: Use the User class!
 ./inc/classes/main/result/class_DatabaseResult.php:379:4        * @todo        Find a caching way without modifying the result array
 ./inc/classes/main/rng/class_RandomNumberGenerator.php:150:     * @todo        I had a better random number generator here but now it is somewhere lost :(
 ./inc/classes/main/rng/class_RandomNumberGenerator.php:83:      * @todo        Add site key for stronger salt!
-./inc/classes/main/template/class_BaseTemplateEngine.php:1049:                 // @TODO This silent abort should be logged, maybe.
-./inc/classes/main/template/class_BaseTemplateEngine.php:1057:                 // @TODO Old behaviour, will become obsolete!
-./inc/classes/main/template/class_BaseTemplateEngine.php:1060:                 // @TODO Yet another old way
-./inc/classes/main/template/class_BaseTemplateEngine.php:1126:                 // @TODO This silent abort should be logged, maybe.
-./inc/classes/main/template/class_BaseTemplateEngine.php:1147:  * @todo        Make this code some nicer...
-./inc/classes/main/template/class_BaseTemplateEngine.php:955:   * @todo        Unfinished work or don't die here.
-./inc/classes/main/template/class_BaseTemplateEngine.php:972:                          // @TODO Non-string found so we need some deeper analysis...
+./inc/classes/main/template/class_BaseTemplateEngine.php:1055:                 // @TODO This silent abort should be logged, maybe.
+./inc/classes/main/template/class_BaseTemplateEngine.php:1063:                 // @TODO Old behaviour, will become obsolete!
+./inc/classes/main/template/class_BaseTemplateEngine.php:1066:                 // @TODO Yet another old way
+./inc/classes/main/template/class_BaseTemplateEngine.php:1132:                 // @TODO This silent abort should be logged, maybe.
+./inc/classes/main/template/class_BaseTemplateEngine.php:1153:  * @todo        Make this code some nicer...
+./inc/classes/main/template/class_BaseTemplateEngine.php:961:   * @todo        Unfinished work or don't die here.
+./inc/classes/main/template/class_BaseTemplateEngine.php:978:                          // @TODO Non-string found so we need some deeper analysis...
 ./inc/classes/main/template/console/class_ConsoleTemplateEngine.php:10: * @todo                This template engine does not make use of setTemplateType()
-./inc/classes/main/template/image/class_ImageTemplateEngine.php:221:    * @todo        Find something usefull with this!
-./inc/classes/main/template/image/class_ImageTemplateEngine.php:241:    * @todo        Add cache creation here
+./inc/classes/main/template/image/class_ImageTemplateEngine.php:213:    * @todo        Find something usefull with this!
+./inc/classes/main/template/image/class_ImageTemplateEngine.php:233:    * @todo        Add cache creation here
 ./inc/classes/main/template/mail/class_MailTemplateEngine.php:10: * @todo              This template engine does not make use of setTemplateType()
-./inc/classes/main/template/mail/class_MailTemplateEngine.php:234:      * @todo        Add cache creation here
-./inc/classes/main/template/mail/class_MailTemplateEngine.php:244:      * @todo        Should we call back the mailer class here?
-./inc/classes/main/template/mail/class_MailTemplateEngine.php:325:      * @todo        0% done
-./inc/classes/main/template/menu/class_MenuTemplateEngine.php:273:      * @todo        Find something useful with this!
-./inc/classes/main/template/menu/class_MenuTemplateEngine.php:319:      * @todo        Add cache creation here
+./inc/classes/main/template/mail/class_MailTemplateEngine.php:226:      * @todo        Add cache creation here
+./inc/classes/main/template/mail/class_MailTemplateEngine.php:236:      * @todo        Should we call back the mailer class here?
+./inc/classes/main/template/mail/class_MailTemplateEngine.php:317:      * @todo        0% done
+./inc/classes/main/template/menu/class_MenuTemplateEngine.php:265:      * @todo        Find something useful with this!
+./inc/classes/main/template/menu/class_MenuTemplateEngine.php:311:      * @todo        Add cache creation here
 ./inc/classes/main/user/class_BaseUser.php:308:         * @todo        Try to make this method more generic so we can move it in BaseFrameworkSystem
 ./inc/classes/main/user/class_BaseUser.php:80:  * @todo        Find a way of casting here. "(int)" might destroy the user id > 32766
 ./inc/classes/main/user/member/class_Member.php:84:     * @todo        Add more ways over creating user classes
 ./inc/config/class_FrameworkConfiguration.php:172:      * @todo        We have to add some more entries from $_SERVER here
 ./inc/database.php:11: * @todo         We should minimize these includes
 ./inc/database.php:51:// @TODO Rewrite this
-./inc/file_io.php:13: * @todo          We should minimize these includes
 ./inc/hooks.php:11: * @todo            We should minimize these includes
 ./inc/hooks.php:28:// @TODO This makes the core depending on the SPL. But it should be installed anyway.
 ./inc/includes.php:11: * @todo         We should minimize these includes
 ./inc/includes.php:38:// @TODO Find a nicer OOP-ed way for this
-./inc/language.php:10: * @todo         We should minimize these includes
-./inc/language.php:33:// @TODO Rewrite this
-./inc/loader/class_ClassLoader.php:262:                        /* @todo: Do not die here. */
+./inc/loader/class_ClassLoader.php:264:                        /* @todo: Do not die here. */
 ./inc/output.php:11: * @todo           We should minimize these includes
 ./inc/selector.php:11: * @todo         We should minimize these includes
 ./index.php:59:         * @todo        This method is old code and needs heavy rewrite
 ### ### DEPRECATION FOLLOWS: ### ###
+./application/hub/main/filter/activation/class_HubActivationSelfAnnouncementFilter.php:2:// @DEPRECATED
 ./application/hub/main/filter/bootstrap/class_HubBootstrapAquireHubIdFilter.php:2:// @DEPRECATED
+./application/hub/main/filter/bootstrap/class_HubBootstrapExtraBootstrappingFilter.php:2:// @DEPRECATED
+./application/hub/main/filter/bootstrap/class_HubBootstrapGenerateHubIdFilter.php:2:// @DEPRECATED
+./application/hub/main/filter/bootstrap/class_HubBootstrapGenerateSessionIdFilter.php:2:// @DEPRECATED
 ./application/hub/main/filter/bootstrap/class_HubBootstrapGenSessionIdFilter.php:2:// @DEPRECATED
+./application/hub/main/filter/bootstrap/class_HubBootstrapInitQueuesFilter.php:2:// @DEPRECATED
+./application/hub/main/filter/bootstrap/class_HubBootstrapListenerPoolFilter.php:2:// @DEPRECATED
+./application/hub/main/filter/bootstrap/class_HubBootstrapRestoreNodeListFilter.php:2:// @DEPRECATED
 ./application/hub/main/filter/console/class_ConsoleWelcomeTeaserFilter.php:2:// @DEPRECATED
+./application/hub/main/filter/shutdown/class_HubShutdownCruncherFilter.php:2:// @DEPRECATED
+./application/hub/main/filter/shutdown/class_HubShutdownDeinitQueuesFilter.php:2:// @DEPRECATED
+./application/hub/main/filter/shutdown/class_HubShutdownFlushNodeListFilter.php:2:// @DEPRECATED
 ./application/hub/main/filter/shutdown/class_HubShutdownListenerPoolFilter.php:2:// @DEPRECATED
+./application/hub/main/filter/shutdown/class_HubShutdownNodeFilter.php:2:// @DEPRECATED
+./application/hub/main/filter/shutdown/class_HubShutdownTaskHandlerFilter.php:2:// @DEPRECATED
+./application/hub/main/filter/task/class_CruncherTaskHandlerInitializerFilter.php:2:// @DEPRECATED
+./application/hub/main/filter/task/class_HubTaskHandlerInitializerFilter.php:2:// @DEPRECATED
 ./application/hub/main/filter/task/class_TaskHandlerInitializerFilter.php:2:// @DEPRECATED
 ./application/hub/main/nodes/class_BaseHubNode.php:50:  * @deprecated
 ./inc/classes/exceptions/io/class_FileNotFoundException.php:2:// @DEPRECATED
 ./inc/classes/exceptions/io/class_FilePointerNotOpenedException.php:2:// @DEPRECATED
 ./inc/classes/exceptions/io/class_InvalidDirectoryResourceException.php:2:// @DEPRECATED
+./inc/classes/exceptions/language/class_MissingFileIoHandlerException.php:2:// @DEPRECATED
+./inc/classes/exceptions/language/class_MissingLanguageHandlerException.php:2:// @DEPRECATED
 ./inc/classes/exceptions/main/class_ClassNotFoundException.php:2:// @DEPRECATED
 ./inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php:2:// @DEPRECATED
 ./inc/classes.php:9: * @deprecated
 ./inc/database.php:10: * @deprecated
-./inc/file_io.php:12: * @deprecated
+./inc/file_io.php:2:// @DEPRECATED
 ./inc/hooks.php:10: * @deprecated
 ./inc/includes.php:10: * @deprecated
-./inc/language.php:9: * @deprecated
+./inc/language.php:2:// @DEPRECATED
 ./inc/output.php:10: * @deprecated
 ./inc/selector.php:10: * @deprecated
index 0c60a2272d5c652381968126154575beac8ae644..55bc413e52b985abad3a6e5e7b44cde95916d2a8 100644 (file)
--- a/index.php
+++ b/index.php
@@ -121,15 +121,15 @@ final class ApplicationEntryPoint {
                        } // END - foreach
 
                        // Init application instance
-                       $appInstance = null;
+                       $applicationInstance = null;
 
                        // Is the class there?
                        if (class_exists('ApplicationHelper')) {
                                // Get application instance
-                               $appInstance = ApplicationHelper::getInstance();
+                               $applicationInstance = ApplicationHelper::getInstance();
 
                                // Assign application data
-                               $templateInstance->assignApplicationData($appInstance);
+                               $templateInstance->assignApplicationData($applicationInstance);
                        } // END - if
 
                        // We only try this