Archived

This forum has been archived. Please start a new discussion on GitHub.

Icegrid descriptors and dbenv

xdm
xdm La Coruña, Spain
Hello zeroc


I using this descriptor for creating the service

i have a few questions

1) how make the dbenv property relative to the icegridnode database, is correct put the dbenv in the icegridnode database.

2) the dbenv must be unique for all dbs?

3) whe especify a DbEnv this is relative to [node-db]/servers/[server-name]/dbs is posible automatic create the DbEnv or this must be done in the application

<icegrid>
	<application name="hydra" import-default-templates="true">
		<node name="titanio">
		<!--FileService-->
		<!--Servicio de ficheros-->
		<server-instance 
			template="ModelServer"
			icebox-id="FileService"
			server-name="Files"
			dll-entry-point="Files:create"
			type="::Oz::Files::FileServer"
			exe="/opt/Ice-3.0.1/bin/icebox"
			identity="FileServer/Alcompleto"
			luceneServiceId="LuceneServer/Alcompleto"
			indexDir="/home/pepone/hydra/DB/LuceneDb"
			DbEnv="Files"
			DbFile="FilesDB"
			DbHome="/home/pepone/hydra/DB/Files"
			MessageSizeMax="2048"
			ThreadPool.Server.Size="2"
			ThreadPool.Server.SizeMax="5"/>
             </node>
      </application>
</icegrid>

Here is the modelServer template
<server-template id="ModelServer">
	<parameter name="icebox-id"/>
	<parameter name="server-name"/>
	<parameter name="dll-entry-point"/>
	<parameter name="type"/>
	<parameter name="exe"/>
	<parameter name="identity"/>
	<parameter name="luceneServiceId"/>
	<parameter name="indexDir"/>
	<parameter name="DbEnv"/>
	<parameter name="DbFile"/>
	<parameter name="DbHome"/>
	<parameter name="MessageSizeMax"/>
	<parameter name="ThreadPool.Server.Size"/>
	<parameter name="ThreadPool.Server.SizeMax"/>
			
	<icebox id="${icebox-id}"
		exe="${exe}"
		activation="on-demand">	
		<service name="${server-name}" entry="${dll-entry-point}">
			<adapter name="${service}" endpoints="tcp">
				<object 
					identity="${identity}" 
					type="${type}"/>
			</adapter>
			
		<property name="ModelServerId" value="${identity}"/>
		<property name="luceneServiceId" value="${luceneServiceId}"/>
		<property name="FreezeDbEnv" value="${DbEnv}"/>
		<property name="FreezeDbFile" value="${DbFile}"/>
                <property name="SearchServerIndexDir" value="${indexDir}/${server-name}"/>
		<property name="SearchServerName" value="${identity}-SearchServer"/>
		<property name="Ice.ThreadPool.Server.Size" value="${ThreadPool.Server.Size}"/>
		<property name="Ice.ThreadPool.Server.SizeMax" value="${ThreadPool.Server.SizeMax}"/>
		<property name="Ice.MessageSizeMax" value="${MessageSizeMax}"/>
		<property name="Freeze.DbEnv.${DbEnv}.OldLogsAutoDelete" value="1"/>
		<property name="Freeze.DbEnv.${DbEnv}.DbPrivate" value="0"/>
		<property name="Freeze.DbEnv.${DbEnv}.CheckpointPeriod" value="120"/>
		<dbenv name="${DbEnv}" home="${DbHome}"/>
		<!-- Activar SysLog como logger para Ice-->
		<property name="Ice.UseSyslog" value="1"/>
		<!-- Activar timestamp en los logs del sistema-->
		<property name="Ice.Logger.Timestamp" value="1"/>
	</service>
</icebox>
</server-template>

Comments

  • benoit
    benoit Rennes, France
    xdm wrote:
    Hello zeroc


    I using this descriptor for creating the service

    i have a few questions

    1) how make the dbenv property relative to the icegridnode database, is correct put the dbenv in the icegridnode database.

    If you don't specify the home attribute in the dbenv element, the IceGrid node will create a directory in the node data directory for the dbenv, more precisely it will create the directory: <node-datadir>/servers/<server-id>/dbs/<dbenv-name>

    It will also generate the Freeze.DbEnv.<dbenv-name>.DbHome property with the correct value in the server configuration file. See the IceGrid XML reference from the Ice manual for more information.
    2) the dbenv must be unique for all dbs?

    The dbenv name must be unique within the server scope.
    3) whe especify a DbEnv this is relative to [node-db]/servers/[server-name]/dbs is posible automatic create the DbEnv or this must be done in the application

    This is automatic if you don't set the "home" attribute for the dbenv element.

    Cheers,
    Benoit.