Hi guys,
It’s a pleasure for me to join your community mailing list. I am a
keen software engineer and experimenter, and happen to investigate and
dive into the Ruby language from a couple of weeks. So far i have
become familiar with the basics of the syntax and semantics of the
language, and, of course, i would like to get to know the Ruby web
application framework Rails too. But i enjoy understanding the
principles which a software platform relies on, so i would kindly like
to ask you some questions about the architecture of the Rails
framework that i couldn’t find by googling , and would highly
appreciate your comments and answers.
Since i come from the JavaSE and JavaEE world, its inevitable for me
to try to use the analogy principles between Ruby and Java. In JavaSE
we write standalone applications, which we execute over a JVM. In
JavaEE we can write web applications, which require a JavaEE web
server and container to be deployed in (and of course, underlying the
container there is a JVM).
In the classical Ruby scenario, we write standalone applications,
which we run on Ruby VM (there are a lot of VMs, implemented in
different languages). But when it comes to writing Ruby web
applications on Rails, we need some more sophisticated execution
environment, such as a Rails web server - WEBrick, Mongrel, etc. Am i
already getting it wrong ? Are WEBrick, Mongrel the Ruby analogies of
a JavaEE application server, or they are actually something completely
different?
Google says that Mongrel is a web server, but isn’t Mongrel also
executing Ruby code ?
It seems that to execute a Rails application, one needs a Ruby VM and
a Ruby web server (and of course, the Rails framework itself
installed). But where is the application code executed - directly in
the Ruby VM, or inside the Ruby web server (as is in JavaEE: servlets/
JSPs are executed inside the web container) ? That means, what exactly
is a Ruby web server doing in the whole picture ? Is it just
dispatching HTTP requests to Ruby classes to handle them, i.e. it is
only a mediator ? Or is it executing the application code, just like a
web container that executes servlet code ?
I would highly appreciate any guidance on this, since so far i cannot
answer these questions.
Kindest Regards,
Krum.