Difference between revisions of "Edge Server Configuration"

From RifidiWiki

Jump to: navigation, search
(File Structure)
(Default .ini file)
Line 2: Line 2:
 
=RifidiEdgeServer.ini=
 
=RifidiEdgeServer.ini=
 
The RifidiEdgeServer.ini is a property file that contains options for various options when the edge server starts up.   
 
The RifidiEdgeServer.ini is a property file that contains options for various options when the edge server starts up.   
==Default .ini file==
+
==rifidiserver.ini file==
By default it looks like this:
+
As of release 1.2.0, the default rifidiserver.ini file looks like this:
 
<pre>
 
<pre>
 
-os
 
-os
Line 13: Line 13:
 
-nl
 
-nl
 
${target.nl}
 
${target.nl}
-console
 
 
-vmargs
 
-vmargs
 
-Declipse.ignoreApp=true
 
-Declipse.ignoreApp=true
 +
-Dosgi.console
 
-Dosgi.noShutdown=true
 
-Dosgi.noShutdown=true
-Dorg.rifidi.edge.configuration=test.ini
+
-Dorg.rifidi.edge.configuration=config/rifidi.xml
 
-Dosgi.clean=true
 
-Dosgi.clean=true
 
-Dorg.osgi.framework.bootdelegation=javax.xml.ws
 
-Dorg.osgi.framework.bootdelegation=javax.xml.ws
Line 27: Line 27:
 
-Dorg.rifidi.edge.ale.port=8081
 
-Dorg.rifidi.edge.ale.port=8081
 
-Dorg.rifidi.edge.ale.host=127.0.0.1
 
-Dorg.rifidi.edge.ale.host=127.0.0.1
-Dorg.rifidi.edge.jms.hostname=127.0.0.1
 
-Dorg.rifidi.edge.jms.port=1100
 
 
-Dosgi.framework.extensions=org.eclipse.equinox.weaving.hook
 
-Dosgi.framework.extensions=org.eclipse.equinox.weaving.hook
 
-Dorg.aspectj.osgi.verbose=true
 
-Dorg.aspectj.osgi.verbose=true
 +
-Dorg.rifidi.edge.autostart=true
 +
-Dorg.rifidi.edge.logging=config/logging.properties
 +
-Dorg.rifidi.ui.notify=true
 
</pre>
 
</pre>
 +
 
==Console==
 
==Console==
 
;-console
 
;-console

Revision as of 19:48, 2 September 2010

This page explains the various configuration options of the Rifidi Edge Server

RifidiEdgeServer.ini

The RifidiEdgeServer.ini is a property file that contains options for various options when the edge server starts up.

rifidiserver.ini file

As of release 1.2.0, the default rifidiserver.ini file looks like this:

-os
${target.os}
-ws
${target.ws}
-arch
${target.arch}
-nl
${target.nl}
-vmargs
-Declipse.ignoreApp=true
-Dosgi.console
-Dosgi.noShutdown=true
-Dorg.rifidi.edge.configuration=config/rifidi.xml
-Dosgi.clean=true
-Dorg.osgi.framework.bootdelegation=javax.xml.ws
-Dcom.sun.management.jmxremote.port=2021
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=127.0.0.1
-Dorg.rifidi.edge.core.rmi.port=1101
-Dorg.rifidi.edge.ale.port=8081
-Dorg.rifidi.edge.ale.host=127.0.0.1
-Dosgi.framework.extensions=org.eclipse.equinox.weaving.hook
-Dorg.aspectj.osgi.verbose=true
-Dorg.rifidi.edge.autostart=true
-Dorg.rifidi.edge.logging=config/logging.properties
-Dorg.rifidi.ui.notify=true

Console

-console
This starts up the OSGi console so that you can interact with the edge server from the command line. For a list of commands that are available see Edge Server Commands. If you would like the console to be available over the network, supply a port after the -console (e.g. -console 2020). Now it is possible to telnet into the server at the given port. It is recommended that you use ssh tunneling for security reasons (i.e. first ssh to the machine that is running the edge server, then telnet to the console). One thing to note is that after you telnet to the OSGi console, you cannot use the exit command as you normally would to close the telnet session. This is because exit will be caught by the OSGi console and will perform a System.exit(). Instead, to exit the telnet session while keeping the server running, just close the telnet window.

