× News Cego SysMT Croom Web Statistics Impressum
SysMT Logo

Closed room messenger

An approach for a private conversation framework

1   Croom server

Back to TOC

1.1   Overview

During the last years, several messenging applications have been arised on the mobile market. And it is still growing. In general the mobile application is installed on an appropriate device and then it connects to any server, which is hidden by the application. Normally the end user has no further information about the service infrastructure.

Croom follows a different approach. In addition to the application software for the mobile device, also the server software is available. This gives a transparent view and enables interested people to build up their own messaging infrastructure. As a consequence of an open framework, a closed messaging service for specific purposes could be build up. The following picture illustrates the open architecture of croom.

As the central component of the architecture, the java based croom server manages a connection pool to the croom database. All relevant user administration and messaging data is stored in the database and is accessed by a standard JDBC protocol. The croom server serves requests from any configured mobile device but it is should also be possible to connect to the server from a web client. Furthermore, a server-to-server communiation can be used, e.g. to propagate notification messages from another managed host.

The Croom messaging framework is based on a three tier client-server architecture, which can be setup and operated in a very convenient way. This chapter describes all required steps, to install and run a Croom server enviroment.

1.2   Requirements

The Croom server software is delivered as a tar-ball and contains all required scripts and programs based on the following requirements

The cego database is available as an open source product at www.lemke-it.com. For several Unix distributions (e.g. FreeBSD, Fedora Linux), cego is available as a precompiled package and can be installed very easy. For detailed information about the cego database, please refer the corresponding documentation at www.lemke-it.com.

1.3   Database Setup

Croom requires a cego dataabase configuration, which can be created from scratch using the utility script mkcroomdb. If there is already an existing cego database configuration avaiable, you just have to create a new croom database user and croom tableset manually.

$ cd db
$ ./mkcroomdb
Init database xml ...... operation ok
Creating admin user ...... operation ok
Creating role ...... operation ok
Creating role ...... operation ok
Defining tableset croomts...... operation ok
Creating database user for croomts ...... operation ok
Creating tableset croomts...... operation ok

The required database objects are created with the SQL scripts

If no database daemon has started yes, the database objects can be created with the following command

$ ./create_objects
...

Otherwise, all objects can be created manually using the cego database client. For this, an appropriate cgprofile entry has to be created in the database users home directory.

The base SQL script creates an admin user entry for user croom with the initial password croom. This user should be removed or the password should changed, after appropriate admin users have been created.

$ cgclt --profile=croom --batchfile=croom_tab.sql
...

1.4   Running the Croom Server

The croom server package contains a runnable jar file, which requires several startup parameters. You can use the following script as a template.

#!/bin/sh
CROOMHOST=croom.lemke.it.com
CROOMPORT=4242
CROOMTHREAD=10
DBURL=cegojdbc:croom.lemke-it.com:2250:croom
DBUSER=croom/croom
MINDBPOOL=5
MAXDBPOOL=10
MAXDBCON=15
DLETIMEOUT=180
LOG4J=log4j.properties

nohup java -jar croomserver.jar --host=$CROOMHOST \
      --port=$CROOMPORT \
      --numThread=$CROOMTHREAD \
      --dbUrl=$DBURL \
      --dbUser=$DBUSER \
      --minDbPool=$MINDBPOOL \
      --maxDbPool=$MAXDBPOOL \
      --idleTimeout=$IDLETIMEOUT \
      --log4j=$LOG4J  & 
echo $! > croom.pid 

Please set up the right parameter values for your server configuration and save it as startcroom. The you just can start the server with

$ ./startcroom

For stopping the server, you should send a SIGINT

#!/bin/sh
kill -INT `cat croom.pid`

Please note : It seems the for OPenJDK environments, the Signal handler does not work properly. If you use OpenJDK, you should send a SIGTERM to force termination of the java process.

1.5   Server design issues

The following picture illustrates the croom state and message concept