ISO Standard for Headless Images? 
Author Message
 ISO Standard for Headless Images?

I'm developing classes that should run in headless images in VWNC, and finding
it's not completely straightforward.  I also suspect that I'll be porting the
interface to VAST and am dreading having to do something completely
different.  It's enough to make me want to use GNU st (which I'm going to
download as soon as I'm done with this message).

Does anyone know if the ST standard proposes or defines mechanisms for
creating non-GUI-enabled images?  Images that require only stdin, stdout, and
maybe stderr?

A while ago someone was curious about what would increase Smalltalk's
popularity.  I'll tell you one thing, if it were easier for systems
programmers to create Smalltalk programs they could run from the command line,
or at least run easily from a script, it would definitely increase it's
usefulness and utility to programmers who don't give a *RIP* about GUIs or
pretty user interfaces--which is a large market of programmers, if you think
about all the programs that run as CGI scripts.
--
Open Source middleware available at http://www.*-*-*.com/ ~tgagne/



Wed, 18 Jun 1902 08:00:00 GMT  
 ISO Standard for Headless Images?

Quote:

>I'm developing classes that should run in headless images
>in VWNC, and finding it's not completely straightforward.

Headless images aren't always needed.  One way is to just fire up a
Smalltalk server process, that may even be a GUI, and perhaps it communicate
via TCP/IP.  Then create a little C program that wraps the standard io and
communicates this via TCP/IP to the running Smalltalk image.  For some
systems, they might even want some GUI processes to monitor all the
currently active processes/scripts that are running.

But I agree, it would be nice if there were some example c wrapper code and
a simple implementation of a TCP/IP service that did this.  It would be cool
if this was standardized for all Smalltalk's and the same wrapper program
could be used for any given Smalltalk.  Perhaps the wrapper would specify an
IP address, port number, and a Smalltalk class name.

It would also be nice if there was a standard set of TCP/IP classes for most
Smalltalk dialects.  Who knows, maybe I'll get around to it some day.

Ian

----------------------------------------------------------------------------

----------------------------------------------------------------------------



Wed, 18 Jun 1902 08:00:00 GMT  
 ISO Standard for Headless Images?
In this instance, there is a remote execution daemon that the middleware
daemon asks to start programs on remote machines.  The remote execution daemon
is given a command line to execute and this is why I'd like to be able to
start a headless image from a simple command line or script.  There will also
be arguments the child needs to use to find the middleware daemon.

Another reasons I'd like them *not* to be in the same image is non-threaded
Smalltalks will hang (completely) if they make a blocking IO call in a
dlopen()ed library.  Since much of what I'm doing involves interfacing
Smalltalk to already-existing shared libraries, I'm not ruling out that those
shared libaries can (and do) make blocking function calls that I can't afford
to have arrest everything else going on in the image.  This is one of the
first problems I had with stx.

I did create a class in stx that I could communicate with via TCP/IP to
fork-off classes, complete with arguments.  In fact, the remote execution
object could tell the difference between classes it should fork and
executables it should start.  One of the things I didn't like about it was I
hate rewriting functionality that already exists, *and*, the VM would hang
when a shared libary did a blocking call...

--
Open Source middleware available at http://home.netcom.com/~tgagne/



Wed, 18 Jun 1902 08:00:00 GMT  
 ISO Standard for Headless Images?

Quote:

>Another reasons I'd like them *not* to be in the same image is non-threaded
>Smalltalks will hang (completely) if they make a blocking IO call in a
>dlopen()ed library.

Well then you may want a number of images running.. It would automatically
grow depending on the number of concurrent processes..  But then they would
not exit after they are finished, so that it's not so slow loading/unloading
of the images.  Perhaps a process would monitor this battery of images, and
would kill ones that aren't being used after a while.  But true, you would
need to use headless images in this case.  Even still, I imagine you would
still be using a wrapper process to communicate with the headless images,
unless for some unusual reason these processes are very long running.  Most
command line apps I've been familiar with often have a very short life.

Ian

----------------------------------------------------------------------------

----------------------------------------------------------------------------



Wed, 18 Jun 1902 08:00:00 GMT  
 ISO Standard for Headless Images?


Quote:

>>I'm developing classes that should run in headless images
>>in VWNC, and finding it's not completely straightforward.

>Headless images aren't always needed.  One way is to just fire up a
>Smalltalk server process, that may even be a GUI, and perhaps it communicate
>via TCP/IP.  Then create a little C program that wraps the standard io and
>communicates this via TCP/IP to the running Smalltalk image.  For some
>systems, they might even want some GUI processes to monitor all the
>currently active processes/scripts that are running.

I agree with Tom, easy and simple access to creation of headless images
is important.  I remember trying to fake out VW in the early 90's so
it would run without a display.  We tried ignoring the X traffic,
disabling it, and running to a X simulator (essentially a X version
of /dev/null).  The latter was the best.  The others always had a
problem or two.

