Wednesday, October 18, 2006

RMI for Client/Server?

Matrex 1.0 final is almost ready, so I'm thinking about the future of the system.
As you know, there will be at least two main versions after 1.0:
  • 1.1, with improvements in various areas of the desktop application.
  • 2.0, which will introduce the client/server architecture
With version 2.0, it will be possible for a Matrex desktop (or client) to connect to a Matrex server.
The server will host Matrex projects shared among serveral clients.

Matrex has been tought from the start as configurable as a client/server architecture, so it should be not very difficult to introduce the new architecture.

Anyway, some problems remained unresolved for a while, for example which protocol to use to connect client and server.
To choose it, I considered these facts:
  • The clients and servers can reside on a LAN, it does not make sense to have internet connections.
  • At least in a first stage only Matrex java clients will connect to the servers. If other programs need to use Matrex to calculate they can directly use the matrex API.
  • Performance is very important. The users expect the system to calculate fast even if it works in a network.
Here are the candidates possibilities:
  • SOAP
  • CORBA
  • Jini
  • RMI
The advantage of CORBA and SOAP is the compatibility with different platforms and languages; but this is not needed.
SOAP messages can pass through a firewall, but since Matrex just needs to work in a LAN, this is not needed.
On the other side, SOAP is the slowest protocol and CORBA is loosing popularity.

Jini gives high realiability and performance, but it is very complex. Using Jini for Matrex is like to hunt birds with tanks.

RMI is the right choice for Matrex. It is sure not the most recent (it was available already in Java 1.1) but it works fine, is fast and requires less coding, because is made exclusively for java.

Monday, October 02, 2006

SWT Wizard Component

I extracted from the code of Matrex 1 class and 2 interfaces to implement a generic wizard with the SWT GUI library.
It is used to implement the expression parser in Matrex:



You can find the code under the wizard directory in the Matrex CVS repository.
The license of Matrex is GPL, but may be for the wizard code it can be changed to LGPL.