VMArgs

VMArgs must follow the -vmargs flag in the .ini file. They must start with -D. Default values can be found in the bundle.properties file in the spring directory for the appropriate option. Important VM args:

-Dorg.rifidi.edge.configuration
This is the path to the persistence file. See #rifidi.xml.
-Dcom.sun.management.jmxremote.port
The port to open up JMX on. This is important if you are using a program like VisualVM to profile the server
-Djava.rmi.server.hostname
The hostname to open up the RMI registry at. Default is 127.0.0.1
-Dorg.rifidi.edge.core.rmi.port
The port of the RMI registry Default is 1101
-Dorg.rifidi.edge.ale.host
The hostname to publish the ALE webservices at. Default is 127.0.0.1
-Dorg.rifidi.edge.ale.port
The port to publish the ALE webservices at. Default is 8081
-Dorg.rifidi.edge.ale.read
The service name of the ALE reading service. Default is ALEService
-Dorg.rifidi.edge.ale.logicalreader
The service name of the ALE logical reader service. Default is ALELRService
-Dorg.rifidi.edge.jms.hostname
The hostname to use for JMS. Default is 127.0.0.1
-Dorg.rifidi.edge.jms.port
The port to use for JMS. Default is 1100
-Dorg.rifidi.edge.jms.topic.tags
The topic name that JMS will publish all tag read events at. Default is org.rifidi.edge.external.tags
-Dorg.rifidi.edge.jms.topic.notifications
The topic name that JMS will publish all notification events (such as when a reader is added or a session is started). Default is org.rifidi.edge.external.notifications

rifidi.xml

The rifidi.xml file is the persistence file for the Rifidi Edge Server. The two important services that are saved are Reader Configurations and Command Configurations.

Loading a configuration file

Whenever the edge server starts up, it looks for the file that is specified in the org.rifidi.configuration vm flag. After the configuration file is read, the server will attempt to recreate all services specified in the file. If a needed factory is not available, the service will be skipped and recreated when the factory becomes available. For example, suppose the configuration file has an Alien Reader Configuration and an LLRP Reader Configuration. Suppose that when the server starts up, only the Alien plugin is available (so the Alien Reader Factory is available, but the LLRP Reader Factory is not). At this point the Alien Reader is recreated. If later the LLRP plugin is installed, then the LLRP reader will be recreated.

File Structure

The edge server uses JAXB to persist a configuration file. Each service will have a serviceID and a factoryID. The serviceID is the unique name of the service, and is used when using the service (such as starting a session on a reader). The factoryID is the ID of the factory that can create a service. The following is an example of file that has one Alien Reader saved.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configurationStore>
    <services>
        <attributes>
            <entry>
                <key>ReconnectionInterval</key>
                <value>500</value>
            </entry>
            <entry>
                <key>Port</key>
                <value>20000</value>
            </entry>
            <entry>
                <key>InvertExternalOutput</key>
                <value>0</value>
            </entry>
            <entry>
                <key>PersistTime</key>
                <value>-1</value>
            </entry>
            <entry>
                <key>Username</key>
                <value>alien</value>
            </entry>
            <entry>
                <key>Password</key>
                <value>password</value>
            </entry>
            <entry>
                <key>InvertExternalInput</key>
                <value>0</value>
            </entry>
            <entry>
                <key>ReaderNumber</key>
                <value>0</value>
            </entry>
            <entry>
                <key>ExternalOutput</key>
                <value>0</value>
            </entry>
            <entry>
                <key>IpAddress</key>
                <value>127.0.0.1</value>
            </entry>
            <entry>
                <key>MaxNumConnectionAttempts</key>
                <value>10</value>
            </entry>
            <entry>
                <key>RFAttenuation</key>
                <value>0</value>
            </entry>
        </attributes>
        <factoryID>Alien</factoryID>
        <serviceID>Alien_1</serviceID>
    </services>
</configurationStore>
Personal tools