You are currently browsing the category archive for the ‘Screencasts’ category.

A screencast of this post here.

GemStone/S 64 Bit has been available for the Macintosh for several years but you generally need to install and configure it much like you would do if you were on a Linux/Unix system. That is, there are a lot of command-line steps and system configurations that are needed. For someone who is used to the Macintosh’s consistent graphical user interface and who is not so familiar with configuring a Unix server, this tends to create a high barrier-to-entry. For a while I’ve been playing with an alternative that makes it easier to install and run GemStone/S 64 Bit on a Macintosh. This blog post will describe how to use this tool.

To start, download GemStoneApp.dmg, a disk image of a Cocoa application. Open the disk image to get to the virtual disk containing the application and a shortcut to your Applications folder. Copy the application to your local machine (typically, to the Applications folder, but it can be anywhere). At this point you can eject the virtual disk and delete the disk image. This will give you a 770 KB bundle that is a Cocoa application built with Xcode 5.

Screen Shot 2013-09-25 at 1.47.03 PM

You can launch the application in several ways. First, open Spotlight (Command + space) and type ‘gemstone’ (without the quotes). The application should be found and you can launch it by clicking on the name or just pressing Return. Second, you can use Launchpad, find the GemStone application, and then click on it. Finally, you can use the Finder to navigate to the folder holding the application (typically ‘/Applications/’) and launch it from there.

If the system presents a dialog reporting that the application could not be launched because it was not downloaded from the Mac App Store then you have a couple options. First, you can configure your security to allow applications from “identified developers.” This is done by launching System Preferences, selecting Security & Privacy, unlocking the page if needed (click on the padlock icon at the bottom left if it is closed), and then click the radio button for ‘Mac App Store and identified developers’ under the heading ‘Allow applications downloaded from:’. Once this is done, relaunch the application (as described in the previous paragraph) and confirm that you want to run it. Second, you can use the Finder to navigate to the directory holding the application (typically ‘/Applications/’) and then right-click or Control-click on the application and select the ‘Open’ menu item. This may ask you to confirm that you want to open the application. If you confirm once then it will not ask again.

Screen Shot 2013-09-25 at 2.03.42 PM

Once the application launches, make sure that the ‘Setup’ tab is selected. There are some setup steps that are typically done as root (using ‘sudo’ from a shell prompt) that we can do programatically if we have adequate authorization. These steps are done using a ‘Helper Tool’ that runs as root in the background and performs very limited actions. In our case, we need to set a couple kernel settings, kern.sysv.shmall and kern.sysv.shmmax, to allow for shared memory (this can be done manually, but is easier with the helper tool). Click the ‘More info’ button if you want to learn more, then click the ‘Authenticate…’ button, give your password, and then click the ‘Install Helper’ button. (You can click the ‘Remove’ button to remove the helper tool.)

Next you need to import the list of available versions by clicking the ‘Update’ button. When this finishes (it should only take a couple seconds), you will have a list of versions and their release dates. To install a version, click the checkbox next to the version name or (if you have already downloaded a zip file of the product tree from here or here), click on the ‘Unzip…’ button and select an existing zip file of a product tree. After the version is unzipped you can start to use it.

Screen Shot 2013-09-25 at 2.23.45 PM

Click on the Databases tab and click on the ‘+’ button to create a database. This will set up a directory structure, create a config file, and copy a base extent. You can change the version (if the database has not been used), edit the name of the stone, the NetLDI, and the shared page cache size. After you have made any changes you want, you can click the ‘Start’ button to start the stone (and related processes).

Screen Shot 2013-09-25 at 2.30.05 PM

 

In the Databases tab there are a series of sub-tabs, the first of which is ‘Data Files.’ Here you can select the extent(s) or tranlog(s) to see some information about them.

The second sub-tab gives you some backup and restore options. When the database is not running you can initialize a base extent (a copy of $GEMSTONE/bin/extent0.dbf) or a ‘GLASS’ extent (a copy of $GEMSTONE/bin/extent0.seaside.dbf), and you can restore from a backup. When the database is running you can make a backup.

The third sub-tab is ‘Process Logs’ and this gives you a list of log files associated with the GemStone processes. You can double-click a line (or select the line and click the ‘Open’ button), and the appropriate log file will open using the Macintosh Console application (used to view system logs).

The fourth sub-tab is ‘Archives’ and gives you some information about archived process logs (the text files described above) and the transaction logs. These can typically be deleted without impacting a running system (though you might want to keep transaction logs made following any backup if you have to do a restore).

The fifth sub-tab is ‘Statistics’ and shows a list of statmonitor files created while the system is running. If you double-click a line (or single-click and click the ‘Open’ button) then the application will launch ‘VSD’, a Visual Statistics Display tool that can be used to analyze the running system.

(If there is a sixth sub-tab, ‘Upgrade’, you should ignore it since it is disabled and does not do anything right now.)

After the Databases tab is a third tab, ‘GS List,’ that shows a list of the current processes. The port number for the NetLDI process might be useful.

(If there is a fourth tab, ‘Logins’, you should ignore it since it is disabled and does not do anything right now.)

