======================================================================

This directory provides a general scripting engine OMG IDL API,
an implementation of this API and a interactive shell to deal with them.

  * README is this file.

  * scripting.idl defines a general scripting engine OMG IDL API.
    This API is NOT CorbaScript specific!

  * ScriptingImpl.cs implements the scripting.idl API.
    Here of course, the engine could only evaluate scripts written
    in CorbaScript ;-)

  * server.cs starts a CORBA server providing a scripting engine.
    See comments in this script for security issues.

  * ScriptingShell.cs implements an interactive shell to deal with
    any remote scripting engine implementing the scripting.idl API.

  * client.cs starts a shell to a remote scripting engine.   

======================================================================

To start a scripting engine and store its IOR into the local Name
Service, this looks like "cssh server.cs ns:a_NS_path", e.g.:

	unix> cssh server.cs ns:my_engine

To start a scripting engine and store its IOR into a file,
this looks like "cssh server.cs file:a_path", e.g.:

	unix> cssh server.cs file:/tmp/engine.ior

======================================================================

To start a shell to a remote scripting engine obtained by IOR,
this looks like "cssh client.cs IOR:...."
             or "cssh client.cs iioploc://host:port/a_POA_path"
	     or "cssh client.cs iiopname://host:port/a_NS_path"

To start a shell to a remote scripting engine obtained by the local
Name Service, this looks like "cssh client.cs ns:a_NS_path", e.g.:

	unix> cssh client.cs ns:my_engine

To start a shell to a remote scripting engine obtained by a file,
this looks like "cssh client.cs file:a_path", e.g.:

	unix> cssh client.cs file:/tmp/engine.ior

To start a shell to a remote scripting engine obtained by a Web server,
this looks like "cssh client.cs http://host[:port]/file", e.g:

	unix> cssh client.cs http://corbaweb.lifl.fr/IOR/engine

======================================================================

Here is an interactive example:

# Execute the CorbaScript environment script.
unix> source $CS_BINDIR/envi.ORB.csh
# Start the ORB, the Interface Repository and the Name Service.
unix> cssh_install
# Load the Name Service OMG IDL into the Interface Repository.
unix> ir_load $CS_HOMEDIR/idl/CosNaming.idl
# Go to this demonstration.
unix> cd $CS_HOMEDIR/demo/remote_cssh
# Load the scripting OMG IDL into the Interface Repository.
unix> ir_load scripting.idl
# Start a scripting engine server.
unix> cssh server.cs file:/tmp/engine.ior &
# Start a scripting engine shell.
unix> cssh client.cs file:/tmp/engine.ior
Remote Scripting Engine Shell 1.0
For instructions, type 'help'.
Engine> help
.....
Engine> script
script> println("Hello World!")
script> return true
script> 
Sends the script to the remote scripting::Engine.
output> Hello World!
The result is CORBA::Boolean(true)
script>
Engine> file hello_world.cs
Sends the script to the remote scripting::Engine.
output> Hello World!
The result is CORBA::Boolean(true)
Engine> session
Creates a session to the remote scripting::Engine.
Remote Scripting Session Shell 1.0
For instructions, type 'help'.
Session> help
...
Session> script
script> i = 1
script> 
Sends the script to the remote scripting::Session.
The result is CORBA::Void()
script> i
script> 
Sends the script to the remote scripting::Session.
The result is CORBA::Long(1)
script> 
Session> file hello_world.cs
Sends the script to the remote scripting::Session.
output> Hello World!
The result is CORBA::Boolean(true)
Session> close
Sends a close session to the remote scripting::Session.
Engine> declare_script hello
script> println("Hello World!")
script> return true
script> 
Declares the named script to the remote scripting::Engine.
Engine> list
Lists named scripts to the remote scripting::Engine.
 - hello
Engine> execute hello
Executes the named script to the remote scripting::Engine.
output> Hello World!
The result is CORBA::Boolean(true)
Engine> start hello
Starts the named script to the remote scripting::Engine.
output> Hello World!
The result is CORBA::Boolean(true)
Remote Scripting Session Shell 1.0
For instructions, type 'help'.
Session> close
Sends a close session to the remote scripting::Session.
Engine> declare hello hello_world.cs
Declares the named script to the remote scripting::Engine.
Engine> list
Lists named scripts to the remote scripting::Engine.
 - hello
Engine> delete hello
Deletes the named script to the remote scripting::Engine.
Engine> list
Lists named scripts to the remote scripting::Engine.
Engine> exit
unix>

======================================================================
