Skip to main content

Appendix 2

AVIX IN A THIN CLIENT ENVIRONMENT

INTRODUCTION

The AVIX application has been designed from the start to work as a standalone application, but there are ways that the application can be configured to support being run in multiple instances on a single server.

This is however not the intended environment for AVIX so it may cause problems during use. Solme does not encourage the use of deploying AVIX this way and the support Solme can provide in these cases is very limited. Solme does however allow customers to try to deploy the application this way as long as it does not circumvent the licensing mechanism.

Known problem areas:

  • Licensing - each user need their own license area
  • User preferences - each user need their own preference area
  • Single instance mechanism - each user need their own port number
  • Logging - each user could use their own log file
  • Application language - each user should be able to run the application in a language of their choice

All end users will of course also need adequate performance from central system resources like CPU, file access and network bandwidth to get the correct "AVIX experience". The largest unknown is usually the quality of the movie files where movies in high resolution requiring a lot more resources than low resolution movies. It is recommended to perform tests in the environment to determine how much resources each concurrent user will need.

SOLUTIONS SUMMARY

AVIX application
  • One AVIX client installation on the thin client server machine. All users will use this installation.
  • This installation cannot be updated with the updating mechanism built in the application as using that would overwrite configuration data with default application settings which would cause the application to not work in a multi user environment.
Configuration
  • Each user will have to be assigned some user unique value in the form of Windows environment variables (unique port number and identifier used to create user unique folders).
  • Configuration file is modified using the environment variable to modify Application behavior so it work better in a multi user environment.
  • Each user get their own unique application preferences (file or CU registry). This file has to be created and placed in a user unique location and it control some of the application behavior.
Unsolved problems
  • Application language setting for each user. The language option is handled by the platform that AVIX is built upon and we have not been able to tweak that platform to store the language setting in a location that is unique for each user.

PROBLEM – LICENSING

By default, AVIX store license data in the folder %allusersprofile%\Solme AB\AVIX4 and this may cause problems if multiple users should run AVIX on the same server.

  • Each user needs their own location for license data
  • Can be configured in config.ini file

PROBLEM – USER PREFERENCES

The application uses preferences that are stored in multiple areas. Some of these need to be made user specific

AVIX preferences
  • Each user needs their own AVIX preferences
    ¤ instance area
  • Can be configured in config.ini
Platform preferences
  • Each user needs their own area for platform preferences
    ¤
    • instance area
      ¤
    •  configuration area
    Can be configured in config.ini

    PROBLEM – SINGLE INSTANCE MECHANISM

    AVIX currently use socket based communication to ensure that files are opened in a single instance of the application. If multiple users are running the application on a single computer, they all need their own port for this or else all files will be opened in the application instance that started first.

    • Each user need their own port for this mechanism
    • Can be configured via AVIX preferences (file or registry)

    PROBLEM – LOGGING

    Log data is by default written to a log file relative the installation folder so all users will share this log file unless it is reconfigured. The AVIX application will function normally even if the logging is not configured to be unique to each user, but if problems occur it will become harder to see what happened in a shared log file.

    Each user need the following access rights to the file area where the log files are stored so the log files can be created and modified.

    • Create new file
    • Read from file
    • Write to file
    • Delete file
    Configure individual user logging

    A custom log configuration file - log4j.properties - must be placed in the root of the application installation directory.

    Each user need an individual value for a common system environment variable. In this example the variable USERNAME is used.

    Add an entry to the config.ini file in AVIX that transfer the environment variable to a java system variable. This needs to be done as we have not managed to get it to work with Windows environment variables in the log4j.properties file. This mapping allows the system environment variable to be combined with other strings to create a new variable value.

    Example entry in config.ini:
    avixlogfile.location = D:/$USERNAME$/AVIX/logs

    PROBLEM – APPLICATION LANGUAGE

    NOTE: This is currently unresolved problem

    Application language functionality is provided via the application platform and the setting is stored in the configuration file config.ini which is shared by all users that use the same installation.

    The language can however be specified as a program argument “-nl language_code” so if the application can be configured so each user can specify their own program argument for language this could be a workaround.

    Example: Run application in English
    AVIX4.exe -nl en

    CONFIGURATION EXAMPLES

    Examples of configurations in different files in AVIX v4.6.3 to allow a multi user scenario

    config.ini file

    This file is located at "<install dir>/configuration/config.ini"

    Default content of config.ini in AVIX v4.6.3
    # This configuration file was written by:
    org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser
    # Tue Jun 02 11:17:03 CEST 2015
    osgi.instance.area = $ALLUSERSPROFILE$/Solme AB/AVIX4/instance/
    eclipse.p2.profile = profile
    osgi.framework = file\:plugins/org.eclipse.osgi_3.8.2.v20130124-134944.jar
    equinox.use.ds = true
    osgi.user.area = $LOCALAPPDATA$/Solme AB/AVIX4/user/
    osgi.bundles =
    reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.301.v20120914-163612.jar@1\:start
    org.eclipse.equinox.simpleconfigurator.configUrl =
    file\:org.eclipse.equinox.simpleconfigurator/bundles.info
    osgi.configuration.cascaded = true
    eclipse.product = se.solme.avix.application.rcp.avixProduct
    osgi.splashPath = platform\:/base/plugins/se.solme.avix.application.rcp
    osgi.framework.extensions = reference\:file\:org.eclipse.birt.jetty.overlay_4.2.2.v201210101433.jar,
    reference\:file\:org.eclipse.osgi.nl_de_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_es_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_fi_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_fr_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_it_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_pl_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_pt_BR_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_ru_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_sv_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_zh_4.2.0.v20131123041006.jar
    osgi.bundles.defaultStartLevel = 4
    eclipse.application = se.solme.avix.application.rcp.avixApplication
    eclipse.p2.data.area = @config.dir/../p2/

    An example of the same file with typical settings added/changed to allow multi user scenario. Changes marked in bold. Changes of existing values in yellow, new settings in green.
    # This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser
    # Tue Jun 02 11:17:03 CEST 2015
    osgi.instance.area = $USERPROFILE$/AVIX/instance
    eclipse.p2.profile = profile
    osgi.framework = file\:plugins/org.eclipse.osgi_3.8.2.v20130124-134944.jar
    equinox.use.ds = true
    osgi.user.area = $USERPROFILE$/AVIX/user/
    osgi.bundles = reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.301.v20120914-163612.jar@1\:start
    org.eclipse.equinox.simpleconfigurator.configUrl = file\:org.eclipse.equinox.simpleconfigurator/bundles.info
    osgi.configuration.cascaded = true
    eclipse.product = se.solme.avix.application.rcp.avixProduct
    osgi.splashPath = platform\:/base/plugins/se.solme.avix.application.rcp
    osgi.framework.extensions = reference\:file\:org.eclipse.birt.jetty.overlay_4.2.2.v201210101433.jar,
    reference\:file\:org.eclipse.osgi.nl_de_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_es_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_fi_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_fr_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_it_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_pl_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_pt_BR_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_ru_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_sv_4.2.0.v20131123041006.jar,
    reference\:file\:org.eclipse.osgi.nl_zh_4.2.0.v20131123041006.jar
    osgi.bundles.defaultStartLevel = 4
    eclipse.application = se.solme.avix.application.rcp.avixApplication
    eclipse.p2.data.area = @config.dir/../p2/
    common_defaults_file = $USERPROFILE$/AVIX/se.solme.avix.prefs
    avixlogfile.location = $USERPROFILE$/AVIX/

    SE.SOLME.AVIX.PREFS FILE

    An example of a user unique “common_defaults_file” file that could be set to control the multi user scenario.

    Example for a hypothetical user “John Johnson”

    • config.ini file has been updated like above
    • The environment variable USERPROFILE=C:/Users/johnjohnson

    The file “C:/Users/johnjohnson/avix/se.solme.avix.prefs” could have the following content to provide a unique directory location for license data and a unique single instance port

    [se.solme.avix.licensing]
    avix.licensing.home=C:/Users/johnjohnson/avix/license
    [se.solme.avix.application.rcp]
    avix.singleinstance.port=34543

    LOG4J.PROPERTIES FILE

    Example of a log configuration file that uses the java system variable avixlogfile.location to create user unique log files.
    The content below should be put in a text file placed in the root of the AVIX application installation.
    User unique log files will be created in the folder ${avixlogfile.location}/logs/.
    The java system environment variable avixlogfile.location is set up in the config.ini file.

    # Set root logger level for the appenders
    log4j.rootLogger=INFO, A1, AVIXFileAppender

    # A1 is set to be a ConsoleAppender.
    log4j.appender.A1=org.apache.log4j.ConsoleAppender
    log4j.appender.A1.layout=org.apache.log4j.PatternLayout
    log4j.appender.A1.layout.ConversionPattern=%d{yyyy MMM dd HH:mm:ss,SSS} [%r] - [%t] %-5p %l %x - %m%n

    # File appender for logging
    log4j.appender.AVIXFileAppender=org.apache.log4j.RollingFileAppender
    log4j.appender.AVIXFileAppender.File=
    ${avixlogfile.location}/logs/avix4Logfile.log
    log4j.appender.AVIXFileAppender.MaxFileSize=5MB
    log4j.appender.AVIXFileAppender.MaxBackupIndex=5
    log4j.appender.AVIXFileAppender.layout=org.apache.log4j.PatternLayout
    log4j.appender.AVIXFileAppender.layout.ConversionPattern=%d{yyyy MMM dd HH:mm:ss,SSS} [%r] - [%t] %-5p %l %x - %m%n