discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Transparent distributed objects in StepTalk


From: Stefan Urbanek
Subject: Transparent distributed objects in StepTalk
Date: Tue, 04 Jun 2002 20:14:46 +0200

Hi,

I have extended StepTalk with 'Object Finders'. Object finder is an object
that will search for object by specified name. Currently there is just one
object finder called DistributedFinder that will search for registered DO
objects. 

It is currently in the CVS repository. I am going to create a release soon.

How it works?
-------------
If you use a name of probably 'unknown' object in a script, the StepTalk will
try to find the object using object finders.You may register as many object
finders as you want.

Distributed finder
------------------
This will try to find the object as a registered gnustep DO object. If it will
be not possible to find it, it will try to launch a tool that is providing the
object.

Distributed finder has to know about all well-known objects. The information
about objects is stored in the */Library/StepTalk/DistributedObjects directory
and for each object there is one configuration file.

Here is an example of a file for pasteboard server
.../Library/StepTalk/DistributedObjects/PasteboardServer.plist 

{
    Host = "localhost";
    Tool = "gpbs";
    ObjectName = "GNUstepGSPasteboardServer";
}

Example
-------
If you want to try it, create the file and run stshell:
If gpbs is not running, you will see (the NSLogs will be removed in the
future):

StepTalk > PasteboardServer 
2002-06-04 20:09:19.439 stshell[1746] Looking up 'GNUstepGSPasteboardServer'
at 'localhost'
2002-06-04 20:09:19.541 stshell[1746] Launching 'gpbs'
2002-06-04 20:09:24.649 stshell[1746] Looking up 'GNUstepGSPasteboardServer'
at 'localhost'
0: <NSDistantObject 82c8c30>

if gpbs is launched:

StepTalk > PasteboardServer 
1: <NSDistantObject 82c8c30>

Host is a name of the host where the object resides. ObjectName is name of the
object to be connected and Tool is name of a tool providing the object. Name
of the file is name of the object used in a script.

Distributed Object-info file
----------------------------
The object-info file may contain:

{
    Host = "default host name";
    Hosts = ( list of hosts to be searched );
    Tool = "name of a tool that will register the object";
    Arguments = (tool arguments);
    Name = "name of the object to be connected";
    Wait = seconds to wait before connection after the tool is launched;
}

StepTalk Shell note
-------------------
TAB completition works for objects known by the finders.

Other finders
-------------
Another finder is on its way: ApplicationFinder. It will try to find an
application by its name and if it is not running it will try to launch it.

Any comments, patches and bug-reports are welcome.

Have fun,

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]