This applet is currently disabled; it will be back soon

Welcome to the KlavaApplet example

When you load the page with the applet the following screen will appear:

here you can choose the physical locality with which you'll connect to the Net server. The Net server address (and port) should be left unchanged (due to applet security restrictions, you can only connect to the same server the applet comes from, unless you choose a different security policy). Then you can press login, and you'll enter the Net server; it might take a while to establish the connection, and you will see messages in the System Messages area. If the connection is established a new window will pop up:

This is the typical KlavaNode window:

Processes running in the example

There are two processes running in the node in this example:

AppletTestProcess reads from the keyboard the locality (peer) with which we want to communicate, and then enters a while loop (until string QUIT is entered) and sends every input string (in(!string)@keyb) to the remote locality (out(string)@peer):

rec AppletTestProcess[]
    locname screen, keyb ;
    var peer : loc ;
    var string : str ;
    var again : bool
    out( "Insert the locality to communicate with\n" )@screen ;
    in( !peer )@keyb ;
    out( "You chose: ", peer )@screen ;
    out( "Insert a string to send to ", peer )@screen ;
    out( "or QUIT to terminate\n" )@screen ;
    again := true ;
    while again do
      in( !string )@keyb ;
      if string = "QUIT" then
        again := false
        out( string )@peer
    enddo ;
    out( "Thank you, BYE BYE\n" )@screen 

ReceiverProcess continously extracts strings from the local tuple space (in(!string)@self) and shows them on the local screen (out(string)@screen)

rec ReceiverProcess[]
    locname screen, keyb ;
    var peer : loc ;
    var string : str ;
    var again : bool
    while true do
      in( !string )@self ;
      out( "RECEIVER : " )@screen ;
      out( string )@screen ;
      out( "\n" )@screen

You may test this example by choosing to communicate with the same locality you connected to the Net, or by opening another browser window, launching another applet and login with another locality.

In the xxx_keyb text area you have to insert the name of the locality you want to communicate with, specifying that the string you entered is of type loc: i.e. if you want to communicate with locality foo you have to insert foo:loc. And then press ENTER or click on the OK button. Then you can start typing strings on the same textarea (if no type is specified, string is assumed) and press enter when you want to deliver that string (ESC or Cancel button will erase the current content of the textarea); when you are done you have to type string QUIT.

You can disconnect from the Net by:

Note that both screen and keyb are logical locality, mapped to the right physical locality by the environment (see the picture of the node above).

You may want to take a look at and at the xklaim compiler generated files for the processes above: and

Now you may want to try this applet (note that you need a Java 1.1.x enabled browser; Netscape 4.5 and Internet Explorer 5 should work fine; we had some problems with Internet Explorer 4):

please alway refer to this page to access the applet, whose place is likely to change in the future.

Send any bug to 

Last Update 01/08/2003