Eruby vs php/jsp

Thanks for all the comments and suggestions. A bit more information about
the plan of project:

  1. It is a database driven web application, providing users a list of
    components to compare, read information, add to shoping carts etc. but it
    does NOT deal with payment system.

  2. The application may be hosted on a shared server provided by a hosting
    company, in this case, I think the most appropriate option might be PHP,
    because there aren’t any hosting company offering mod_ruby etc, as far as I
    know. However,

  3. It may also be hosted on our own server, in this case, the apache server
    will be dedicated to this application, so I guess the shared memory problem
    of mod_ruby may not be a big issue.

In fact I am quite happy with the style of ASP or PHP (mixed code with
HTML), but not so happy with the language used, so I would try to use ruby.
I am also interested in template system, but I am not sure if they are
"self-contained" or not, i.e., can I do everything in the template system,
including database read/write… and do I need to use mod_ruby or eRuby in
addition to the template system… I will read more about the Rail and
kwartz system.

Thanks,
Shannon

···

Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/

  1. The application may be hosted on a shared server provided by a
    hosting company, in this case, I think the most appropriate option
    might be PHP, because there aren’t any hosting company offering
    mod_ruby etc, as far as I know. However,

If there seemed to be a demand for it, I would consider it. However,
mod_ruby presents a can of worms for a hosting company, so it is no suprise
that it is a hard feature to find on shared servers.

  1. It may also be hosted on our own server, in this case, the apache
    server will be dedicated to this application, so I guess the shared
    memory problem of mod_ruby may not be a big issue.

If you are on your own server, it’s not. It then simply becomes an issue of
good coding practices to make sure one piece of code doesn’t walk on another.

In fact I am quite happy with the style of ASP or PHP (mixed code
with HTML), but not so happy with the language used, so I would try
to use ruby. I am also interested in template system, but I am not
sure if they are “self-contained” or not, i.e., can I do
everything in the template system, including database
read/write… and do I need to use mod_ruby or eRuby in addition to
the template system… I will read more about the Rail and kwartz system.

Kwartz is a templating system that is language agnostic. A Kwartz template
can be used with a variety of languages, including both PHP and Ruby, and
the resulting code generated from the Kwartz template is very fast.

More information can be found here: http://www.kuwata-lab.com/kwartz/

Amrita is a well entrenched Ruby templating system. One of the main knocks
against it is that it is memory hungry. However, it has a lot of users and
is pretty powerful:

http://www.brain-tokyo.jp/research/amrita/rdocs/

Cerise is a web application framework that uses Amrita templates. It has
some very nice features and has been around for quite a while. It’s
probably the most downloaded of the Ruby application frameworks.

http://cerise.rubyforge.org

Ruby on Rails has not been publically released, yet. However, there will be
a lot of people who really like it when it is. It is a nice piece of work.

Iowa is a web application framework & templating system that can be used for
applications or for regular dynamically generated web pages. It seperates
content from code is quite stable, currently being used on a bunch of
production sites, some running for as long as 2 years under it with no
problems. You can find out more about it at:

http://iowa.rubyforge.org

Borges is another application framework that has some very nice features for
the application developer. It uses continuations to provide a very linear
and traditional feel for the application developer. It is kind of a son (or
grandson?) of Iowa:

http://borges.rubyforge.org

As you can see, there are a lot of different choices. There are a few other
good ones that I haven’t mentioned (such as CGIKit). My advice would be to
read some of the documentation available on each of these and then try to
find one that suits your preferences best.

Kirk Haines

···

On Mon, 31 May 2004 01:10:27 +0900, Shannon Fang wrote

  1. The application may be hosted on a shared server provided by a
    hosting company, in this case, I think the most appropriate option
    might be PHP, because there aren’t any hosting company offering
    mod_ruby etc, as far as I know. However,

If there seemed to be a demand for it, I would consider it. However,
mod_ruby presents a can of worms for a hosting company, so it is no suprise
that it is a hard feature to find on shared servers.

  1. It may also be hosted on our own server, in this case, the apache
    server will be dedicated to this application, so I guess the shared
    memory problem of mod_ruby may not be a big issue.

If you are on your own server, it’s not. It then simply becomes an issue of
good coding practices to make sure one piece of code doesn’t walk on another.

In fact I am quite happy with the style of ASP or PHP (mixed code
with HTML), but not so happy with the language used, so I would try
to use ruby. I am also interested in template system, but I am not
sure if they are “self-contained” or not, i.e., can I do
everything in the template system, including database
read/write… and do I need to use mod_ruby or eRuby in addition to
the template system… I will read more about the Rail and kwartz system.

