aceMedia Framework

DOWNLOAD the aceMedia Framework package

1. Introduction

aceMedia (www.acemedia.org) was a collaborative research project from the European Union Sixth Framework Programme, in the area of multimedia semantic analysis and processing.

This package contains the aceFramework, the base package built by the aceMedia project for the creation of multimedia semantic applications. For an overview of the aceFramework and its components, see [1].

The aceFramework is released as free software; see the acompanying LICENSE file for details.

2. Installation

2.1 Platform

This package has been developed on CentOS Linux (www.centos.org), and works in both CentOS 4 and CentOS 5 (as well as in Red Hat Enterprise Linux, from which CentOS is a free clone). It should be easily ported to other linux distributions, although it has not been tested. For MS-Windows the basic structure is also right, although the provided management scripts will not work, unless a suitable unix shell is available (early versions were successfully tried against the Cygwin environment, but it has not been tested later).

2.2 Prerequisites

On top of your standard CentOS Linux distribution, you will need:

2.3 Building

Upon successful termination a base aceFramework will be deployed in ACEMEDIA_HOME (by default /usr/acemedia), with a few bundles installed (the acecore & httpmanager bundles and the useradmin & aceio applications). From then on, you can start & stop the framework by using the aceservices script:

ACEMEDIA_HOME/bin/aceservices start
ACEMEDIA_HOME/bin/aceservices stop

At any moment you can see the list of installed aceMedia OSGi bundles with the command

ACEMEDIA_HOME/bin/acefw -l

3. Directory layout

Once installed, the structure under the base directory is as follows:

bin		  Shell scripts for compiling & launching aceMedia applications
class	  Compiled aceMedia classes
config	  Configuration files for some aceMedia components
doc		  Miscellaneous documents
javadoc	  Java API of the aceMedia core packages
lib		  aceMedia compiled packages
lib/bundle	       acemedia packaged bundles
lib/devel	       additional support Java libraries (only needed for
compilation; at runtime they are used from the bundles)
lib/native	       additional support native libraries
mf		  Manifest files used to create example aceMedia OSGi bundles
share
data		Some media files and examples (still mostly empty)
sql		SQL scripts for database management
src		  Java source for example aceMedia applications & AMs
var
var/log		Log files
var/osgi		OSGi framework persistent data, incl. installed bundles
var/mediadb	Storage are for aceRepository media files
var/bdldata	Private static data for aceMedia bundles

4. aceFramework users

All operations within the aceFramework need a valid aceFramework username (which is different than a system login name). The installation creates a default aceadmin user (with password aceadmin). New users can be defined and modified by using the ACEMEDIA_HOME/bin/aceusr script.

5. Examples

The src directory contains a couple of examples that use the provided management scripts. You can compile them with the acecompile script, and install/run them with the acefw script.

See doc/examples.txt for a description of the examples and the way to run them

The directory contains also simple utility applications, among them the UtilUserAdmin bundle to manage the table of aceMedia users, and the UtilAceIO for repository export & import. However those are most easily executed through the aceusr & aceio utility scripts.

6. Preparing and installing your own AMs or applications

The management scripts can be used to compile and install OSGi bundles, both AM bundles and application bundles. An aceMedia AM and an aceMedia Application are actually the same thing in terms of software packages: both are OSGi bundles (and therefore Java JAR files) that use the services provided by the aceMedia core bundle. The difference is in their activator class:

The scripts assume a certain directory structure of the project to be compiled: they should be run from a base directory containing these subdirectories:

"src" or "java_source": java source files
"class" or "java_classes": place to put java classes
"lib": place to put jar files
"mf": place to put OSGi manifest files
"config": place to put bundle configuration files
"data": place to put private data for bundles

The following is a brief summary of the steps needed to create and install an AM/App. For more details on AM development consult the relevant document, Developing aceMedia components [2].

Note: The scripts mentioned here are all in the <aceMediaHome>/bin subdirectory. Therefore to run it you need to add this directory to your PATH environment variable, or write the complete route when calling the script.

6.1. Compile the bundle

Once positioned in the base directory of the to-be-installed component, the command
acecompile -jar <jarname> -mf <mffile> -copy <src_sub> [<src_sub> … ]

will compile all Java source files in all the listed subdirectories, create an OSGi bundle with the given jarname and using the specified manifest file and copy it to its proper place in the aceMedia directory for future installation. Run it without parameters to see the available options (if the manifest file and the jarfile have the same name, you can drop the -jar option).

If the bundle needs to include other jar files or native libraries, use the -lib filename option to add them. Those files will be looked for in the lib subdirectory.

The manifest file should be in the mf subdirectory, and follow the OSGi manifest syntax (see doc/manifest.txt for more details).

There are two available variants:

  1. If you are using the Eclipse IDE (or any other) and prefer to generate the OSGi bundle directly from the IDE, just copy the generated bundle to /usr/acemedia/lib/bundle (more generally, to the lib/bundle subdirectory of your aceMedia SDK installation).
  2. If you compile from within the IDE, but want to use the acecompile script to generate the bundle, just make sure that the compiled Java classes are in the class subdirectory, and add the -noc option to acecompile to skip the compilation step.

6.2. Install the bundle within the aceMedia OSGi framework

Use the acefw script for that:
acefw -install_am <jarname>

to install an AM or

acefw -install_app <jarname>

to install an application (the difference is that AMs are installed and started, while applications are just installed, and must be then started with an acefw -r <id> command).

If you are updating an application/am already in the framework the recommendation is to uninstall the previous version first (acefw -u). Otherwise installation is done over the previous version and sometimes it seems that it is not actually updated.

6.3. Running applications

Installed application can be executed by using the acefw script with the id of the application bundle:
acefw -r <id>

If the application is going to need additional parameters, they can be passed as system properties by addding them after the bundle id:

acefw -r <id> name1=val1 name2=val2

by using this possibility, the application will then be able to retrieve e.g. the val1 string by using the System.getProperty( "name1" ) method. There are also other, somehow more sophisticated, approaches to pass a bunch of command-line options to a bundle, see the readOption method in src/org/acemedia/util/aceio/AceAppActivator.java for an example.

7. References

  1. A. Matellanes, A. May, P. Villegas, F. Snijder, A. Kobzhev, E.O. Dijk, An architecture for multimedia content management, 2nd European Workshop for the Integration of Knowledge, Semantics and Digital Media Technology, EWIMT 2005, London, UK, 30 November–1 December, 2005 Available at ewimt-2005-aceMedia-architecture.pdf
  2. Developing aceMedia components, available in thedoc subdirectory of this package.

8. Acknowledgements

The aceFramework includes packages developed by external groups. In particular, among others, the following: