# ACEDB User Group Newsletter - March 2002

If you want to have this newsletter mailed to you or you want to make comments/suggestions about the format/content then send an email to acedb@sanger.ac.uk.

## General News

This months sees a new package for accessing the socket server using the C programming language, also a new Java package for the same purpose. Otherwise it has been a month of bug fixes and more work on the new smap code.

## New Features

### AceConn a C package for accessing the Socket Server.

Previously there were the following ways to access the socket server:

- saceclient: a command line based program that could be driven by scripts.
- AcePerl: perl package interfacing directly to the socket server.
- BioJava: contains a package interfacing directly to the socket server (but also see next article).
- BioPython: contains a package interfacing directly to the socket server.

  There was no package for a client written in C to interface to the server.

  This gap has now been filled with a new package called AceConn. This is a small library of C routines enabling a C based client to interface to the server. The main components of the interface are:

  AceConnCreate():
    creates the initial connection structure which is the handle for all subsequent calls to the package routines.
  AceConnConnect():
    makes the intial connection to the server doing all the necessary hand shaking, if this call succeeds then the client can start sending requests.
  AceConnRequest():
    Sends a request to the server and returns the reply.
  AceConnDisconnect():
    terminates the connection to the server doing all the necessary handshaking.
  AceConnDestroy():
    Frees the connection allocated by AceConnCreate().

  The interface sends text commands just as the user would type in when using saceclient and then returns the reply from the server in a buffer. Usually this reply is text but it could be an image as produced by some of the gif subcommands. The client must parse the returned data itself.

  Each request will wait for a client specified number of seconds before timing out. The timeout may be set to zero for the client never to timeout, or negative to reset to the default timeout (120 seconds). This allows the client code to retain control of how long it remains blocked waiting for a request.

  If a client makes a request that produces a very large reply, the server returns the reply in slices so that other requests from other clients can also be processed. The AceConnRequest() call automatically batches up these requests into a single reply. While this is convenient you should be aware that this can lead to the client using up considerable amounts of memory for large requests.

  You can see further documentation by downloading the Ace-Conn package from the acedb website.

  ### A useful new Java package for accessing the socket server.

  Kemin Zhou formerly of Affymetrix has contributed a Java package for accessing data from the socket server. You can download the package from the acedb web site: Java-Zhou package

  Kemin's description:

  "This simple package is meant to give a basic interface to ACEDB. You can view the documentation with webbrowser

  Type netscape index.html then you are there.

  You need to put the acedb directory in your CLASSPATH Or just use the ace.jar file. In you java program say import acedb.*;

  You have to set up your own Acedb and Saceserver, that is not difficult.

  This package is to be used by programers who knows both Java and ACEDB."

  ## Bugs Fixed

  ### No "read models" in client/server interface.

  It is not possible to use the "readmodels" command from the client. The client/server interface does not support the level of interaction required for this operation currently.

  ### Missing test for "wspec/database.wrm" at initialisation.

  The code did not explicitly test for the system file "wspec/database.wrm" with the result that an obscure error message was displayed some way into program initialisation. Now if the file is missing an error message issued and the program exits.

  ### Fixed hard to reproduce bug in print dialog

  Acedb sometimes hung when the print dialog was displayed, this is now fixed.

  ### Old bug in fmap dna display.

  An obscure bug in the display of dna within the fmap meant that if you zoomed in until there should be just two bases per line, only one was shown ! This is now fixed.

  ## March monthly build not available.

  Apologies, once again there was no build this month due to the major SMap development work.

  Last modified: Mon Nov 11 08:59:59 GMT 2002