Kwartz is a templating system that is language agnostic. A Kwartz template
can be used with a variety of languages, including both PHP and Ruby, and
the resulting code generated from the Kwartz template is very fast.

More information can be found here: http://www.kuwata-lab.com/kwartz/

Amrita is a well entrenched Ruby templating system. One of the main knocks
against it is that it is memory hungry. However, it has a lot of users and
is pretty powerful:

http://www.brain-tokyo.jp/research/amrita/rdocs/

Cerise is a web application framework that uses Amrita templates. It has
some very nice features and has been around for quite a while. It’s
probably the most downloaded of the Ruby application frameworks.

http://cerise.rubyforge.org

Ruby on Rails has not been publically released, yet. However, there will be
a lot of people who really like it when it is. It is a nice piece of work.

Iowa is a web application framework & templating system that can be used for
applications or for regular dynamically generated web pages. It seperates
content from code is quite stable, currently being used on a bunch of
production sites, some running for as long as 2 years under it with no
problems. You can find out more about it at:

http://iowa.rubyforge.org

Borges is another application framework that has some very nice features for
the application developer. It uses continuations to provide a very linear
and traditional feel for the application developer. It is kind of a son (or
grandson?) of Iowa:

http://borges.rubyforge.org

As you can see, there are a lot of different choices. There are a few other
good ones that I haven’t mentioned (such as CGIKit). My advice would be to
read some of the documentation available on each of these and then try to
find one that suits your preferences best.

Kirk Haines

···

On Mon, 31 May 2004 01:10:27 +0900, Shannon Fang wrote

Shannon Fang wrote:

Thanks for all the comments and suggestions. A bit more information
about the plan of project:

  1. It is a database driven web application, providing users a list of
    components to compare, read information, add to shoping carts etc. but
    it does NOT deal with payment system.

  2. The application may be hosted on a shared server provided by a
    hosting company, in this case, I think the most appropriate option
    might be PHP, because there aren’t any hosting company offering
    mod_ruby etc, as far as I know. However,

  3. It may also be hosted on our own server, in this case, the apache
    server will be dedicated to this application, so I guess the shared
    memory problem of mod_ruby may not be a big issue.

In fact I am quite happy with the style of ASP or PHP (mixed code with
HTML), but not so happy with the language used, so I would try to use
ruby. I am also interested in template system, but I am not sure if
they are “self-contained” or not, i.e., can I do everything in the
template system, including database read/write… and do I need to use
mod_ruby or eRuby in addition to the template system… I will read
more about the Rail and kwartz system.

Thanks,
Shannon


Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/

Hosts that support ruby…

rootr.net - seems to have done it for the longest. I’m just moving from
them - mostly cause of the latency - they are in hong kong - should have
seen my clients
eyes whey i told him his stuff was in hong kong :). Fairly pleased,
other than that.

Hub.org - They run a virtual machine - meaning you would have a sandbox
to play in. Support was…fragmented. Ruby install is not
complete(-mod_ruby).

cihost.com - Nice deal on a dedicated box. 1 setup 29 a month. They get
kind of bristly when you ask them to install ruby,mod_ruby - it can be
challenging as they’ve found out… I’ve got my stuff running there now -
but am looking into moving. Now that mod_ruby, dbi, mysql-ruby has been
fixed, they want 150 an hour to fix php which was broken trying to fix
myql-ruby. Dont ask me how or why or anything - i’ve not heard, after
asking several times.

1and1. Dedictated box. 99 setup 49 a month. No ruby.

Which brings me to my next question, who out there wants to take a shot
at this install on redhat 9.2? The criteria is, you will have to charge
less than 150 an hour. Installing it myself i believe the
incombatibility has come from mysql 4.0, which i insisted on - hoping to
avoid ‘mysql has gone away’ errors, but, i think, whacks some of the
libraries used between dbi, and, interestingly, php(word from the admin
that installed things) any one hear of that??. Someone willing to do
that, give me the price(and something about your background), and i’ll
give you the keys. Maybe you could hook this Shannon up as well - 2 for
1 deal :slight_smile:

http://rootr.net/ruby.html

···

On Mon, 31 May 2004 01:37:09 +0900, Kirk Haines khaines@enigo.com wrote:

On Mon, 31 May 2004 01:10:27 +0900, Shannon Fang wrote

  1. The application may be hosted on a shared server provided by a
    hosting company, in this case, I think the most appropriate option
    might be PHP, because there aren’t any hosting company offering
    mod_ruby etc, as far as I know. However,

If there seemed to be a demand for it, I would consider it. However,
mod_ruby presents a can of worms for a hosting company, so it is no suprise
that it is a hard feature to find on shared servers.

