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
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
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
// 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
// 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');
// 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');
// 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);
// 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);
// 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);
// 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');
// 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]
?>
);
// 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]
?>
// 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');
*/
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.
/**
* 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]
* @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
// 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.');
// 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
// 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'));
}
}
// 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.');
// 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
// 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();
$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
$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'));
}
}
*/
private $version = 'x.x';
+ /**
+ * By default no cruncher is active
+ */
+ private $isActive = false;
+
+ /**
+ * All buffer queue instances (a FIFO)
+ */
+ private $bufferInstance = null;
+
/**
* Protected constructor
*
$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
*
/**
* 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.
// 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');
/**
* 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.');
}
}
+++ /dev/null
-Deny from all
+++ /dev/null
-<?php
-// @DEPRECATED
-?>
+++ /dev/null
-<?php
-// @DEPRECATED
-?>
<?php
/**
- * A ??? filter for bootstrapping
+ * A ??? filter for bootstrapping crunchers
*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
--- /dev/null
+<?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]
+?>
<?php
/**
- * A ExtraBootstrapping filter for bootstrapping
+ * A ExtraBootstrapping filter for bootstrapping crunchers
*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
--- /dev/null
+<?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]
+?>
$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() ?
$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() ?
* @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
// 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);
}
// 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());
// 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;
}
$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);
$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);
* @param $connectionInstance A helper instance for connections
* @return void
*/
- public function fragmentPackageArray (array $packageData, BaseconnectionInstance $connectionInstance) {
+ public function fragmentPackageArray (array $packageData, BaseConnectionHelper $connectionInstance) {
}
/**
* 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();
}
// Set the application instance
- $resolverInstance->setApplicationInstance($appInstance);
+ $resolverInstance->setApplicationInstance($applicationInstance);
// Return the prepared instance
return $resolverInstance;
* 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();
}
// Set the application instance
- $resolverInstance->setApplicationInstance($appInstance);
+ $resolverInstance->setApplicationInstance($applicationInstance);
// Set command name
$resolverInstance->setControllerName($controllerName);
$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);
<?php
/**
- * A ??? task
+ * A ??? task for crunchers
*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
* 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
*
*
* @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;
*
* @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
* Executes the task
*
* @return void
+ * @todo 0%
*/
- public function execute () {
+ public function executeTask () {
$this->partialStub('Unimplemented task.');
}
}
--- /dev/null
+Deny from all
--- /dev/null
+<?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]
+?>
--- /dev/null
+<?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]
+?>
/**
* 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
* @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)) {
// 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'));
/**
* 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
* @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)) {
// 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'));
/**
* 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
* @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)) {
// 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'));
### 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
} // 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