<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: tariqhamid</title>
    <description>The latest articles on DEV Community by tariqhamid (@tariqhamid).</description>
    <link>https://dev.to/tariqhamid</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F833525%2F76ad93f4-0235-4442-893c-4353e75e7b26.jpeg</url>
      <title>DEV Community: tariqhamid</title>
      <link>https://dev.to/tariqhamid</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tariqhamid"/>
    <language>en</language>
    <item>
      <title>Gemstone Seaside Webserver: Appendices</title>
      <dc:creator>tariqhamid</dc:creator>
      <pubDate>Tue, 30 Dec 2025 15:14:42 +0000</pubDate>
      <link>https://dev.to/tariqhamid/gemstone-seaside-webserver-appendices-386k</link>
      <guid>https://dev.to/tariqhamid/gemstone-seaside-webserver-appendices-386k</guid>
      <description>&lt;p&gt;&lt;strong&gt;Appendix for FastCGI Support&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;run
GsDeployer deploy: [
  Metacello new
    baseline: 'Seaside3';
    repository: 'github://SeasideSt/Seaside:master/repository';
    onLock: [:ex | ex honor];
    load: #( 'FastCGI' )
 ].
%

run
System commit
%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;run
WAGemStoneRunSeasideGems default adaptorClass: WAFastCGIAdaptor. 
%
[347787009  WAGemStoneRunSeasideGems] aWAGemStoneRunSeasideGems
topaz 2&amp;gt; run
WAGemStoneRunSeasideGems startGemServerOn: 9001.
%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Edit the scripts&lt;br&gt;
&lt;strong&gt;&lt;em&gt;seaside/bin/startSeaside_FastCGI&lt;/em&gt;&lt;/strong&gt; and&lt;br&gt;
&lt;strong&gt;&lt;em&gt;seaside/bin/startMaintenance&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;





&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;




</description>
      <category>gemstone</category>
      <category>seaside</category>
      <category>smalltalk</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Gemstone Seaside Webserver</title>
      <dc:creator>tariqhamid</dc:creator>
      <pubDate>Tue, 30 Dec 2025 14:50:08 +0000</pubDate>
      <link>https://dev.to/tariqhamid/gemstone-seaside-webserver-4dog</link>
      <guid>https://dev.to/tariqhamid/gemstone-seaside-webserver-4dog</guid>
      <description>&lt;p&gt;Gemstone is a multi-user Smalltalk database. Here I show how to load Seaside into Gemstone. Nginx supports a reverse-proxy mechanism for Seaside, as described below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Download Gemstone&lt;/strong&gt;&lt;br&gt;
On the page &lt;a href="https://gemtalksystems.com/products/gs64/" rel="noopener noreferrer"&gt;https://gemtalksystems.com/products/gs64/&lt;/a&gt; click on Download&lt;/p&gt;

&lt;p&gt;On the download page click on the zip or dmg file&lt;/p&gt;

&lt;p&gt;Click on the downloaded file.&lt;/p&gt;

&lt;p&gt;I recommend you copy the contents of Gemstone dowload to /opt/gemstone/product&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Seaside&lt;/strong&gt;&lt;br&gt;
make the seaside subdirectory your current directory:&lt;br&gt;
&lt;code&gt;cd /opt/gemstone/product/seaside/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Copy the system.conf file, shown below to /opt/gemstone/product/seaside/data/system.conf&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# system.conf
#
# This is a larger configuration suitable for a standalone system.
DBF_EXTENT_NAMES = $GEMSTONE_DATADIR/extent0.dbf;
# DBF_SCRATCH_DIR = $GEMSTONE_DATADIR/;
KEYFILE = $GEMSTONE_KEYFILE;
STN_HALT_ON_FATAL_ERR = FALSE;
STN_TRAN_FULL_LOGGING = TRUE;
STN_TRAN_LOG_DIRECTORIES = $GEMSTONE_DATADIR/, $GEMSTONE_DATADIR/;
STN_TRAN_LOG_SIZES = 1000, 1000;

# Increased for GLASS/Seaside loading
# SHR_PAGE_CACHE_SIZE_KB should always be &amp;gt; GEM_TEMPOBJ_CACHE_SIZE
SHR_PAGE_CACHE_SIZE_KB = 2000000;
GEM_TEMPOBJ_CACHE_SIZE = 1000000;

# This is set to ensure that all garbage is collected when
# when an MFC is run. See the discussion in 
#  Issue 136: maintenance vm running only #unregisterExpiredHandlers may hang onto dead objects
#  http://code.google.com/p/glassdb/issues/detail?id=136
GEM_TEMPOBJ_POMGEN_PRUNE_ON_VOTE=90;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Copy the database extent:&lt;br&gt;
&lt;code&gt;cp /opt/gemstone/product/bin/extent0.seaside.dbf \&lt;br&gt;
   /opt/gemstone/product/seaside/data/extent0.dbf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Make the extent writable:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;chmod +w /opt/gemstone/product/seaside/data/extent0.dbf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;set the environment variables:&lt;br&gt;
&lt;code&gt;source defSeaside&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Check that the stone and netldi services are running by typing, gslist -lcv&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gslist -lcv
Status        Version    Owner       Pid   Port   Started     Type       Name
-------      --------- --------- -------- ----- ------------ ------      ----
OK           3.7.4.3   trex        17955 50377 Dec 29 15:21 Netldi      gs64ldi
OK           3.7.4.3   trex       17990 54101 Dec 29 15:25 Stone       seaside
OK           3.7.4.3   trex        17991 54099 Dec 29 15:25 cache       seaside~e65467ac4c061631
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;edit ~/.topazini&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;! default initialization for Topaz session
set user DataCurator pass swordfish
! set user SystemUser pass swordfish
!set gemstone gs64stone
!set gemstone gs_3.7.4.3
set gemstone seaside

set gemnetid !#netldi:gs64ldi!gemnetobject

! login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Lines starting with exclamation marks are comments. Make sure you are logged in as DataCurator and not SystemUser.&lt;/p&gt;

&lt;p&gt;DataCurator can see the necessary classes: Gofer, GsDeployer and Metacello, which are used to load Seaside from GitHub.&lt;/p&gt;

&lt;p&gt;Run topaz:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;topaz -l

Reading initialization file /Users/trex/.topazini
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;login to a gem&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;topaz&amp;gt; login
[29/12/2025 16:37:02.845 GMT]
  gci login: currSession 2  rpc gem processId 19278 socket 4 
successful login
 fileformat is now utf8
sourcestringclass is now Unicode16
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Go to the GitHub Seaside repository:&lt;br&gt;
&lt;code&gt;https://github.com/seasidest/seaside&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/seasidest/seaside" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;br&gt;
In the middle of the above page you will see a section for Gemstone:&lt;/p&gt;

&lt;p&gt;Paste the following into your topaz session:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;run
Gofer new
  package: 'GsUpgrader-Core';
  url: 'http://ss3.gemtalksystems.com/ss/gsUpgrader';
  load.
