Help getting started

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

Help getting started

Thomas F. Burdick-2
After a couple years away from Smalltalk, I thought I'd put
Squeak/Seaside on a server I have as an excuse to play around with ST
again.  But I found myself at a bit of a loss as to how to get the
thing up and running so I can play with it.

The way I'd setup a Lisp-based system would be to start the Lisp image
on the server running under screen and detach from it.  When I want to
hack the system, I'd remotely connect to the running image with an
Emacs-based ide, or attach to the screen and start up the Lisp's
built-in ide, connecting to the correct X11 display.  When done
hacking, I'd disconnect/close the ide, and leave the server running.

Translating these concepts as best I can to Squeak, my impulse is to
create an image loaded with Seaside, etc., along with
RemoteFrameBuffer, on my local machine.  I'd then start the image up
running in headless mode on the server, and much like with Lisp,
detach the screen and connect to the running image with a VNC client.

Is this reasonable/normal?  How do you all setup your environments?
My ST experience has so far been limited to doing things locally on
one machine.

Thanks in advance,
Thomas
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Help getting started

Rick Flower
Thomas F. Burdick wrote:
> After a couple years away from Smalltalk, I thought I'd put
> Squeak/Seaside on a server I have as an excuse to play around with ST
> again.  But I found myself at a bit of a loss as to how to get the
> thing up and running so I can play with it.

[ ... ]

> Translating these concepts as best I can to Squeak, my impulse is to
> create an image loaded with Seaside, etc., along with
> RemoteFrameBuffer, on my local machine.  I'd then start the image up
> running in headless mode on the server, and much like with Lisp,
> detach the screen and connect to the running image with a VNC client.
>
> Is this reasonable/normal?  How do you all setup your environments?
> My ST experience has so far been limited to doing things locally on
> one machine.

Well.. I can't speak for Squeak since I don't use it, but I use
VisualWorks running on Linux.. In that setup, I use VNC to have a
Gnome Session going -- in that is a VisualWorks image that has the
standard X11 windows for doing still just as if you were sitting in
front of the machine.. I can connect to it while I'm at work if it's
lunch time or similar and want to fiddle around a bit.. Works great over
a nice SSH session..  My current VW development image has been running
continuously in my VNC environment for the past several weeks w/o being
shutdown or whatever.. I just make sure I publish to my local Store
repository once in a while and of course save my image too..  YMMV!
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Help getting started

cbeler
In reply to this post by Thomas F. Burdick-2
Hi

> After a couple years away from Smalltalk, I thought I'd put
> Squeak/Seaside on a server I have as an excuse to play around with ST
> again.  But I found myself at a bit of a loss as to how to get the
> thing up and running so I can play with it.
>
> The way I'd setup a Lisp-based system would be to start the Lisp image
> on the server running under screen and detach from it.  When I want to
> hack the system, I'd remotely connect to the running image with an
> Emacs-based ide, or attach to the screen and start up the Lisp's
> built-in ide, connecting to the correct X11 display.  When done
> hacking, I'd disconnect/close the ide, and leave the server running.
You can do the same with squeak, and the RFB package...
but for using squeak, I prefer to use it locally... but this is possible...

plus you have a seaside interface to launch/close the rfb server

