Threads?


#1

Hi,

Every so often, I see Java people bashing RoR because it doesn’t have
distributed transactions and threads.

Are they talking about the lack of native threads in Ruby? Or
something else? And what types of applications would need them?

Joe


#2

Hi Joe

not sure if these people really bash or just wonder how to handle some
cases
they had to solve before in java / .net (and in ‘they’ I have to
include,
well, me ;).

About threads (or something which could be implemented using threads in
either java or .net), one thing is that I’d love to have some
cross-platform
way of scheduling things when your site is running (like the mass
mailing
example). In either .net or java, one possibility for that is to launch
a
thread at application startup, which can in turn poll a database every 6
hours to do the background job.

Sure, I can go the unix/cron road for RoR and it works well, but it
would be
really nice to have some higher level (and cross platform, to make the
testing more easy if your production platform is different from your dev
platform) primitives to handle the scheduling stuff (and if this cross
platform way already exists, well excuse the rookie I am, I’ll gladly
use
it!)

About distributed transactions and although I rarely had to use that,
it’s a
good way to ensure a robust and seamless interactions between for
instance a
big web site which would aggregate the products of several
manufacturers,
and the inventory engines of these manufacturers.

cheers

Thibaut