Kirk Haines wrote:

  1. The application may be hosted on a shared server provided by a
    hosting company, in this case, I think the most appropriate option
    might be PHP, because there aren’t any hosting company offering
    mod_ruby etc, as far as I know. However,

If there seemed to be a demand for it, I would consider it. However,
mod_ruby presents a can of worms for a hosting company, so it is no suprise
that it is a hard feature to find on shared servers.

There’s a new trend with shared hosting that you might find appropriate
for your situation.

Instead of sharing apache with others and simply having your own
password-protected directory (traditional shared hosting), look into
VPS/VDS (virtual private server or virtual dedicated server).

After trying a few VPS/VDS shops, I’ve come to these opinions regarding
the 4 most used “virtual server” hosting technologies (kinda like vmware
for web hosting providers):

  1. Sphera’s “virtual” root access I tried seemed WAY too limited and I
    hated it. Didn’t even feel like I had root access.

  2. Virtuozzo’s “virtual” root access was decent–limitations include not
    being able to set system time within VPS that is different from the
    host, and some features of iptables not being available (like logging
    and state tracking). Other than that and inability to compile your own
    kernel, it “feels” like you have your own Linux box with your own file
    system and root user. VPS overhead is 3% since only one kernel is used
    and shared.

  3. User Mode Linux (UML) lets you have your own distro that is even
    different from other distros on the same box and even different from the
    host OS. Most flexible by far but everyone running their own kernel
    means everyone requires more memory from the shared box and the overhead
    is greater than Virtuozzo.

  4. FreeBSD Jail is one I haven’t tried yet but looks interesting. It is
    obviously only for FreeBSD and I believe the 2 limitations are no ICMP
    traffic and each VPS can only have 1 static ip address.

I chose Virtuozzo for now and am very happy. The iptables limitation is
annoying but I’m able to use many effective rules. The system time
issue was resolved by asking my provider to setup cron on the host OS to
sync with an atomic time server (which they did quickly to the benefit
of all VPS customers on that box). Other than these 2 issues and
inability to compile/install my own kernel, it feels like I have my own
dedicated box at shared hosting prices ($<20/month).

If you choose UML, then Linodes.com and jvds.com seem to be the most
popular choices mentioned at webhostingtalk.com.

I’m not mentioning my Virtuozzo provider yet because I’ve only used them
for a few weeks so far–I’ll probably post about them in a few months if
I’m still this happy. Installing ruby, mod_ruby, eruby, mod_dosevasive,
mod_security, etc. have been a snap within the VPS. I’m even hosting
multiple domains within one VPS account using apache.

···

On Mon, 31 May 2004 01:10:27 +0900, Shannon Fang wrote

If there seemed to be a demand for it, I would consider it. However,
mod_ruby presents a can of worms for a hosting company, so it is no suprise
that it is a hard feature to find on shared servers.

Is this the ‘all servers share the same globals’ problem?

I’ve shyed away from mod_ruby since being quite happy with its
power and usability because of this - could someone explain the actual
problems with it, and is there a fix? Do other systems like mod_perl
not have the same issues?

Jim and Bob are both using mod_ruby on the same host. Jim has software that
modifies Hash. Bob also has software that modifies Hash. Either Jim or Bob
is going to be upset because one of their programs is going to modify Hash
after the other, wiping out the other’s changes and causing software to fail.

The interpreter is shared. It is a model that makes technical sense, but it
leaves open the possibility that one program will walk on something that
another program needs. Most of the time this doesn’t happen, but when it
does, it is a pain in the butt problem.

And yes, mod_perl has the same issue. Long ago in a galaxy far, far away I
actually had it bite me when a server that I was running had two seperate
programs trying to do things in the same namespace. They just kept walking
on eachother and nothing worked. Once we discovered the problem, it was
easy to fix it and move on, but in a hosting environment you can’t count on
two random individuals to be quite so agreeable. :slight_smile:

In an environment where you are either in control of what is running on the
server, or you are at least dealing with coworkers who also understand the
need to play nicely with globals, namespaces, and modifications to core
pieces of Ruby like Hash, there is no reason not to use mod_ruby. And if
you want to do something special with your request handling and need to
write a handler to make that happen, mod_ruby is a delightfully easy way to
do that.

Kirk Haines

···

On Wed, 2 Jun 2004 17:38:53 +0900, Dick Davies wrote

I’ve shyed away from mod_ruby since being quite happy with its
power and usability because of this - could someone explain the
actual problems with it, and is there a fix? Do other systems like mod_perl
not have the same issues?