>
> Translating these concepts as best I can to Squeak, my impulse is to
> create an image loaded with Seaside, etc., along with
> RemoteFrameBuffer, on my local machine.  I'd then start the image up
> running in headless mode on the server, and much like with Lisp,
> detach the screen and connect to the running image with a VNC client.
>
> Is this reasonable/normal?  How do you all setup your environments?
> My ST experience has so far been limited to doing things locally on
> one machine.
>
Take a prepared squeak image with seaside like Damien's one or Ramon's
(http://onsmalltalk.com)
- load the RFB package (http://squeaksouce.com/RFB) - add this
repository in monticello
--- change the password   RFBServer setFullPassword
- initialize the WAVNCControler (the seaside app) - WAVNCControler
initialize
- open the web server (WAKom startOn: 8080) or open the VNC server (open
menu)....
- then save the image... put it on your server
- lauch the image headless:    nohup squeak -headless your.image &

then you can connect to the seaside vnc app to start the server
http://yourServer:8080/tools/vnc

or if already opened when saved, you can directly connect with you vnc
client...

hth

Cédrick


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Help getting started

NorbertHartl
In reply to this post by Thomas F. Burdick-2
Hi,

> Translating these concepts as best I can to Squeak, my impulse is to
> create an image loaded with Seaside, etc., along with
> RemoteFrameBuffer, on my local machine.  I'd then start the image up
> running in headless mode on the server, and much like with Lisp,
> detach the screen and connect to the running image with a VNC client.
>
> Is this reasonable/normal?  How do you all setup your environments?
> My ST experience has so far been limited to doing things locally on
> one machine.
>
For me this is normal. I develop everything local on my notebook. I
have here the same apache setup as on the server. I have my developer
image and a smaller image. When I'm lazy I just copy over my working
version to the server to get everything up very fast. I don't use
VNC for developing very much because it is much slower than to work
local.

My plans are to use the KernelImage from Pavel. It is an incredible
valuable work for e.g. server deployment. It's an image with nearly
nothing in it but everything is loadable to customize the image. I don't
know if it is possible to use RemoteFrameBuffer on it. But the best
way for deployment will be to have a bootstrap script. This script
can take the kernel image and installs everything's needed into it.
Then you have a tiny and best customized image to run. If
RemoteFrameBuffer works there is even space for hot fixes ;)

regards,

Norbert

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Forked processes and Seaside on VW

Carl Gundel
In reply to this post by cbeler
I depend on forked processes in Run BASIC.  When the user interacts with the
web browser it sends messages to a model which forks to do its thing.  These
processes yield frequently to give each other time to execute.  I fork these
processes at userBackgroundPriority, which I believe is at 30.  When I look
in the Process Monitor the actual Seaside application that the user
interacts with seems to be running at 65.  So, I'm trying to figure out why
when I have one process running at priority level 30 it causes a Seaside
session running at 65 to run very sluggishly.  Shouldn't the higher priority
process preempt the lower priority one that is yielding frequently?

-Carl Gundel, author of Liberty BASIC
http://www.libertybasic.com 


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Help getting started

Philippe Marschall
In reply to this post by Thomas F. Burdick-2
2007/3/1, Thomas F. Burdick <[hidden email]>:

> After a couple years away from Smalltalk, I thought I'd put
> Squeak/Seaside on a server I have as an excuse to play around with ST
> again.  But I found myself at a bit of a loss as to how to get the
> thing up and running so I can play with it.
>
> The way I'd setup a Lisp-based system would be to start the Lisp image
> on the server running under screen and detach from it.  When I want to
> hack the system, I'd remotely connect to the running image with an
> Emacs-based ide, or attach to the screen and start up the Lisp's
> built-in ide, connecting to the correct X11 display.  When done
> hacking, I'd disconnect/close the ide, and leave the server running.
>
> Translating these concepts as best I can to Squeak, my impulse is to
> create an image loaded with Seaside, etc., along with
> RemoteFrameBuffer, on my local machine.  I'd then start the image up
> running in headless mode on the server, and much like with Lisp,
> detach the screen and connect to the running image with a VNC client.
>
> Is this reasonable/normal?  How do you all setup your environments?
> My ST experience has so far been limited to doing things locally on
> one machine.

In general you develop locally and upload the code to a server image
either via VNC (built in or stand alone). See:
http://www.lukas-renggli.ch/blog/installation?command=PRViewCommand&view=PBPostHtmlView

Only the most hardcore develop directly on the running server image
via VNC ;) And even they don't do it all the time.

Cheers
Philippe

> Thanks in advance,
> Thomas
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Forked processes and Seaside on VW

Reinout Heeck
In reply to this post by Carl Gundel
Carl Gundel wrote:

> I depend on forked processes in Run BASIC.  When the user interacts with
> the web browser it sends messages to a model which forks to do its
> thing.  These processes yield frequently to give each other time to
> execute.  I fork these processes at userBackgroundPriority, which I
> believe is at 30.  When I look in the Process Monitor the actual Seaside
> application that the user interacts with seems to be running at 65.  So,
> I'm trying to figure out why when I have one process running at priority
> level 30 it causes a Seaside session running at 65 to run very
> sluggishly.  Shouldn't the higher priority process preempt the lower
> priority one that is yielding frequently?

Yes unless you have priority inversion: the higher priority process
blocks on a semaphore that the lower priority process will signal.

There are several accesslocks in VW that could induce such unwanted
synchronization, for example in the Symbol table, in a Process'
properties dictionary etc.