Returning to the Databases tab, we have the ability to open a Finder window on the database directory (the button with a folder). Here you can use the Finder to explore the implementation details of the database. There is a ‘GemTools’ button that opens a text field with a Smalltalk expression that can be pasted into a GemTools session definition. Finally, there is a ‘Terminal’ button that can be used to open the Macintosh Terminal application. This starts a new Terminal application (this will be confusing if you already have one running) with the current working directory set along with various environment variables, including $GEMSTONE and $PATH. From this terminal window you can execute GemStone commands like ‘gslist’ and ‘topaz’.

Note that you can run multiple databases at one time and they can be different versions. When you are done you can click the ‘Stop’ button on the ‘Databases’ tab. When there are no databases running you can Quit the application (the application window can be minimized but not closed). Let me know if this is helpful and what further features you would like to see.

 

Cloud Foundry is an Platform as a Service (PaaS) system that includes a number of popular languages and web frameworks. Because it is open it is possible to add other runtimes and frameworks. In this screencast we describe the process of preparing Smalltalk (AidaWeb on CogVM) to be deployed to the cloud and the changes made to Cloud Foundry to host Smalltalk. We follow the steps described here.

Cloud Foundry comes with built-in support for a number of web frameworks and runtimes, but one of the features of being “open” is that we have access to the source code and can modify it to support new frameworks and runtimes. In this video (7:20) we follow the steps here to add support for Perl. We create a trivial Perl application and deploy it to our private cloud, demonstrating the extensibility of Cloud Foundry.


This video (6:53) is based on the blog post here and demonstrates the process for creating a private installation of Cloud Foundry. Having a private cloud is helpful for debugging before deploying on a public cloud. It is also necessary if we want to add a new runtime or framework to Cloud Foundry. We start by creating a new virtual machine in VMware Fusion with Ubuntu 10.04, add a few necessary packages (including Java!), then install Cloud Foundry. Then from the client we “push” a trivial Ruby Sinatra application and observe that two instances of the application are deployed on the server. We will use this private cloud for subsequent projects.

This 5-minute video demonstrates the steps described here.

One of the exciting things about being a tools vendor is seeing what people build with your tools. Of course, when there are a combination of excellent tools out there, including Seaside and Magritte, the possibilities become even more interesting.

Gerhard Obermann, a Smalltalker with Nokia Siemens Networks in Vienna, Austria, is building a Service Desk application in Seaside to enhance a mature client/server system (built with Cincom Smalltalk and GemStone).

Gerhard has created “Scaffolding for GemStone” and I’m scheduled to give a demo of it at the end of the day on Thursday at Smalltalks 2008 in Buenos Aires. I’ve created a 7-1/2 minute screencast of what I plan to show since I think some of you won’t want to wait for the post conference videos (if any).

“Scaffolding” usually describes a simple “skeleton” user interface (UI) that is created quickly by tools in response to your domain model. What is interesting to me is how much of the complexity that remains in even the slickest of tools is related to the persistence model (generally an Object/Relational Mapping layer). Probably one of the most popular (or talked about) scaffolding frameworks is Rails, where the 15-minute demo involves repeated interactions with the SQL model. Demos of other tools simply wave their hands and present you with a relational schema already created and then go on to use nice tools to build the UI (it makes you wonder how complex the part is that you don’t see).

What Gerhard has done is used Magritte to model a domain, GemStone to save the objects, and Seaside to display them. In addition, Gerhard has created a web-based UI to interact with the Magritte data. Thus, after loading his package into GemStone, everything else is handled through a web browser. The tools build a basic “CRUD” user interface (that handles Create/Retrieve/Update/Delete for the domain data). 

Take a look at the demo and leave us your comments! Better yet, load the code into your GLASS environment and contribute to the open source project…

Watch a 2-minute screencast of these instructions on Vimeo or join Vimeo for a full-size movie (800×600 13.5 MB).

GemStone/S 64 Bit 2.3.0 is now available via anonymous FTP from ftp://ftp.gemstone.com/pub/GemStone64/2.3.0/. Since we have been using beta versions up until now, we should reinstall our server with the new executables and database (there is no officially supported path to move from beta to released code). If you have not yet setup GemStone/S on your server, then you should be able to do so following these instructions. If you already installed a beta version of GemStone/S, then you will need to follow the instructions in this post.

First, log in to your Slice. I have an alias ‘slice’ that takes care of the ssh address and port. Once logged in, run the following command that sets the needed environment variables:

source /opt/gemstone/product/seaside/defSeaside

Now we will stop any GemStone processes:

runSeasideGems stop
stopGemstone
stopnetldi

Next, we will move to the proper directory and get the new version of GemStone/S:

cd /opt/gemstone
wget ftp://ftp.gemstone.com/pub/GemStone64/2.3.0/GemStone64Bit2.3.0-x86_64.Linux.zip
unzip GemStone64Bit2.3.0-x86_64.Linux.zip

Now we remove the link to our old product tree and set up a link to the new product tree:

rm product
ln -s /opt/gemstone/GemStone64Bit2.3.0-x86_64.Linux product

To verify that we have the new product, launch Topaz and check that the build number is 20209:

