[Glass] ZnServer defaultOn: hangs indefinitely

Dale Henrichs dale.henrichs at gemtalksystems.com
Tue Jul 20 12:22:49 PDT 2021


In order to run a zinc server, you should install gsApplicationTools[1]. The gsApplicationTools framework was mainly designed to support Seaside and is loaded as part of the standard Seaside support.

It is possible to use gsApplicationTools without Seaside by runnint the following tode command:
project load --loads=`#('Zinc-GemStone-Server-Tools')` ZincHTTPComponents
this expression installs the GemServer support for Zinc and the gsApplicationTools framework.

The basic model is that you register a "gemserver" to listen on a set of ports (I recommend ZnNewGemServer and a single port to begin with) with this smalltalk expresssion:
ZnNewGemServer register: 'zinc' on: #(1701).
The you can start and stop the "gemServer" using the following smalltalk expressions:

(GemServer gemServerNamed: 'zinc') startGems.

(GemServer gemServerNamed: 'zinc') stopGems.
The first expression will launch a topaz session to listen on the given port (1701) and the second expression will stop the topz session.

There is a fairly extension document[2] about GemServers that you should read to get started.
Normally you run your GemStone-based servers as standalone topaz sessions and use the Object Log for debugging[3]. There is a way to interactively debug using tODE[4], however, I recommend that you start out using the Object Log and continuations to debug your server code as it there are fewer moving parts.
When using the topaz-based servers, you CAN and should edit your code using tODE... the servers abort before servicing each HTTP request so the changes that you make in tODE (and commit --- tODE autocommits by default) will be run in the server on the next HTTP request.
Let me know if you have additional questions.
Dale
[1] https://github.com/GsDevKit/gsApplicationTools
[2] https://github.com/GsDevKit/gsApplicationTools/blob/master/docs/gettingStarted.md
[3] https://github.com/GsDevKit/gsApplicationTools/blob/master/docs/gettingStarted.md#object-log-debugging
[4] https://github.com/GsDevKit/gsApplicationTools/blob/master/docs/gettingStarted.md#interactive-debugging

On Jul 19 2021, at 5:07 pm, Ian via Glass <glass at lists.gemtalksystems.com> wrote:
> Hi All
>
>
> I have a fresh install of GsDevKit_home installed.
>
> I used installServerClient to create a tode client and a server (using GS/3.6.1).
>
> Issue: ZnServer runs ( using: (ZnServer defaultOn: 1701) start. ), as per:
>
> ...and then almost instantly... the browser(s) immediately stop their incesant spinning and display the welcome page.
>
> I notice that if I start Seaside as per the Github instructions, everything works and displays almost instantly. This lead me to believe that there must be a setting in the stone somewhere that I am not flipping that will allow Zinc Servers to work correctly. I just don't know what that might be.
>
> Apologies if this is a simpleton question but any help and insight would be great.
>
> Kindly,
>
> Ian
>
> Sent with ProtonMail (https://protonmail.com/) Secure Email.
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> https://lists.gemtalksystems.com/mailman/listinfo/glass

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/archives/glass/attachments/20210720/194cf91f/attachment.htm>


More information about the Glass mailing list