OmegaT as a RMI server

The patch P-3 enables to share the project memory (as an implementation of patches P-1 and P-2) between OmegaT users without the need of any server : in fact, one of the translators has to be elected as a server, and the others will connect to his computer as clients. The server is not a special computer, simply a running instance of OmegaT, in GUI mode. Maybe the translator offering the service will encounter some performance issues, but we did not see them until now.

Configuring a server

You must start OmegaT with some more parameters. Maybe you should put them in a separate bat or sh file:

OmegaT --server-port=12345 --server-object=Something ...other parameters...

The first added parameter is the port used by RMI. The second can be any valid Java Name, it does not matter. Simply notice that you will have to give this name later to the clients.

Servers have actually 3 ways to work. Clients are compatible with all of them, without any change in their configuration.

  • As GUI :
    This is the default mode. One translator is designed to host the server, starting OmegaT with the command described before. Then he continues to work the same way as for clients, he will see client's work in his computer as well. Simply be careful that this user must be the first who opens the project (else, clients will not be allowed to connect), and the last one who leaves it (because clients must be connected all the time).
  • As project server, without GUI
    If you did not success to decide which user is the server, you can almost decide for a computer. Add --mode=CONSOLE_RMI in the command-line, meaning that no GUI will be started for this instance, and give a project to be loaded: the server will host this project, answer to all client requests (searches as well as updates), and save the project every five minutes as the GUI would have done.
  • As RAM server
    Using --mode=CONSOLE_RMI without a project, you will open an other mode, the RAM server. This server simply keeps in RAM all translations sent by clients, including entry key contexts, but does not rely to any project. There is no save, the clients are responsible for keeping the data in their computer.

Client : Connection to the same language

In your project, create a project_save.properties file (yes, .properties, not .tmx) in the same location where should be the project_save.tmx ; in this file put the following lines:

class=org.omegat.core.matching.external.rmi.Client
url=rmi://host:12345/Something

where host is the name or the IP address of the server, 12345 the port number (elected in previous step), and Something to be replaced by what the server translator decided to give as server-object. Normally when he started OmegaT, he received the correct URL in the console and should have given it to you. That's all : now you can share the project until the server OmegaT instance is down. This is a read-write share: not only the server will send you its translations, but it will receive yours as well. Except maybe for the performances, there will be no differences between what client and server sees: the decision, who will be the client and who will be the server, has in practice no importance.

Once you are connected, you can read here how to use the service.

Client : Connection to an other language

It is also possible to use the feature "other language memories" using the RMI server. This works only as a client : the server always provides its own source and target languages, but it can be contacted by people from other target languages to have in real time the already translated segments as a foreign language information. To do this create a file with the same contents as in the previous section, but put it in directory tm/tmx2source , with the name [lang].properties where [lang] is the target language of the distant project. Then start OmegaT and enjoy the result.