Another reason could be that the background process does a lot of calls
that block the entire VM (synchronous DLLCC callouts, DNS name lookup
primitive, creating NTFS filenames, ...)



Is the CPU usage 100% when you see this?


HTH,

Reinout
-------



>
> -Carl Gundel, author of Liberty BASIC
> http://www.libertybasic.com
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Help getting started

David T. Lewis
In reply to this post by Thomas F. Burdick-2
On Thu, Mar 01, 2007 at 04:21:59PM +0100, Thomas F. Burdick wrote:

> After a couple years away from Smalltalk, I thought I'd put
> Squeak/Seaside on a server I have as an excuse to play around with ST
> again.  But I found myself at a bit of a loss as to how to get the
> thing up and running so I can play with it.
>
> The way I'd setup a Lisp-based system would be to start the Lisp image
> on the server running under screen and detach from it.  When I want to
> hack the system, I'd remotely connect to the running image with an
> Emacs-based ide, or attach to the screen and start up the Lisp's
> built-in ide, connecting to the correct X11 display.  When done
> hacking, I'd disconnect/close the ide, and leave the server running.

Most people use VNC for this as explained in other replies, and
that should be your preferred approach. But I'll note that you can
also use OSProcess to do your X11 reconnect, which would probably
be about the same thing you did with your Lisp system. You would
want to invoke this through Seaside with some reasonable security,
but the basic idea is this:

    "Warning: Make sure the some.host.com is a real address, otherwise
    the VM will block for a long time (e..g six *minutes*) attempting
    to resolve the XOpenDisplay()."

    originalDisplayName := OSProcess thisOSProcess environmentAt: #DISPLAY.
    someOtherHost := 'some.host.com'.
    someOtherDisplayName := someOtherHost, ':0'.
   
    "Make sure that someOtherHost is a real address, otherwise XOpenDisplay()
    will block the Squeak VM for a long time (several minutes)."
    [NetNameResolver addressForName: someOtherHost timeout: 2]
    on: NameLookupFailure
    do: [:e | self error: e messageText, ' XOpenDisplay() will block for a long time! '].
    squeak := OSProcess thisOSProcess.
    Transcript cr; show: 'Make image headless for a second'.
    squeak decapitate.
    (Delay forSeconds: 1) wait.
    Transcript cr; show: 'Reconnect to display'.
    squeak recapitate.
    (Delay forSeconds: 1) wait.
    Transcript cr; show: 'Make image headless again for a second'.
    squeak decapitate.
    (Delay forSeconds: 1) wait.
    Transcript cr; show: 'Now reconnect display on ', someOtherDisplayName.
    priorDisplay := squeak displayOnXServer: someOtherDisplayName.
    Transcript cr; show: 'prior display was ', priorDisplay asString.
    (Delay forSeconds: 1) wait.
    Transcript cr; show: 'Display on ', originalDisplayName.
    priorDisplay := squeak displayOnXServer: originalDisplayName.
    Transcript cr; show: 'prior display was ', priorDisplay asString

Dave

>
> Translating these concepts as best I can to Squeak, my impulse is to
> create an image loaded with Seaside, etc., along with
> RemoteFrameBuffer, on my local machine.  I'd then start the image up
> running in headless mode on the server, and much like with Lisp,
> detach the screen and connect to the running image with a VNC client.
>
> Is this reasonable/normal?  How do you all setup your environments?
> My ST experience has so far been limited to doing things locally on
> one machine.
>
> Thanks in advance,
> Thomas
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Help getting started

Brad Fuller
In reply to this post by Philippe Marschall
Philippe Marschall wrote:

> 2007/3/1, Thomas F. Burdick <[hidden email]>:
>> After a couple years away from Smalltalk, I thought I'd put
>> Squeak/Seaside on a server I have as an excuse to play around with ST
>> again.  But I found myself at a bit of a loss as to how to get the
>> thing up and running so I can play with it.
>>
>> The way I'd setup a Lisp-based system would be to start the Lisp image
>> on the server running under screen and detach from it.  When I want to
>> hack the system, I'd remotely connect to the running image with an
>> Emacs-based ide, or attach to the screen and start up the Lisp's
>> built-in ide, connecting to the correct X11 display.  When done
>> hacking, I'd disconnect/close the ide, and leave the server running.
>>
>> Translating these concepts as best I can to Squeak, my impulse is to
>> create an image loaded with Seaside, etc., along with
>> RemoteFrameBuffer, on my local machine.  I'd then start the image up
>> running in headless mode on the server, and much like with Lisp,
>> detach the screen and connect to the running image with a VNC client.
>>
>> Is this reasonable/normal?  How do you all setup your environments?
>> My ST experience has so far been limited to doing things locally on
>> one machine.
>
> In general you develop locally and upload the code to a server image
> either via VNC (built in or stand alone). See:
> http://www.lukas-renggli.ch/blog/installation?command=PRViewCommand&view=PBPostHtmlView 

