Skip to content
March 25, 2013 / jkeznikl

SOFA 2 Goes to WordPress

Since the posterous service is going to be terminated, we decided to migrate the blog to the WordPress platform. The blog should continue to work as before.

So, check out SOFA here! And stay tuned!

October 20, 2011 / jkeznikl

SOFA 2 HOWTO: Compilation & Installation of SOFA 2 JME Profile

Recently, we have updated the build mechanism for the JME profile ofSOFA2. In the newest version, the necessary steps for building andsetting-up the SOFA2 JME are as follows.

First, checkout the latest revision of the SOFA project.

svn checkout svn://svn.forge.objectweb.org/svnroot/sofa/trunk .

Compilation

To compile the current SOFA2 JME version, go to the trunk/builddirectory and run

ant cleanant jme

As a part of the build process, also the current version of the projectscongen, sofa, sofa-j, and cushion are compiled (without thenewest version of congen, a SOFA2 JME application cannot be compiled for the JME platform).

Installation

To create the SOFA2 JME executable distribution go to the trunk/distdirectory and run:

ant jme

This assembles the distribution and initializes the micro-logdemo example.The distribution will be created in the directories:
trunk/dist/output/cushion
trunk/dist/output/sofa

The micro-logdemo JME application is represented by:
trunksofa-jtrunkexamplesmicro-logdemocomponentsmidlet.jad
trunksofa-jtrunkexamplesmicro-logdemocomponentsmidlet.jar

which can be executed by calling for example

emulator -Xdevice:DefaultCldcPhone1 -Xdescriptor:midlet.jar

For further details seetrunksofa-jtrunkexamplesmicro-logdemoREADME.

After creating the executable distribution, configure it by running thetrunk/dist/sofa-env.bat[.sh] script, which sets the SOFA2 JME environmentvariables.

Application Development

SOFA2 JME application development is similar to standard SOFA J. Thedifference lies in the deployment step. SOFA2 JME introduces a newCushion action midlet which for a given deployment plan assembles anexecutable JME midlet (thus the midlet action should follow thedeploy action). Se the micro-logdemo example for further details.

For additional information seehttp://sofa.ow2.org/extensions/index.html#microedition.

February 10, 2011 / jkeznikl

SOFA 2 0.8.0 released

The new release brings several major improvements including:

  • General refactoring and partitioning of the codebase, introduction of platform-specific profiles
  • SOFA HI profile for C programming language supporting real-time requirements
  • SOFA for Java ME profile enabling deployment of SOFA 2 applications on Java ME platform
  • Dynamic SOFA extension introducing dynamic language support into the Java SOFA profile and enabling rapid prototyping of SOFA applications (sing component aspects)
  • Extensive bug fixes
  • Several new examples including examples for each profile and extension

 

November 26, 2010 / jkeznikl

SOFA-J HOWTO: Good practices

1. What is a code bundle and how do I use it?

Code bundle in SOFA 2 is a package containing source code. Every SOFA 2 element (interface type, architecture etc.) has its own implicit code bundle in which the associated code (Java interface, Java class implementing the component architecture etc.) is stored. A developer can also define his own code bundles which would contain additional source code.

Every code bundle (including the implicit ones of the interface types and architectures) can define its dependencies on other bundles (like in OSGi). Upon compilation and instantiation of the particular code bundle, the dependent bundles will be automatically added to the classpath.

2. How to share code between components?

A component implementation is part of the component architecture definition and is stored in the associated code bundle. To share code between several components (i.e. architectures, i.e. code bundles) the shared code has to be put in a standalone (user-defined) code bundle and all the component architectures should define dependency on this shared bundle.

3. Inheritance of component architectures

Inheritance of the component architectures as component model elements is not possible in SOFA 2. To allow inheritance of the component implementation, the best way is to put the common ancestor implementation in the shared standalone code bundle and define a dependency on this shared bundle in both component architectures.

It is also possible to define a dependency on the implicit code bundle of the parent component. In that case, the code bundle name would be like this: {full name of the architecture}.code.

4. Common SOFA build system issues

