Win32 VM Service facility broken?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Win32 VM Service facility broken?

Torsten Bergmann
 
>If someone could tell me how to run VM as service, i may check.

see http://wiki.squeak.org/squeak/105

If correctly installed it should run and there should also
be an entry in
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services


BTW: if you installed it you can remove it using:

   sc.exe delete MyService

where MyService is the name you've given.

>you can run a VM as a standalone app, with seaside server.

Yes, I can always run squeak headless together with an entry in
Autostart or use other workarounds.

But it is not the same. Any Windows admin will tell you. Especially
since you can use scripting or the management console to start/stop
service on remote machines and the like ...

With the SCM (Service control manager) I can manage it like any
other service (including Apache). I can define if and when it's started.

The VM provides the "-service" option and if it's broken we should
really fix it.

This would also allow people to create Smalltalk based application
server products for their Seaside apps (similar to Apache) and so on ...

>i consider services as an unnecessary and complex solution
>for resident applications

We dont have to discuss how good the API or Windows in general
is. Any other service based program integrates nicely ... and
so should Squeak.
I dont think we should yet again ignore the outside world here.

Especially since we know that it worked before....


Bye
T.

 



--
DSL-Preisknaller: DSL Komplettpakete von GMX schon für
16,99 Euro mtl.!* http://portal.gmx.net/de/go/dsl02
Reply | Threaded
Open this post in threaded view
|

Re: Win32 VM Service facility broken?

Bert Freudenberg
 
On 04.11.2009, at 15:35, Torsten Bergmann wrote:

> The VM provides the "-service" option and if it's broken we should  
> really fix it.

I seem to recall the service stuff is not compiled in by default  
anymore because it led to long delays when running the regular VM. But  
as usual I'm not at all familiar with Windows so I may be way off.

- Bert -


Reply | Threaded
Open this post in threaded view
|

Re: Win32 VM Service facility broken?

Andreas.Raab
 
Oh, that's right, now I remember. The problem was that I didn't have a
good way to determine whether the VM was started as service or not and
so (besides some heuristics) the only way to figure out was to contact
the service manager. This can take several seconds and was deemed
unacceptable when it turned out that plenty of people start Squeak
exclusively via just launching the executable instead of dragging an
image on it.

At this point I decided to disable it because there had so few uses of
this facility that I was aware of. That was *years* back.

There are two options: Either you compile your own VM that puts this
stuff back in, or you tell me how to *quickly* decide whether the VM is
actually running as a service. There is a high probability that such a
thing exists and I simply don't know about it since this code is a few
years old.

Cheers,
   - Andreas

Bert Freudenberg wrote:

>
> On 04.11.2009, at 15:35, Torsten Bergmann wrote:
>
>> The VM provides the "-service" option and if it's broken we should
>> really fix it.
>
> I seem to recall the service stuff is not compiled in by default anymore
> because it led to long delays when running the regular VM. But as usual
> I'm not at all familiar with Windows so I may be way off.
>
> - Bert -
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Win32 VM Service facility broken?

Eliot Miranda-2
 


On Wed, Nov 4, 2009 at 8:26 AM, Andreas Raab <[hidden email]> wrote:

Oh, that's right, now I remember. The problem was that I didn't have a good way to determine whether the VM was started as service or not and so (besides some heuristics) the only way to figure out was to contact the service manager. This can take several seconds and was deemed unacceptable when it turned out that plenty of people start Squeak exclusively via just launching the executable instead of dragging an image on it.

At this point I decided to disable it because there had so few uses of this facility that I was aware of. That was *years* back.

There are two options: Either you compile your own VM that puts this stuff back in, or you tell me how to *quickly* decide whether the VM is actually running as a service. There is a high probability that such a thing exists and I simply don't know about it since this code is a few years old.

Why not simply provide a command-line argument and require that to be supplied to contact the service manager?  Wen configuring the VM to run as a service that command-line parameter is passed and the VM contacts the service manager in response.  In default use the command-line argument is absent and the service manager is not contacted.

best
eliot


Cheers,
 - Andreas


Bert Freudenberg wrote:

On 04.11.2009, at 15:35, Torsten Bergmann wrote:

The VM provides the "-service" option and if it's broken we should really fix it.

I seem to recall the service stuff is not compiled in by default anymore because it led to long delays when running the regular VM. But as usual I'm not at all familiar with Windows so I may be way off.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: Win32 VM Service facility broken?

Andreas.Raab
 
Eliot Miranda wrote:
> Why not simply provide a command-line argument and require that to be
> supplied to contact the service manager?

Obviously that was the very first thing I tried way back when. Only to
find out that there is no way to do just that (i.e., to pass in an
argument to the service registration that would be passed along with the
launch of the executable). As a consequence, I had to store the
arguments (image name etc) in the registry and read them from there. If
that has changed in later windows versions please point me to the
appropriate documentation.

Cheers,
   - Andreas
Reply | Threaded
Open this post in threaded view
|

Re: Win32 VM Service facility broken?

Eliot Miranda-2
 


On Wed, Nov 4, 2009 at 10:09 AM, Andreas Raab <[hidden email]> wrote:

Eliot Miranda wrote:
Why not simply provide a command-line argument and require that to be supplied to contact the service manager?

Obviously that was the very first thing I tried way back when. Only to find out that there is no way to do just that (i.e., to pass in an argument to the service registration that would be passed along with the launch of the executable). As a consequence, I had to store the arguments (image name etc) in the registry and read them from there. If that has changed in later windows versions please point me to the appropriate documentation.

Editing the registry is apparently the way you have to do it.  See e.g. http://www.cincomsmalltalk.com/documentation/current/WebServerConfig.pdf (& search for srvany.exe).  But in the registry (as explained in WebServerConfig.pdf) you can supply a command line and there-in include a command-line parameter to tell the VM it is being run as a service.


Windows, an enterprise-ready operating system... with drive letters.  Yeah, right.


Cheers,
 - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: Win32 VM Service facility broken?

Igor Stasenko

2009/11/4 Eliot Miranda <[hidden email]>:

>
>
>
> On Wed, Nov 4, 2009 at 10:09 AM, Andreas Raab <[hidden email]> wrote:
>>
>> Eliot Miranda wrote:
>>>
>>> Why not simply provide a command-line argument and require that to be supplied to contact the service manager?
>>
>> Obviously that was the very first thing I tried way back when. Only to find out that there is no way to do just that (i.e., to pass in an argument to the service registration that would be passed along with the launch of the executable). As a consequence, I had to store the arguments (image name etc) in the registry and read them from there. If that has changed in later windows versions please point me to the appropriate documentation.
>
> Editing the registry is apparently the way you have to do it.  See e.g. http://www.cincomsmalltalk.com/documentation/current/WebServerConfig.pdf (& search for srvany.exe).  But in the registry (as explained in WebServerConfig.pdf) you can supply a command line and there-in include a command-line parameter to tell the VM it is being run as a service.
>
odd...

> Windows, an enterprise-ready operating system... with drive letters.  Yeah, right.

Yeah! Who cares about command-line arguments, while having Services
and Registry :)

>>
>> Cheers,
>>  - Andreas
>
>
>



--
Best regards,
Igor Stasenko AKA sig.