(Smalltalk at: #GsUpgrader) upgradeGrease.
%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;run
GsDeployer deploy: [
  Metacello new
    baseline: 'Seaside3';
    repository: 'github://SeasideSt/Seaside:master/repository';
    onLock: [:ex | ex honor];
    load ].
%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;run
GsDeployer deploy: [
  Metacello new
    baseline: 'Seaside3';
    repository: 'github://SeasideSt/Seaside:master/repository';
    onLock: [:ex | ex honor];
    load: #('Zinc') ].
%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Commit the code to ensure that it can be used across further topaz sessions:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;run
System commit.
%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;As a test&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;run
"Test server startup (this should now work)"
WAGemStoneRunSeasideGems startGemServerOn: 9001.
%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;View the Seaside server run on port 9001:&lt;br&gt;
&lt;a href="http://localhost:9001" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Control-C and quit the topaz session:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;topaz 4&amp;gt; run
"Test server startup (this should now work)"
WAGemStoneRunSeasideGems startGemServerOn: 9001.
%

[Sending hard break]
ERROR 6004 , a Break occurred (error 6004), A hard break was received.
topaz 4&amp;gt; quit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;3 Seaside Servers&lt;/strong&gt;&lt;br&gt;
Ensure line 58 of /opt/gemstone/product/seaside/bin/startSeaside30_Adaptor is commented out:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;58c58
&amp;lt;     Breakpoint trappable: true.
---
&amp;gt;     "Breakpoint trappable: true."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The edited startSeaside30_Adaptor file should look like:&lt;/p&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;





&lt;p&gt;As a precaution first stop the 3 seaside servers on ports 8080, 8081 and 8082&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cd /opt/gemstone/product/seaside &lt;br&gt;
./bin/runSeasideGems30 stop Zinc "8080 8081 8082"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Finally run 3 seaside servers:&lt;br&gt;
&lt;code&gt;cd /opt/gemstone/product/seaside &lt;br&gt;
./bin/runSeasideGems30 start Zinc "8080 8081 8082"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You should see 3 Seaside webservers run at&lt;/p&gt;

&lt;p&gt;&lt;a href="http://localhost:8080" rel="noopener noreferrer"&gt;http://localhost:8080&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://localhost:8081" rel="noopener noreferrer"&gt;http://localhost:8081&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://localhost:8082" rel="noopener noreferrer"&gt;http://localhost:8082&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reverse-Proxy Hosting&lt;/strong&gt;&lt;br&gt;
To see any of the 3 Seaside servers running on just &lt;a href="http://localhost" rel="noopener noreferrer"&gt;http://localhost&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;edit seaside.conf&lt;/p&gt;

&lt;p&gt;this is normally located at /etc/nginx/conf.d/seaside.conf for Linux and at /opt/homebrew/etc/nginx/seaside.conf for Mac.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# /opt/homebrew/etc/nginx/seaside.conf        (Mac/Homebrew path)
# or /etc/nginx/conf.d/seaside.conf           (Linux)

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    upstream seaside_backend {
        # nginx will round-robin between the three gems
        server 127.0.0.1:8080 max_fails=3 fail_timeout=30s;
        server 127.0.0.1:8081 max_fails=3 fail_timeout=30s;
        server 127.0.0.1:8082 max_fails=3 fail_timeout=30s;
    }

    server {
        listen 80;
        server_name seaside.example.com;          # &amp;lt;-- your public host

        # --- static files (optional) ------------------------------------------
        # serve everything under /seaside/static/* from disk
        location /seaside/static/ {
            alias /opt/gemstone/product/seaside/web-root/static/;  # adjust path
            expires 1y;
            add_header Cache-Control "public, immutable";
            access_log off;
        }

        # --- dynamic Seaside requests -----------------------------------------
        location / {
            proxy_pass         http://seaside_backend;
            proxy_redirect     off;

            # standard headers Seaside needs to build correct external URLs
            proxy_set_header Host              $host;
            proxy_set_header X-Real-IP         $remote_addr;
            proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;

            # timeouts (adjust if your pages are slow)
            proxy_connect_timeout 10s;
            proxy_send_timeout    60s;
            proxy_read_timeout    60s;
        }
    }

    include servers/*;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check that the above nginx.conf is good and the reload nginx.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nginx -t   # syntax check
sudo nginx -s reload
or
sudo nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now view any of the 3 websites at &lt;a href="http://localhost" rel="noopener noreferrer"&gt;http://localhost&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;References&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.monkeysnatchbanana.com/2010/06/24/reverse-proxying-to-seaside-with-nginx/" rel="noopener noreferrer"&gt;https://www.monkeysnatchbanana.com/2010/06/24/reverse-proxying-to-seaside-with-nginx/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.monkeysnatchbanana.com/2010/08/18/using-fastcgi-with-nginx-and-seaside/" rel="noopener noreferrer"&gt;https://www.monkeysnatchbanana.com/2010/08/18/using-fastcgi-with-nginx-and-seaside/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://dev.to/tariqhamid/gemstone-seaside-webserver-appendices-386k"&gt;https://dev.to/tariqhamid/gemstone-seaside-webserver-appendices-386k&lt;/a&gt;&lt;/p&gt;

</description>
      <category>seaside</category>
      <category>gemstone</category>
      <category>smalltalk</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