topaz
exit

At this point we can update the config file, copy an extent, and start the server:

echo "SHR_PAGE_CACHE_SIZE_KB = 100000;" \
    >> /opt/gemstone/product/seaside/data/system.conf
cp $GEMSTONE/bin/extent0.seaside.dbf $GEMSTONE_DATADIR/extent0.dbf
chmod +w $GEMSTONE_DATADIR/extent0.dbf
startnetldi -g -a glass -p 50378:50378
startGemstone
runSeasideGems start
gslist -cvl

If all goes well, then you should have a new database running Seaside. Try it out by browsing to the site from your client:

http://slice/

At this point follow these instructions to see if Dale has any updates to GLASS.

A screencast of these instructions is available on Vimeo (compressed) or full-size (11.8 MB).

In a recent post I described how to set up Apache and GemStone/S on Slicehost and we ended with running Seaside. This post will describe how to connect to your GLASS system from GemTools and update Seaside (and related packages) to the latest release.

In a local shell, we log in to the Slicehost server using SSH (earlier I described an alias ‘slice’ that I have for this command):

  • ssh -p 30000 glass@slice

Once connected we run a script to set some environment variables and verify that the system is running:

  • source /opt/gemstone/product/seaside/defSeaside
  • gslist

If gslist does not show the appropriate processes, start them:

  • startGemstone
  • runSeasideGems start

The next step is to start the NetLDI service. This service listens on a port (during our initial setup the script defined 50377 as the port for NetLDI), starts gems in guest mode with the glass account, and uses a special port range (in our case one port, 50378, use more if there will be many concurrent connections) to communicate with the newly-started gem.

  • startnetldi -g -a glass -p 50378:50378

Now we can return to our client environment and start GemTools. GemTools is a Squeak application available from the downloads page at seaside.gemstone.com. In GemTools we need to identify the GLASS host by IP address or host name. In my case I’ve added ‘slice’ to my hosts file so I can give the host name. Click the “Login” button to connect to GemStone.

On the Transcript window there are a row of buttons. Click “Monticello” to open a Monticello browser. In this browser we have a list of the packages currently installed in our system. Select the GLASS package on the left pane and note the list of servers for that package in the right pane. Select the http server and click the “Open” button. This will open a new window with the packages available on that server in the left pane and a list of versions in the right pane. Select the latest one (at the top), and click the “Load” button. Each of these steps is somewhat slow, so be patient. Once the package is loaded, you can close the Monticello browsers.

From the Transcript, you can click “Browse” to browse code and you can execute Smalltalk code in the text entry widget.

This use of GemTools will form the basis of much of what we do later in developing a Seaside application in GLASS.

UPDATE 2008-12-16: Mac OS 10.5.6 is out and http://support.apple.com/kb/HT3194 says that it “Includes fixes for possible graphics distortion issues with certain ATI graphics cards.” It does appear that thousands of colors now displays properly.

UPDATE 2008-10-25: Working with the good folk at ScreenFlow, it does seem that the problem is pretty clearly with the Mac OS. If you switch to thousands of colors the title bar for other applications gets stripes in the title bar–even without ScreenFlow running.

UPDATE 2008-10-05: Further investigation suggests that the problem occurs when the display colors is set to Thousands. The problem does not occur when the colors is set to Millions.

According to Apple, the latest update to Leopard (10.5.5) “[i]ncludes extensive graphics enhancements.” Unfortunately, these “enhancements” do not play well with ScreenFlow.

I have been using ScreenFlow for a couple weeks, and have been generally quite pleased with it. (Randal Schwartz, who had recommended ScreenFlow, described my recent work as “a well produced video” and was surprised when I told him it had been done with ScreenFlow!)

A couple days ago my MacBook Pro offered to install the latest OS X update that promised better security and stability. I’m generally a “bleeding-edge” sort of guy, so willingly take anything offered.

Yesterday, when trying to do a screen capture, I found a problem. By way of background, when I do a screen capture, I usually set the resolution to 800×600 since that is as big as the resulting movie is likely to be and I generally want people to be able to read the screen. Well, I set the screen resolution down, started the recording, and then looked at the result:

ScreenFlow after Mac OS X 10.5.5 Update

ScreenFlow after Mac OS X 10.5.5 Update

It has taken me half the day to recover back to 10.5.4. At first I tried to use Time Machine to simply restore my System folder. This ended up corrupting things badly enough so the computer would not boot. I then did a full disk restore to the latest backup (which went quite smoothly). Then, I copied the /System directory out of the backup disk (using the Finder, not using the Time Machine user interface) to a temp folder. From there, I use the Terminal to move the current /System/Library to a backup, and move in the old one as the current one. When I rebooted, I was on 10.5.4 and ScreenFlow works fine.

I’ve no idea of the cause of the problem, but I’ve put in a support request for ScreenFlow to address the problem. I’m glad to be back in business with ScreenFlow and hope I can upgrade to 10.5.5 soon!

I’ve finished editing a video of the OTUG presentation last week. It is available on Vimeo or you can download the 288 MB file here. The slides are available as well. If you would like to have a similar presentation for your group, let us know!

Categories