[asterisk-scf-commits] asterisk-scf/release/routing.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Mon Sep 19 18:11:03 CDT 2011
branch "master" has been updated
via 4992c9b1696c5a16f7c43e8b23fcb51f47097308 (commit)
from e4ab42275e41d785385bf31251d2c0e6a66e6006 (commit)
Summary of changes:
config/.routingtest.conf.swp | Bin 0 -> 16384 bytes
config/routing-state-replicator.conf | 25 ++++----
config/routing.conf | 53 ++++++----------
config/routingtest.conf | 104 ++++++++++---------------------
src/BasicRoutingStateReplicatorApp.cpp | 19 +-----
5 files changed, 70 insertions(+), 131 deletions(-)
create mode 100644 config/.routingtest.conf.swp
- Log -----------------------------------------------------------------
commit 4992c9b1696c5a16f7c43e8b23fcb51f47097308
Author: Ken Hunt <ken.hunt at digium.com>
Date: Mon Sep 19 18:10:46 2011 -0500
Updates for changes to configuration properties for components.
diff --git a/config/.routingtest.conf.swp b/config/.routingtest.conf.swp
new file mode 100644
index 0000000..2e63771
Binary files /dev/null and b/config/.routingtest.conf.swp differ
diff --git a/config/routing-state-replicator.conf b/config/routing-state-replicator.conf
index c1c67ed..b943ef2 100644
--- a/config/routing-state-replicator.conf
+++ b/config/routing-state-replicator.conf
@@ -1,18 +1,17 @@
-# Adapter parameters for this component
-RoutingStateReplicator.Endpoints=default
-RoutingStateReplicator.ThreadPool.Size=4
+IceBox.InheritProperties = 1
+# this value was empirically determined... it may need to be different on different systems
+Ice.ThreadPool.Client.Size=10
-# A proxy to the IceStorm topic manager
-TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:default -p 10000
+IceBox.Service.RoutingStateReplicator=RoutingStateReplicator:create
-# A proxy to the service locator management service
-LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4422
+RoutingStateReplicator.Adapter.ThreadPool.Size=4
+RoutingStateReplicator.Adapter.Endpoints=tcp -p 4492
-# A proxy to the service locator service
-LocatorService.Proxy=LocatorService:tcp -p 4411
+# this service name property is used when registering this component's
+# services with the ServiceLocator. services are registered with
+# a Category, Service, and Instance.
+RoutingStateReplicator.ServiceName=default
-# The name of the state replicator
-RoutingStateReplicator.Name=default
+LocatorService.Proxy=LocatorService:tcp -p 4411
+LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4412
-IceBox.InheritProperties = 1
-IceBox.Service.RoutingStateReplicator=RoutingStateReplicator:create
diff --git a/config/routing.conf b/config/routing.conf
index 21c2991..31bfc03 100644
--- a/config/routing.conf
+++ b/config/routing.conf
@@ -1,40 +1,27 @@
-# This is a configuration file for the Basic Routing Service
-
-Ice.Default.CollocationOptimized=0
-Ice.Warn.UnknownProperties=0
-Ice.ThreadPool.Client.Size=4
-
+IceBox.InheritProperties=1
+# this value was empirically determined... it may need to be different on different systems
+Ice.ThreadPool.Client.Size=10
IceBox.Service.RoutingService=BasicRoutingService:create
-IceBox.InheritProperties=1
-
-
-RoutingService.Endpoints=tcp -p 10050
-RoutingService.Backplane.Endpoints=tcp -p 10051
-RoutingService.ThreadPool.Size=4
-RoutingService.ThreadPool.SizeMax=10
-RoutingService.ThreadPool.SizeWarn=9
-
-RoutingService.Standby=no
-
+RoutingService.ServiceAdapter.Endpoints=tcp -p 4451
+RoutingService.BackplaneAdapter.Endpoints=tcp -p 4452
RoutingService.Standalone=yes
+# this service name property is used when registering this component's
+# services with the ServiceLocator. services are registered with
+# a Category, Service, and Instance.
+RoutingService.ServiceName=default
+# the RoutingService will use the ServiceLocator to locate the BridgeManager;
+# to do so it needs to specify the category (which is always “BridgeManager”, it is not
+# configurable), and the service name. the service name is configurable in the
+# configuration file of the BridgeManager itself, and in the example config it is set to
+# “default”, so the configuration item below tells the RoutingService to look up
+# (category: BridgeManager, service: default)
+RoutingService.BridgeServiceName=default
-#Replicator.InstanceName=Replicator
-#Replicator.Endpoints=default -p 10054
-#Replicator.ComponentService.Endpoints=default -p 10055
-#Replicator.ThreadPool.Size=4
-#Replicator.ThreadPool.SizeMax=10
-#Replicator.ThreadPool.SizeWarn=9
-
-# Where to find the Service Locator manager. We need the Service Locator in order to be able to plug in to the Asterisk SCF system Discovery mechanisms.
-LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4422
-
-# Where to find the Service Locator.
LocatorService.Proxy=LocatorService:tcp -p 4411
+LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4412
-# Endpoints for Icestorm events
-TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:default -p 10000
-
-# Category for the bridge service
-BridgeManager.ServiceLocatorId=BridgeService
+# this is used to connect to the IceStorm instance that lives in the same IceBox
+# container as the ServiceDiscovery service
+TopicManager.Proxy=ServiceDiscoveryIceStorm/TopicManager:tcp -p 4421
diff --git a/config/routingtest.conf b/config/routingtest.conf
index e9a026c..0d8a5a3 100644
--- a/config/routingtest.conf
+++ b/config/routingtest.conf
@@ -3,68 +3,57 @@
Ice.Default.CollocationOptimized=0
Ice.Warn.UnknownProperties=0
-Ice.ThreadPool.Client.Size=6
-#Ice.Admin.Endpoints=tcp -p 10006
-#Ice.Admin.InstanceName=IceBox
+IceBox.InheritProperties=1
+Ice.ThreadPool.Client.Size=10
+
IceBox.InstanceName=IceBox
IceBox.ServiceManager.Endpoints=tcp -p 10007
-IceBox.InheritProperties=1
-
IceBox.Service.ServiceDiscovery=service_locator:create
IceBox.Service.RoutingService=BasicRoutingService:create
IceBox.Service.RoutingService2=BasicRoutingService:create
+IceBox.Service.Replicator=BasicRoutingStateReplicator:create
-
-# Boost Test arguments can be passed here.
+# Boost Test arguments can be passed to RoutingTest:create
IceBox.Service.RoutingTest = RoutingTest:create --log_level=all
-#IceBox.Service.RoutingTest = RoutingTest:create
-
-IceBox.Service.Replicator=BasicRoutingStateReplicator:create
IceBox.LoadOrder=ServiceDiscovery,Replicator,RoutingService,RoutingService2,RoutingTest
-# Where to find the Service Locator manager. We need the Service Locator in order to be able to plug in to the Asterisk SCF system Discovery mechanisms.
-LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4422
-
-# Where to find the Service Locator.
LocatorService.Proxy=LocatorService:tcp -p 4411
+LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4412
-# Test endpoints for IceStorm
-TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:default -p 10000
+# this is used to connect to the IceStorm instance that lives in the same IceBox
+# container as the ServiceDiscovery service
+TopicManager.Proxy=ServiceDiscovery/TopicManager:tcp -p 4421
-# Category for the bridge service
+# Category for the bridge service. This is used by the Routing test driver.
BridgeManager.ServiceLocatorId=BridgeService
###########################################
# Routing Service properties
-RoutingService.Endpoints=tcp -p 10050
-RoutingService.Backplane.Endpoints=tcp -p 10051
-RoutingService.ThreadPool.Size=8
-RoutingService.ThreadPool.SizeMax=14
-RoutingService.ThreadPool.SizeWarn=9
+RoutingService.ServiceAdapter.Endpoints=tcp -p 10050
+RoutingService.BackplaneAdapter.Endpoints=tcp -p 10051
+RoutingService.ServiceAdapter.ThreadPool.Size=8
+RoutingService.ServiceAdapter.ThreadPool.SizeMax=14
+RoutingService.ServiceAdapter.ThreadPool.SizeWarn=9
RoutingService.Standby=no
RoutingService.StateReplicatorId=Replicator
RoutingService.ComponentTest=yes
-RoutingService2.Endpoints=tcp -p 10052
-RoutingService2.Backplane.Endpoints=tcp -p 10053
-RoutingService2.ThreadPool.Size=8
-RoutingService2.ThreadPool.SizeMax=14
-RoutingService2.ThreadPool.SizeWarn=9
+RoutingService2.ServiceAdapter.Endpoints=tcp -p 10052
+RoutingService2.BackplaneAdapter.Endpoints=tcp -p 10053
+RoutingService2.ServiceAdapter.ThreadPool.Size=8
+RoutingService2.ServiceAdapter.ThreadPool.SizeMax=14
+RoutingService2.ServiceAdapter.ThreadPool.SizeWarn=9
RoutingService2.Standby=yes
RoutingService2.StateReplicatorId=Replicator
-Replicator.InstanceName=Replicator
-Replicator.Endpoints=default -p 10054
-Replicator.Backplane.Endpoints=default -p 10055
-Replicator.ThreadPool.Size=8
-Replicator.ThreadPool.SizeMax=14
-Replicator.ThreadPool.SizeWarn=9
-
-# AsteriskSCF.RoutingService.logger=Debug
+Replicator.Adapter.Endpoints=default -p 10054
+Replicator.Adapter.ThreadPool.Size=8
+Replicator.Adapter.ThreadPool.SizeMax=14
+Replicator.Adapter.ThreadPool.SizeWarn=9
###########################################
# Test properties
@@ -100,42 +89,17 @@ TestRoutingAdapterOut.ThreadPool.SizeWarn=9
##########################################
# Service Locator properties
-AsteriskSCFIceStorm.InstanceName=AsteriskSCFIceStorm
-#
-# This property defines the endpoints on which the IceStorm
-# TopicManager listens.
-#
-AsteriskSCFIceStorm.TopicManager.Endpoints=default -p 10000
-
-#
-# This property defines the endpoints on which the topic
-# publisher objects listen. If you want to federate
-# IceStorm instances this must run on a fixed port (or use
-# IceGrid).
-#
-AsteriskSCFIceStorm.Publish.Endpoints=tcp -p 10001:udp -p 10001
-
-#
-# TopicManager Tracing
-#
-# 0 = no tracing
-# 1 = trace topic creation, subscription, unsubscription
-# 2 = like 1, but with more detailed subscription information
-#
-AsteriskSCFIceStorm.Trace.TopicManager=2
-AsteriskSCFIceStorm.Transient=1
+ServiceDiscovery.IceStorm.InstanceName=ServiceDiscovery
-#
-AsteriskSCFIceStorm.Flush.Timeout=2000
-# This is a configuration file used in conjunction with the service locator test driver
+ServiceDiscovery.IceStorm.TopicManager.Endpoints=default -p 4421
+ServiceDiscovery.IceStorm.Publish.Endpoints=tcp -p 4422:udp -p 4422
+ServiceDiscovery.IceStorm.Trace.TopicManager=2
+ServiceDiscovery.IceStorm.Transient=1
+ServiceDiscovery.IceStorm.Flush.Timeout=2000
# Test endpoints for the service locator management adapter
-ServiceLocatorManagementAdapter.Endpoints=tcp -p 4422
-
-# Test endpoints for the service locator adapter
-ServiceLocatorAdapter.Endpoints=tcp -p 4411
-ServiceLocatorLocalAdapter.Endpoints=tcp -p 4412
+ServiceDiscovery.Management.ServiceAdapter.Endpoints=tcp -p 4412
+ServiceDiscovery.Locator.ServiceAdapter.Endpoints=tcp -p 4411
+ServiceDiscovery.BackplaneAdapter.Endpoints=tcp -p 4410
+ServiceDiscovery.Standalone=true
-# Logger configuration
-LoggerAdapter.Endpoints=default
-AsteriskSCF.Logging.logger.AsteriskSCF=Error
diff --git a/src/BasicRoutingStateReplicatorApp.cpp b/src/BasicRoutingStateReplicatorApp.cpp
index e07e2ec..9e6c29d 100644
--- a/src/BasicRoutingStateReplicatorApp.cpp
+++ b/src/BasicRoutingStateReplicatorApp.cpp
@@ -81,7 +81,6 @@ private:
bool mRunning;
bool mInitialized;
::Ice::ObjectAdapterPtr mServiceAdapter;
- ::Ice::ObjectAdapterPtr mBackplaneAdapter;
::Ice::CommunicatorPtr mCommunicator;
ServiceLocatorManagementPrx mServiceLocatorManagement;
Discovery::V1::ServiceManagementPrx mComponentServiceManagement;
@@ -163,7 +162,7 @@ void BasicRoutingStateReplicatorService::registerWithServiceLocator()
// Add our Replicator interface and add it to the Service Locator.
mStateReplicationManagement = mServiceLocatorManagement->addService(mStateReplicatorPrx, StateReplicatorDiscoveryCategory);
- string replicatorName = mCommunicator->getProperties()->getPropertyWithDefault(mAppName + ".InstanceName", "default");
+ string replicatorName = mAppName;
setCategory(mStateReplicationManagement, StateReplicatorDiscoveryCategory, serviceName, replicatorName);
}
catch(...)
@@ -204,20 +203,15 @@ void BasicRoutingStateReplicatorService::initialize(const std::string& appName)
mAppName = appName;
// This is the primary adapter for this component.
- mServiceAdapter = mCommunicator->createObjectAdapter(mAppName);
-
- // Create a separate adapter just for the component service. This is
- // to make it easy to deactivate all of our interfaces other than the
- // component service to support suspend()/resume().
- mBackplaneAdapter = mCommunicator->createObjectAdapter(mAppName + ".Backplane");
+ mServiceAdapter = mCommunicator->createObjectAdapter(mAppName + ".Adapter");
// setup logging client
mIceLogger = createIceLogger(mServiceAdapter);
getLoggerFactory().setLogOutput(mIceLogger->getLogger());
- // Create and publish our ComponentService interface support on its own adapter.
+ // Create and publish our ComponentService interface.
mComponentServicePrx = ComponentServicePrx::uncheckedCast(
- mBackplaneAdapter->add(new ComponentServiceImpl(this), mCommunicator->stringToIdentity(ComponentServiceId)));
+ mServiceAdapter->add(new ComponentServiceImpl(this), mCommunicator->stringToIdentity(ComponentServiceId)));
// Create our instance of the StateReplicator template.
mStateReplicator = new RoutingStateReplicatorI();
@@ -226,7 +220,6 @@ void BasicRoutingStateReplicatorService::initialize(const std::string& appName)
// Activate our adapters.
mServiceAdapter->activate();
- mBackplaneAdapter->activate();
// Get a proxy to the management interface for the Service Locator, so we can add
// ourselves into the system discovery mechanisms.
@@ -251,7 +244,6 @@ void BasicRoutingStateReplicatorService::start(const string &name, const Ice::Co
else
{
mServiceAdapter->activate();
- mBackplaneAdapter->activate();
}
// Plug into the Asterisk SCF discovery system so that the interfaces we provide
@@ -320,9 +312,6 @@ void BasicRoutingStateReplicatorService::stop()
// Just in case we were in suspend() mode when told to stop.
mComponentServiceManagement->unregister();
- // Turn off our ComponentService interface.
- // Only a start() directly from IceBox can restart us now.
- mBackplaneAdapter->deactivate();
lg(Info) << "Stopped.";
}
-----------------------------------------------------------------------
--
asterisk-scf/release/routing.git
More information about the asterisk-scf-commits
mailing list