How do you reconcile local directories every time you change something
locally?

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Help getting started

Philippe Marschall
2007/3/4, Brad Fuller <[hidden email]>:

> Philippe Marschall wrote:
> > 2007/3/1, Thomas F. Burdick <[hidden email]>:
> >> After a couple years away from Smalltalk, I thought I'd put
> >> Squeak/Seaside on a server I have as an excuse to play around with ST
> >> again.  But I found myself at a bit of a loss as to how to get the
> >> thing up and running so I can play with it.
> >>
> >> The way I'd setup a Lisp-based system would be to start the Lisp image
> >> on the server running under screen and detach from it.  When I want to
> >> hack the system, I'd remotely connect to the running image with an
> >> Emacs-based ide, or attach to the screen and start up the Lisp's
> >> built-in ide, connecting to the correct X11 display.  When done
> >> hacking, I'd disconnect/close the ide, and leave the server running.
> >>
> >> Translating these concepts as best I can to Squeak, my impulse is to
> >> create an image loaded with Seaside, etc., along with
> >> RemoteFrameBuffer, on my local machine.  I'd then start the image up
> >> running in headless mode on the server, and much like with Lisp,
> >> detach the screen and connect to the running image with a VNC client.
> >>
> >> Is this reasonable/normal?  How do you all setup your environments?
> >> My ST experience has so far been limited to doing things locally on
> >> one machine.
> >
> > In general you develop locally and upload the code to a server image
> > either via VNC (built in or stand alone). See:
> > http://www.lukas-renggli.ch/blog/installation?command=PRViewCommand&view=PBPostHtmlView
>
> How do you reconcile local directories every time you change something
> locally?

Can you make an example?

> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Help getting started

Brad Fuller
Philippe Marschall wrote:

> 2007/3/4, Brad Fuller <[hidden email]>:
>> Philippe Marschall wrote:
>> > 2007/3/1, Thomas F. Burdick <[hidden email]>:
>> >> After a couple years away from Smalltalk, I thought I'd put
>> >> Squeak/Seaside on a server I have as an excuse to play around with ST
>> >> again.  But I found myself at a bit of a loss as to how to get the
>> >> thing up and running so I can play with it.
>> >>
>> >> The way I'd setup a Lisp-based system would be to start the Lisp image
>> >> on the server running under screen and detach from it.  When I want to
>> >> hack the system, I'd remotely connect to the running image with an
>> >> Emacs-based ide, or attach to the screen and start up the Lisp's
>> >> built-in ide, connecting to the correct X11 display.  When done
>> >> hacking, I'd disconnect/close the ide, and leave the server running.
>> >>
>> >> Translating these concepts as best I can to Squeak, my impulse is to
>> >> create an image loaded with Seaside, etc., along with
>> >> RemoteFrameBuffer, on my local machine.  I'd then start the image up
>> >> running in headless mode on the server, and much like with Lisp,
>> >> detach the screen and connect to the running image with a VNC client.
>> >>
>> >> Is this reasonable/normal?  How do you all setup your environments?
>> >> My ST experience has so far been limited to doing things locally on
>> >> one machine.
>> >
>> > In general you develop locally and upload the code to a server image
>> > either via VNC (built in or stand alone). See:
>> >
>> http://www.lukas-renggli.ch/blog/installation?command=PRViewCommand&view=PBPostHtmlView 
>>
>>
>> How do you reconcile local directories every time you change something
>> locally?
>
> Can you make an example?

As Lukas pointed out in another email, I had a problem in that Magritte
stores files externally to a specific location. Thus, if you move this
image to another location, your path will be incorrect. Granted, it's
not a specific Seaside problem, but an example.




_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Help getting started

Thomas F. Burdick-2
In reply to this post by cbeler
Thanks for all the responses, especially pointing out the prepared
images, which I didn't know about.  They made things a lot easier.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside