Sunday, 11 January 2009

Introduction

My Witty Adventures

I'm just starting out on my Wt adventures and instead of creating yet another "How to" document that will be referenced a couple of times and then forgotten I thought I'd write a blog about it. This way it will hopefully help others starting out on the same adventure.

When I say that I'm just starting I literally mean "just starting" as I haven't even got a machine ready to trial it on.

What is Wt (Witty)?

If you're here then you'll probably have a good idea what it's all about, but if not then take a look at the Wt website; plus I don't think I could do it justice :).

To do

A Machine

Well the first thing I'm going to need is a machine. As I'm more familiar with Linux for robust server side applications I'm going to use OpenSuse 11.

"Why OpenSuse 11?": its my personal favourite Linux OS. Note that you don't need this OS to use Witty.

As I'm going to be using Apache all we need is:
  • Apache 1 or 2, or another web server which supports the FastCGI protocol.
I'll put this on a Virtual Machine using a VMWare server. As the installer for OpenSuse has advanced so much and there are so many tutorials on how to install it, I'm not going to spend a lot of time going into too much detail.

Wt Installation

As I want to use Wt in such a way that I'd know how to set it up in a production environment I'll install it so it's ready to be used with Apache. I'm aware that Wt comes with it's own web server but I don't think this is production strength. I have been informed that the wt-httpd is in production and is very reliable. As suggested I will look into this at a later stage and use it as a test harness. As Apache is the standard http engine used internally within my organisation I will be focused on ensuring that whatever I do works with that :)

Examples

I'll start off by simply getting the existing examples working; here comes another "Hello World" :)

Starting from scratch

It's all good and well having examples that have already been written and have their own compile scripts but I'll detail what I find when creating my own simple Wt Application.

Ok, now onto the installation of Suse.


2 comments:

  1. You write:
    "I'm aware that Wt comes with it's own web server but I don't think this is production strength.".

    Since I hope you will have a good experience with Wt, I would still recommend you to develop your application using the built-in httpd. FastCGI is much harder to configure, more inconvenient to deploy applications, and makes it harder to debug applications, compared to the built-in httpd.

    You could use the built-in httpd for development and the FastCGI connector for deployment, if you prefer. It does not even require recompilation: simply link against one of the two libraries.

    With respect to "production use", we have a very good experience with the combination of apache as reverse proxying frontend and wthttpd for Wt applications. Deployment of the homepage and examples uses this method, and they often get a nice beating of the Internet which the setup handles without a glitch. Although FastCGI has the benefit that deployment using multiple processes is easier, this is also possible using the built-in httpd with the --session-id-prefix.

    I any case, I wish you a lot of adventurous fun!

    ReplyDelete
  2. Thanks Koen. I've updated the blog to bring it in line with your comments.

    ReplyDelete