The SOFA 2 project uses the Apache Ivy dependency resolver. It uses a local cashe for all resolved and downloaded packages. It is possible that the Ivy cache becomes inconsistent, in which case it can lead to weird compilation and runtime errors. A simple solution is to clear the Ivy cache (by deleting the .ivy2 directory in the user’s home directory) and let Ivy download all required packages again and build the cache from scratch.

5. Connector generator issues during deployment

The SOFA connector generator (congen), which is used to automatically generate code for connection of the individual components, uses the connector cache to store the generated connectors. The cashe is stored in the temp directory. In Windows it is usualy in the Documents and Settings{username}Local SettingsTempsofa2-conrep-{username} directory. If you are experiencing some errors during connector instantiation, It could help to delete this connector cache.

November 9, 2010 / jkeznikl

SOFA-J HOWTO: Compilation & Installation

Requirements

The Apache Ant and Apache Ivy tools are used for compilation and distribution ofthe SOFA-J implementation and therefore must be installed and configured onthe host computer. Moreover, the Ant-Contrib Ant task library must be installed.

Compilation

First of all, you must download the current trunk version from the SVNrepository using

svn checkout svn://svn.forge.objectweb.org/svnroot/sofa/trunk .

To compile the current SOFA-J version, run ant in the followingdirectories in the given order (use the default task):

sofa/trunk/buildsofa-j/trunk/buildcushion/trunk/build

Installation

To create the current SOFA-J distribution from the compiled files, runant in the following directories in the given order (use the default task):

cushion/trunk/distsofa-j/trunk/dist

The distribution will be created in the sofa-j/trunk/dist/output/distdirectory.

To complete the installation, the environment variables must be updated.To do this, you could use the following scripts (run them in the currentdirectory)

Windows (sofa-env.bat):

@echo off set PRGDIR=%~dp0 echo Setting SOFA_HOME set SOFA_HOME=%PRGDIR%sofa-jtrunkdistoutputdist echo Setting CUSHION_HOME set CUSHION_HOME=%PRGDIR%cushiontrunkdistoutputdist echo Adding bin dirs to path. set PATH=%PATH%;%SOFA_HOME%bin;%CUSHION_HOME%bin

Unix (sofa-env.sh):

#!/bin/bash PRG="$0" PRGDIR=`pwd "$PRG"` echo "Setting SOFA_HOME" export SOFA_HOME=$PRGDIR/sofa-j/trunk/dist/output/dist echo "Setting CUSHION_HOME" export CUSHION_HOME=$PRGDIR/cushion/trunk/dist/output/dist echo "Adding bin dirs to path." export PATH=$PATH:$SOFA_HOME/bin:$CUSHION_HOME/bin

After this step, the SOFA-J distribution should be fully configured inthe current terminal.

Running a simple application

To run a simple application called ‘logdemo’ (which was installed alongwith the SOFA-J distribution), you have to start several facilities (seedocumentation for explanation).You will need 3 terminals (consoles, shells, …) configured (see theprevious section).Run the following command in each terminal according to the numbers.

  1. start the SOFAnode facilitiessofa-node.sh/bat

  2. start the deployment dock with appropriate name (here ‘nodeA’)sofa-dock.sh/bat nodeA

  3. launch the applicationsofa-launch.sh/batorg.objectweb.dsrg.sofa.examples.logdemo.deplplan.Local current

For information about application development seehttp://sofa.ow2.org/docs/howto.html

August 2, 2010 / jkeznikl

SOFA goes to posterous

SOFA project provides a component system offering numerous advanced feateres like hierchical component, transparent distribution based on automatically generated software connectors, behavior specification verification, advanced Eclipse-based modeling tool, runtime management tools and so on.

SOFA project is still under heavy development primarily thanks to students of Charles University in Prague. They have many bright ideas, they are hard working and they have fun of developing something new.

They are the main reason why this SOFA project Posterous was created. It should provide a space, where students can publish their results in informal way, where they can express their ideas and receive feedback from a broad audience.

So, check out SOFA here! And stay tuned!

Follow

Get every new post delivered to your Inbox.