From e6399db215a81ee0e9651aee2f25c41e725489ed Mon Sep 17 00:00:00 2001 From: Ossama Othman Date: Thu, 13 Jun 2002 17:52:09 +0000 Subject: ChangeLogTag:Thu Jun 13 10:50:37 2002 Ossama Othman --- TAO/ChangeLogs/ChangeLog-02a | 7 ++ TAO/orbsvcs/orbsvcs/CosLoadBalancing.idl | 156 +++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+) create mode 100644 TAO/orbsvcs/orbsvcs/CosLoadBalancing.idl diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 1a58ada55de..211f9ab08b6 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,10 @@ +Thu Jun 13 10:50:37 2002 Ossama Othman + + * orbsvcs/orbsvcs/CosLoadBalancing.idl: + + IDL for the new proposed OMG load balancing submission. TAO's + new load balancer implements this IDL. + Wed Jun 12 13:24:11 2002 Carlos O'Ryan * tao/IIOP_Acceptor.cpp: diff --git a/TAO/orbsvcs/orbsvcs/CosLoadBalancing.idl b/TAO/orbsvcs/orbsvcs/CosLoadBalancing.idl new file mode 100644 index 00000000000..030eee89443 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/CosLoadBalancing.idl @@ -0,0 +1,156 @@ +// -*- IDL -*- + +//============================================================================= +/** + * @file CosLoadBalancing.idl + * + * $Id$ + * + * @author Object Management Group + */ +//============================================================================= + + +#ifndef COSLOADBALANCING_IDL +#define COSLOADBALANCING_IDL + +//#include "tao/PortableInterceptor.pidl" +#include "PortableGroup.idl" +#include "orb.idl" + +#pragma prefix "omg.org" + +/** + * @class CosLoadBalancing + * + * @brief This module defines the interfaces and data types used in + * TAO's Load Balancing service. + * @par + * TAO's Load Balancer manages distribution of requests to replicas of + * a given Object in an effort to ensure that the applications/hosts + * pointed to by the Object reference are as equally loaded as + * possible, i.e. load balanced. + * @par + * The definition of 'load' is application specific, for example, some + * applications may choose to load balance access to multiple + * dedicated lines, or separate network interfaces, as well as more + * traditional load balancing metrics, such as CPU or power load. + */ +module CosLoadBalancing +{ + typedef PortableGroup::Location Location; + typedef PortableGroup::Properties Properties; + + /// Types used for obtaining and/or reporting loads + typedef unsigned long LoadId; + struct Load { + LoadId identifier; + float value; + }; + typedef sequence LoadList; + +// typedef unsigned short MonitoringStyle; +// const MonitoringStyle PULL = 0; +// const MonitoringStyle PUSH = 1; +// // const MonitoringStyle NOT_MONITORED = 2; + +// typedef unsigned short MonitoringGranularity; +// const MonitoringGranularity MEMB = 0; +// const MonitoringGranularity LOC = 1; +// const MonitoringGranularity LOC_AND_TYPE = 2; + +// typedef unsigned short ClientBinding; +// const ClientBinding PER_SESSION = 0; +// const ClientBinding PER_REQUEST = 1; +// const ClientBinding ON_DEMAND = 2; + +// typedef unsigned short BalancingPolicy; +// const BalancingPolicy NON_ADAPTIVE = 0; +// const BalancingPolicy ADAPTIVE = 1; + + exception MonitorAlreadyPresent {}; + exception LocationNotFound {}; + + exception StrategyNotAdaptive {}; + + interface LoadManager; + + interface Strategy + { + readonly attribute string name; + + Properties get_properties (); + + void push_loads (in PortableGroup::Location the_location, + in LoadList loads) + raises (LocationNotFound, + StrategyNotAdaptive); + + Object next_member (in PortableGroup::ObjectGroup object_group, + in LoadManager load_manager) + raises (PortableGroup::ObjectGroupNotFound, + PortableGroup::MemberNotFound); + }; + + interface Alertable + { + // Forward requests back to the load manager. + void alert (in Object load_manager); + + // Stop forwarding requests, and begin accepting them again. + void disable_alert (); + }; + + // Interface that all load monitors must implement. + interface LoadMonitor + { + // Retrieve the location at which the LoadMonitor resides. + readonly attribute Location the_location; + + // Retrieve the current load at the location LoadMonitor resides. + readonly attribute LoadList loads; + }; + + // Specification of LoadManager Interface + interface LoadManager + : PortableGroup::PropertyManager, + PortableGroup::ObjectGroupManager, + PortableGroup::GenericFactory + { +// void register_load_notifier (in LoadNotifier load_notifier); + +// LoadNotifier get_load_notifier () +// raises (PortableGroup::InterfaceNotFound); + + // For the PUSH load monitoring style. + void push_loads (in PortableGroup::Location the_location, + in LoadList loads) + raises (LocationNotFound, + StrategyNotAdaptive); + + // The following load monitor methods are only used for the PULL + // load monitoring style. + void register_load_monitor (in LoadMonitor load_monitor, + in PortableGroup::Location the_location) + raises (MonitorAlreadyPresent); + + LoadMonitor get_load_monitor (in PortableGroup::Location the_location) + raises (LocationNotFound); + + void remove_load_monitor (in PortableGroup::Location the_location) + raises (LocationNotFound); + + void register_redirector (in PortableGroup::ObjectGroup object_group, + in PortableGroup::Location the_location) + raises (LocationNotFound); + }; + +// /// It's not clear this interface is needed for the Load Balancer. +// interface LoadNotifier +// { +// }; +}; + +#pragma prefix "" + +#endif /* COSLOADBALANCING_IDL */ -- cgit v1.2.1