// $Id$

//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2010 DOCOMO Communications Laboratories USA, Inc.
//
// DOCOMO Communication Laboratories USA, Inc. (DOCOMO USA Labs) licenses
// the GNU General Public License version 2 (GPL2) for the software
// disclosed herein. For terms and conditions under the GPL2, please
// refer to www.gnu.org.
//
// Date of Preparation: 11/09/2010
//
// IT Manager: Yas Naoi, DOCOMO USA Labs
// Contact   : naoi at docomolabs-usa.com
//
// DOCOMO USA Labs is under no obligation to maintain or support this
// software, and DOCOMO USA Labs is not responsible for any damage or
// loss experienced from using the software.
//
// Please contact the IT Manager at DOCOMO USA Labs for all issues
// related to the software.
//
//////////////////////////////////////////////////////////////////////////


How to use Resource Allocator
=============================

  1) Go to Site configuration | Resource Allocator
  2) Select Algorithm for instance allocation onto specific host or datacenter
     The default algorithm is 'Round Robin Algo'


How to implement an algorithm for instance allocation
=====================================================

  1) Resource Allocator calls a
  
  hook_get_deploy_info($params)
  
  function for a selected instance allocation algorithm in
  
  Site configuration | Resource Allocator

  There are four functions to implement as shown below:

  *.install file:

  function hook_enable() {
    drupal_load('module', 'resource_allocator');
    resource_allocator_notify('enable' , 'your_module_prefix');
  }

  function round_robin_algo_disable() {
    resource_allocator_notify('disable', 'your_module_prefix');
  } 

  *.module file:

  hook_algo_set_algo_info()
  hook_algo_get_deploy_info($params)  

  See also comments in round_robin_algo.* files (indicated "TODO: Must Implement") 


DIRECTORY STRUCTURE
===================

cloud
  +-resource_manager       ( depends on cloud modules )(Cloud is a core module)
    +-allocation_algo      ( depends on resource_manager module )
    +-round_robin_algo          ( depends on resource_manager module )
    +-example_algo         ( depends on resource_manager module )
    +-...


CHANGE HISTORY
==============
2010/11/09 ver.0.7 released to reviewing process of drupal.org