summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2002-11-16 02:31:31 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2002-11-16 02:31:31 +0000
commitf5f40d12e871788dd263a3ccb7af734e7af37c48 (patch)
treea7143d34dd43a1f72017ec240c344da90946e101
parent86e0945dd450c7affe7f24716c3ee690318f67f5 (diff)
downloadATCD-f5f40d12e871788dd263a3ccb7af734e7af37c48.tar.gz
ChangeLogTag:Fri Nov 15 18:29:28 2002 Ossama Othman <ossama@uci.edu>
-rw-r--r--TAO/ChangeLog63
-rw-r--r--TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.cpp19
-rw-r--r--TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.h1
-rw-r--r--TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp36
-rw-r--r--TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.h11
-rw-r--r--TAO/orbsvcs/orbsvcs/Makefile.CosLoadBalancing2
6 files changed, 97 insertions, 35 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 8ab001a20d6..f885c354a08 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,24 @@
+Fri Nov 15 18:29:28 2002 Ossama Othman <ossama@uci.edu>
+
+ * orbsvcs/orbsvcs/LoadBalancing/LB_Random.h:
+ * orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp (next_member):
+ (_tao_next_member):
+
+ Refactored random member selection code into a TAO-specific
+ static method. This is possible since this random load
+ balancing strategy implementation is stateless. This allows
+ other strategies to reuse the random member selection code with
+ instantiating the TAO_LB_Random class.
+
+ * orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.cpp (next_member):
+
+ No loads have been reported for any of the locations the object
+ group members reside at. If no loads have been reported to the
+ LoadManager, adaptive load balancing decisions cannot be made.
+ Fall back on a non-adaptive strategy, such as the Random load
+ balancing strategy, instead. The Random load balancing strategy
+ is used since it is very lightweight and stateless.
+
Fri Nov 15 15:26:29 2002 Ossama Othman <ossama@uci.edu>
* orbsvcs/tests/LoadBalancing/GenericFactory/Application_Controlled/Basic.cpp:
@@ -57,17 +78,17 @@ Fri Nov 15 14:51:31 2002 Balachandran Natarajan <bala@isis-server.isis.vanderb
* tao/Queued_Message.cpp:
* tao/Queued_Message.h: Added an extra default argument to the
constructor that indicates whether the class is heap allocated
- or not.
-
+ or not.
+
* tao/Transport.cpp: Changed the places where the
Asynch_Queued_Message was allocated on the heap to pass the
right value for the flag that indicates the status of creation
- of the class.
+ of the class.
Thanks to Chad Elliott for pinting out that if the
Asynch_Queued_Message was allocated on the heap, it may not get
destroyed if TAO_Asynch_Queued_Message::destroy () was
- called.
+ called.
Fri Nov 15 20:52:12 UTC 2002 Johnny Willemsen <jwillemsen@remedy.nl>
@@ -350,7 +371,7 @@ Tue Nov 12 13:25:00 2002 Balachandran Natarajan <bala@isis-server.isis.vanderb
Tue Nov 12 13:13:05 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
- * tao/TAO.dsp:
+ * tao/TAO.dsp:
* tao/TAO_Static.dsp: Added the new files.
Tue Nov 12 12:54:39 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
@@ -359,24 +380,24 @@ Tue Nov 12 12:54:39 2002 Balachandran Natarajan <bala@isis-server.isis.vanderb
Tue Nov 12 12:47:31 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
- Fix for [BUG 1020]. Please see details of the bug at
-
+ Fix for [BUG 1020]. Please see details of the bug at
+
http://deuce.doc.wustl.edu/bugzilla/show_bug.cgi?id=1020
Please see the discussions in the above URL for details on
- the motivations for these changes. A very brief summary of the
+ the motivations for these changes. A very brief summary of the
changes alone are mentioned.
-
+
* tao/Transport.cpp(close_connection_shared): Wait on the
leader follower if the handle is registered with the
- reactor.
+ reactor.
* tao/LF_Event.h:
* tao/LF_Event.cpp:
* tao/LF_Event.inl: Made the class TAO_LF_Event as an abstract
base class. This helps us to strategize the type of
behaviour required in different concrete classes which can
- in turn be used by other portions of the ORB to wait on LF.
+ in turn be used by other portions of the ORB to wait on LF.
* tao/LF_Invocation_Event.h:
* tao/LF_Invocation_Event.cpp:
@@ -387,29 +408,29 @@ Tue Nov 12 12:47:31 2002 Balachandran Natarajan <bala@isis-server.isis.vanderb
* tao/LF_CH_Event.h:
* tao/LF_CH_Event.cpp: Concrete implementation of a LF_Event
class, where the state transitions of the connection handler are
- consolidated.
+ consolidated.
* tao/Queued_Message.h:
* tao/Synch_Reply_Dispatcher.h: They now inherit from
TAO_LF_Invocation_Event class.
* tao/Connection_Handler.h: This class inherits now from the
- TAO_LF_CH_Event class.
+ TAO_LF_CH_Event class.
- * tao/Makefile.bor:
+ * tao/Makefile.bor:
* tao/Makefile.tao: Added the new files to the list of compilable
- files.
+ files.
Tue Nov 12 12:37:18 2002 Pradeep Gore <pradeep@oomworks.com>
* orbsvcs/Logging_Service/Notify_Logging_Service/Makefile:
* orbsvcs/examples/Log/Notify/Makefile:
Updated dependencies.
-
+
* orbsvcs/examples/Log/Notify/Notify_Consumer.h:
- Removed the include of
+ Removed the include of
orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.h, which no longer exists.
-
+
Tue Nov 12 11:15:50 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
* tao/IIOP_Connector.cpp:
@@ -418,11 +439,11 @@ Tue Nov 12 11:15:50 2002 Balachandran Natarajan <bala@isis-server.isis.vanderb
* orbsvcs/orbsvcs/SSLIOP/IIOP_SSL_Connector.cpp:
* orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp: Added an assert
statement after decrementing the reference count. Point taken
- from "Pragmatic Programmer".
+ from "Pragmatic Programmer".
Tue Nov 12 11:08:32 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
- * tao/Connection_Handler.h: Commented out the following calls
+ * tao/Connection_Handler.h: Commented out the following calls
incr_pending_upcalls (), decr_pending_upcalls () and
pending_upcalls (), since there was no implementation and they
were not at all used.
@@ -434,7 +455,7 @@ Tue Nov 12 10:17:05 2002 Jeff Parsons <parsons@isis-server.isis.vanderbilt.edu>
* orbsvcs/orbsvcs/Log/NotifyLogNotification.h:
* orbsvcs/orbsvcs/Log/NotifyLog_i.h:
- Removed the include of
+ Removed the include of
orbsvcs/orbsvcs/Notify/Notify_EventChannel_i.h, which no longer exists.
Tue Nov 12 13:31:12 UTC 2002 Johnny Willemsen <jwillemsen@remedy.nl>
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.cpp
index 302df556c40..10ac4fc37b6 100644
--- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.cpp
+++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.cpp
@@ -2,9 +2,11 @@
#include "LB_LeastLoaded.h"
#include "LB_LoadMap.h"
+#include "LB_Random.h"
#include "orbsvcs/PortableGroup/PG_conf.h"
#include "tao/debug.h"
+
ACE_RCSID (LoadBalancing,
LB_LeastLoaded,
"$Id$")
@@ -187,9 +189,20 @@ TAO_LB_LeastLoaded::next_member (
}
else
{
- // This should never occur.
- ACE_THROW_RETURN (CORBA::INTERNAL (),
- CORBA::Object::_nil ());
+ // No loads have been reported for any of the locations the
+ // object group members reside at. If no loads have been
+ // reported to the LoadManager, adaptive load balancing
+ // decisions cannot be made. Fall back on a non-adaptive
+ // strategy, such as the Random load balancing strategy,
+ // instead.
+ //
+ // @note The Random load balancing strategy is used since it is
+ // very lightweight and stateless.
+
+ return TAO_LB_Random::_tao_next_member (object_group,
+ load_manager,
+ locations.in ()
+ ACE_ENV_ARG_PARAMETER);
}
}
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.h
index 5a078789ccd..53749ae08d0 100644
--- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.h
+++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.h
@@ -135,6 +135,7 @@ private:
CORBA::Float dampening_;
CORBA::Float per_balance_load_;
+
};
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp
index a81e3371a32..2a2dad98fcf 100644
--- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp
+++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp
@@ -61,7 +61,32 @@ TAO_LB_Random::next_member (
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::Object::_nil ());
- const CORBA::ULong len = locations->length ();
+ return TAO_LB_Random::_tao_next_member (object_group,
+ load_manager,
+ locations.in ()
+ ACE_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_LB_Random::analyze_loads (
+ PortableGroup::ObjectGroup_ptr /* object_group */,
+ CosLoadBalancing::LoadManager_ptr /* load_manager */
+ ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+}
+
+CORBA::Object_ptr
+TAO_LB_Random::_tao_next_member (
+ PortableGroup::ObjectGroup_ptr object_group,
+ CosLoadBalancing::LoadManager_ptr load_manager,
+ const PortableGroup::Locations & locations
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ PortableGroup::ObjectGroupNotFound,
+ PortableGroup::MemberNotFound))
+{
+ const CORBA::ULong len = locations.length ();
if (len == 0)
ACE_THROW_RETURN (CORBA::TRANSIENT (),
CORBA::Object::_nil ());
@@ -102,12 +127,3 @@ TAO_LB_Random::next_member (
locations[i]
ACE_ENV_ARG_PARAMETER);
}
-
-void
-TAO_LB_Random::analyze_loads (
- PortableGroup::ObjectGroup_ptr /* object_group */,
- CosLoadBalancing::LoadManager_ptr /* load_manager */
- ACE_ENV_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
-}
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.h
index f927a277764..736225c4b7d 100644
--- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.h
+++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.h
@@ -77,6 +77,17 @@ public:
ACE_THROW_SPEC ((CORBA::SystemException));
//@}
+ /// TAO-specific underlying implementation of this Random load
+ /// balancing strategy's next_member() method.
+ static CORBA::Object_ptr _tao_next_member (
+ PortableGroup::ObjectGroup_ptr object_group,
+ CosLoadBalancing::LoadManager_ptr load_manager,
+ const PortableGroup::Locations & locations
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ PortableGroup::ObjectGroupNotFound,
+ PortableGroup::MemberNotFound));
+
};
diff --git a/TAO/orbsvcs/orbsvcs/Makefile.CosLoadBalancing b/TAO/orbsvcs/orbsvcs/Makefile.CosLoadBalancing
index 39cac95f84a..5e1497985b6 100644
--- a/TAO/orbsvcs/orbsvcs/Makefile.CosLoadBalancing
+++ b/TAO/orbsvcs/orbsvcs/Makefile.CosLoadBalancing
@@ -364,7 +364,7 @@ realclean: clean
$(ACE_ROOT)/ace/Timer_Queue_T.cpp \
$(ACE_ROOT)/ace/Reactor.i \
$(ACE_ROOT)/ace/Reactor_Impl.h \
- LoadBalancing/LB_LeastLoaded.inl \
+ LoadBalancing/LB_LeastLoaded.inl LoadBalancing/LB_Random.h \
PortableGroup/PG_conf.h \
$(TAO_ROOT)/tao/debug.h