SciCoDE Remote

From Sccswiki
Revision as of 06:54, 8 August 2011 by Atanasoa (talk | contribs)
Jump to navigation Jump to search

Remote components in sciCoDE

In many cases the user want to execute his code on remote machines (e.g. run a simulation on a supercomputer). sciCoDE provides a way to create remote components.

The C++ remote code

If you want to use your C++ application inside sciCoDE as remote component you should generate some stubs needed to establish the connection between the core of sciCoDE and your component. One of the communication methods provided by sciCoDE is a file-based protocol, which can be used on arbitrary systems connected through SSH and SFTP. The SSH implementation is based on the library.

As previously described the components in sciCoDE are specified through a simplified version of SIDL. Only four data types are allowed : strings, doubles, longs and booleans. This types can be used as in, inout and array parameters. This simplification makes the implementation of communication protocols much more easier. The most important part of the SIDL specification are the interfaces ,which are mapped to ports. In the file-based protocol each port is represented through folder on the file system. Consider the following SIDL-code:

package example{
  interface YourInterface{
    foo(in int in0,out int[] out0);
  }
  class A implements-all example.YourInterface{
  }
  class B uses example.YourInterface as p0{
  }
}

The following steps are needed to prepare you C++ code:


Generating private/public key pair for the SSH connection

There are different authentication methods through ssh. One method, which could enable password-less connection is through public/private-key pairs. Here the authentication is done through the private key of the user. The server checks if the user is authorized to communicate with him. The steps to generate this pair are the following:

  • Login on the remote computer (GSISSH in Deisa, normal ssh with pwd).
  • Run ssh-keygen -t rsa - here type an empty password when asked,
  • append the content of the file ~/.ssh/authorized_keys with the content of public key <name>.pub
  • copy the private key on your local machine
  • To test the key pair run your ssh/scp/slogin commands with -i <your-private-key>