The real test of a headless image is: can I run it on a unix workstation
without X, without any user logged in (no /dev/console or TTY), and
can I run it from the CRON or from AT.  These are the things that
break the naive headless images.



Wed, 18 Jun 1902 08:00:00 GMT  
 ISO Standard for Headless Images?
They would be long-running.  Typically in these middleware-enabled
applications, the programs run for days, if not weeks.  A couple of them we're
using:

One that communicates to Reuters to watch stock quotes and news stories.
One that generates random 16-digit keys.
One used for encryption/decryption of cookies.
One used for session (state) information.
One used for communicating to CICS (ECI) using IBM's Universal CICS Client.

In each case, the applications (called workers) wait for a message from the
middleware for something to do.  They interpret the message, do what they're
told, reply appropriately, then wait for the next message.  isdexecd, the
remote execution daemon, takes care of starting them and will restart them
when the middleware daemon detects they've crashed (a restart).

When they close normally, each of the workers will be responsible for
terminating the running image.  I forget what the commands are (right now) but
I know that both GNU and VW have commands something like "ObjectMemory quit"
or something like that.
--
Open Source middleware available at http://home.netcom.com/~tgagne/



Wed, 18 Jun 1902 08:00:00 GMT  
 ISO Standard for Headless Images?

Quote:

>I agree with Tom, easy and simple access to creation of headless images
>is important.  I remember trying to fake out VW in the early 90's so
>it would run without a display.  We tried ignoring the X traffic,
>disabling it, and running to a X simulator (essentially a X version
>of /dev/null).  The latter was the best.  The others always had a
>problem or two.

>The real test of a headless image is: can I run it on a unix workstation
>without X, without any user logged in (no /dev/console or TTY), and
>can I run it from the CRON or from AT.  These are the things that
>break the naive headless images.

Doesn't the Advanced Boolean Concepts Runtime Packager for VW do this quite
well? I never did it with that tool, but I believe the options were there.
This is bundled with the higher-end versions of 5i, and I think there's a
non-commercial version.

http://www.advbool.com

--

The Object People               613.225.8812(v)   613.225.5943(f)    



Wed, 18 Jun 1902 08:00:00 GMT  
 ISO Standard for Headless Images?


|>The real test of a headless image is: can I run it on a unix workstation
|>without X, without any user logged in (no /dev/console or TTY), and
|>can I run it from the CRON or from AT.  These are the things that
|>break the naive headless images.
|
|Doesn't the Advanced Boolean Concepts Runtime Packager for VW do this quite
|well? I never did it with that tool, but I believe the options were there.
|This is bundled with the higher-end versions of 5i, and I think there's a
|non-commercial version.
|http://www.advbool.com

Could be.  Like I said, this was the early nineties so many of these
things weren't so easily done then.  Next time I'm allowed to use
smalltalk I'll check it out :-)

Kein



Wed, 18 Jun 1902 08:00:00 GMT  
 ISO Standard for Headless Images?



Quote:

> >I agree with Tom, easy and simple access to creation of headless images
> >is important.  I remember trying to fake out VW in the early 90's so
> >it would run without a display.  We tried ignoring the X traffic,
> >disabling it, and running to a X simulator (essentially a X version
> >of /dev/null).  The latter was the best.  The others always had a
> >problem or two.

> >The real test of a headless image is: can I run it on a unix workstation
> >without X, without any user logged in (no /dev/console or TTY), and
> >can I run it from the CRON or from AT.  These are the things that
> >break the naive headless images.

> Doesn't the Advanced Boolean Concepts Runtime Packager for VW do this
quite
> well? I never did it with that tool, but I believe the options were
there.
> This is bundled with the higher-end versions of 5i, and I think there's a
> non-commercial version.

> http://www.advbool.com

There is a non-commercial version that goes with VW3.0NC. See the web site.

As much as I would like to take credit for headless image support in
Runtime Packager, I would be forced to say it is more or less medium-well
done. The real headless support is supplied with VW 3.0 (NC). Runtime
Packager uses that and takes care of a few details like making it easy to
start you application in a controlled way. The result has the same
limitations as the support supplied by ParcPlace, to wit, headless support
can run without opening any windows, but there is no real savings in the
image. The window support methods are still there, they are just not used.
This is primarily needed to allow opening the image in a "headfull" mode
for debug, which is something I seem never to be able to get working quite
right.

--

John L. Baker

Advanced Boolean Concepts, Ltd.
http://www.advbool.com



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Setting ERRORLEVEL From Headless Image

2. headless image (VAST)

3. headless image shutdown

4. Help: Headless image in VW 2.0

5. VW2.5 headless image (minimum size)

6. Problems with printing in a headless image

7. Linux - VWNC30 - Headless image

8. Headless Image with ENVY

9. Headless Image

10. clean shutdown of headless image in UNIX

11. Output to tty for headless image

12. VW: Headless image problem

 

 
Powered by phpBB® Forum Software