Interlude: How to get a remote server (for Seaside deployment)

Table of Contents:

For the purposes of this tutorial, I’m going to walk you through setting up Pharo on a remote Ubuntu Linux server. This, of course, requires first getting such a server. The easiest (and cheapest) option that I’ve found is to get Squeak/Pharo running on a low-cost Virtual Private Server (VPS).

Here’s what I want you to come away with: Hosting for Seaside is fairly easy, and within your reach.
And, it is no different than hosting options for other (non-PHP) languages, such as Ruby, Python or Java. If you’re a hobbyist developer, or just want to test it out, there’s free options available. If you’re a pro, you can get a (virtual) remote server with full shell access for very little, for just $5-20/month, USD, or an actual physical server for about a hundred a month. Pair that with basic Linux sysadmin skills, and you’re good to go.

Low Cost Options – Virtual Private Servers

Getting yourself a Virtual Private Server hosting account is the easiest and cheapest way to get started with deploying your apps (in any sort of dynamic language). This is what I use, myself, at the moment.
Advantage: Low cost, you have full root access to the OS
Disadvantage: Self-managed (you have to provide the system administration), low disk space (compared to dedicated servers — VPSs have from 10-50Gb of disk space), slower (than dedicated physical servers)

For hosting, I went with a Digital Ocean VPS instance. The amount of RAM, disk space, bandwidth and processing power you can get for $5 to $10 US a month can’t be beat.

I polled my web app developer friends recently, as to what sort of hosting service they use (they are mostly Ruby and Python developers). They also use VPS hosting, with either Digital Ocean, or Linode (there was one person using Slicehost, but they were switching to Linode). Out of those, Digital Ocean has the best value, although Linode has is more established and highly regarded for business use.

Low Cost Options – Cloud Hosting

Pharocloud looks very promising. They are attempting to provide the same level of ease and convenience for Smalltalk developers as Heroku does for Ruby/Rails developers. The important feature here is that they also provide persistence services (Postgres, etc) for your Pharo/Seaside/whatever images.

Amazon Elastic Compute Cloud (EC2) For not much more cost per month than a medium-size VPS, you can also deploy your Seaside application to the cloud, which gets you load balancing, unlimited scaling capability, and more.
Deployment to EC2 – Resources:

Medium Cost Option – Dedicated Servers

If you need fast performance, and lots of memory and disk space (and you’re a professional developer or a small company), you have to go with an actual dedicated physical server at a colocation facility.
Fortunately, these are still fairly inexpensive (compared to what they used to cost even a few years ago). You have two options:
Unmanaged Servers (they give you a physcal box and remote access, just like with a VPS, and you provide the system administration). DedicatedNow has unmanaged servers for $99 USD/month (this includes a 2-core CPU with 2Gb RAM and 2Tb disk space), and Westhost has a slightly less beefy server (with 500Mb ram) for $95/month.

You can also choose Managed Servers, where the host provides you with a box and performs system administration for you, guarantees your uptime and manages your security. DedicatedNow has a managed server (with 4Gb RAM!) for $200 USD/month.

Free Options

If you just want to try out the Smalltalk/Seaside deployment process and you do not want to pay, or if you’re developing a free service, you have a number of free options.

Seaside Hosting offers free 256MB hosting partitions for non-commercial Seaside applications (see the chapter on deploying to SeasideHosting of the Seaside book, and the Seaside hosting Pharocast). This is where the official Seaside site is hosted, for instance.
Advantage: It’s free, and they’re knowledgeable about Seaside.
Disadvantage: For non-commercial apps only, 256MB disk limit, no shell access or access to databases (so, you basically store your data in the image). See also this StackOverflow question, Can I host a SandstoneDB on – and the upshot is, no, you can’t at this point.

Free Shell Access
There is also a number of places that provide you with free hosting accounts that you can SSH into — see the Free Shells List or just google for ‘free shell’ access. For free, these are obviously going to be small and underpowered hosting accounts, with not much memory, diskspace or bandwidth provided. But, they are full on development environments, with database access and everything and you can get Squeak/Pharo to run on most of them.
The only one of these free shell services I have experience with is the SDF Lonestar organization – and hey, it does what it says on the box.
Advantage: Free. Full SSH access, databases
Disadvantage: Slow, resource restrictions (RAM, disk space, bandwidth), and there may be issues with Terms of Service restrictions

Open Source/Community Applications
One more thing. If you have no budget, but you’re developing a free and helpful service that might benefit other people, don’t despair. Develop it, and put it up on a free hosting service above for beta testing. When you outgrow free hosting and need more power (or disk space, or bandwidth)… you should just ask. Seriously, if you’ve come up with really good software that benefits people, the community can probably find hosting for you. Ask on the mailing lists (Seaside, Squeak, Pharo), ask individual developers or universities… Doors will be opened to you.

News Roundup: Social Code Commenting, User Management, and Java Interop

Couple of interesting items from the Pharo mailing list.

Comment of the Day Contest

In a thread titled The Comment Game – MMORPG for real, Laurent Laffont proposed a game. Each day, an un-commented class would be picked from the Pharo class hierarchy, and people on the list would propose comments for the class (which would then be added to the next release).

This is a great idea, not to mention hilarious. Comments (especially class comments) are worth their weight in gold, and this is an easy and low-key way to slowly improve the quality of the codebase. Not to mention harnessing the wisdom of the crowds, etc. Several classes have already been commented: MCFileRepositoryInspector, HTTPClient, and more.

The results of the daily commenting contests are collated at: Pharo Wiki – CommentOfTheDayContest

JNIPort, a Java interop library, announced for VisualWorks, Pharo and Squeak

Satuday, the release of JNIPort 2.0 was announced by Joachim Geidel. JNIPort is “a Smalltalk library which allows Java code to be invoked from
Smalltalk”. This is excellent news – the more interoperability options the Smalltalk ecosystem has, the better. I look forward to checking out the library.

New Authentication/Login/User Account Management package for Seaside

Earlier this month, Tony Fleig announced a new package, TFLogin to handle some common web app tasks – user authentication, registration and account management. This is incredibly important, and I will be reviewing this package and discussing Seaside user management options as soon as I’m done with the Remote Hello World post series.

Thanks Tony!