Some architecture questions - need help

Hi guys,

I am a Java/J2ee programmer and just came across ruby & ruby on rails,
played with it a bit and found it great.
A new client/server project I need to be responsible of, contains the
following:

MVC architecture
RMI - to send methods via tcp/ip to a third-party program written in C+
+ that accepts the data and send it back manipulated.
(We used rmi, stubs,jndi in our java/j2ee environment)
Multithreading - My project will have many users creating many tasks
that will need to go back & forth through the network from the ruby
code to a C++ code (FastCGI???).

In first glance I can see, ROR is great with data manipulation web
sites, that most actions involve receiving data from user doing
manipulation and sending it back.
Can ROR ignite an asynchrony process that will interact with C++ dll's
using a wrapper of some sort?

Can this be done by ruby on rails ? what kind of web server should I
use (Apache,LightTPD?)I'm not locked on anything
Should I use JRuby for that?
Are there any plug-ins for that?

Ths are many questions, I know :frowning:

But with few guidelines from someone who knows (and I know shit about
ROR),
I can build my environment. (my OS is Windows).

Thanks a lot and waiting for HELP :slight_smile:

Yossi

Hi guys,

I am a Java/J2ee programmer and just came across ruby & ruby on rails,
played with it a bit and found it great.
A new client/server project I need to be responsible of, contains the
following:

I would say that you are outside the sweet spot for Rails. Rails really
expects to be sitting on a database, and expects you to interact with
it in standard ways - via a web browser or other HTTP client, via e-mail
etc. There are plugins for lots of things (BackgrounDRb comes to mind)
that can help you, but you are doing most of your real work in pure Ruby
then.

MVC architecture
RMI - to send methods via tcp/ip to a third-party program written in C+
+ that accepts the data and send it back manipulated.
(We used rmi, stubs,jndi in our java/j2ee environment)
Multithreading - My project will have many users creating many tasks
that will need to go back & forth through the network from the ruby
code to a C++ code (FastCGI???).

The Rails concurrency model is per-process not per thread.

In first glance I can see, ROR is great with data manipulation web
sites, that most actions involve receiving data from user doing
manipulation and sending it back.
Can ROR ignite an asynchrony process that will interact with C++ dll's
using a wrapper of some sort?

Yeah, you could probably make it work, but what value is it? You are
barely using Rails then, except maybe its presentation elements.

Can this be done by ruby on rails ? what kind of web server should I
use (Apache,LightTPD?)I'm not locked on anything
Should I use JRuby for that?

You have a lot of Java dependencies - I would almost certainly be using
JRuby - those RMI dependencies would be tricky to use in Ruby. As for
your web server, just use Mongrel for everything, unless you have a need
for a more sophisticated web stack. Your web stack depends an awful
lot on whether you are on the internet or off the internet (intranet apps).

FYI: Mongrel is a kind of ubiquitous web app server in Ruby. It occupies
the kind of role that Tomcat has historically played in the Java community.
(However their architectures are significantly different - Mongrel draws a
lot of inspiration from the Java Web Framework Simpleweb.

Are there any plug-ins for that?

Ths are many questions, I know :frowning:

But with few guidelines from someone who knows (and I know shit about
ROR),
I can build my environment. (my OS is Windows).

Some interesting options disappear when you deploy to windows. Typically many
options that are a no-brainer on Unix environments, require
consideration when you
deploy to windows. This may not affect you.

Thanks a lot and waiting for HELP :slight_smile:

Yossi

I don't know what your intent is, but it appears that your application
depends on having
a web UI on top of a lot of custom, binary messaging protocols,
requires kernel threading
and doesn't have much of a data tier.

You would probably be better served by some of the alternative Ruby
Web frameworks like
Merb instead, or even Sinatra or Camping. Or even just writing simple
Mongrel handlers. You
have considerably more freedom in these web frameworks with what goes
at the back of
your web UI, than in Rails.

However the lack of available notes on these approaches might really
hurt you. You would
probably be better served by posting your response on the jruby
mailing list, where there is
likely to be a lot Java -> Ruby/RoR members who might be more familiar
with the type of
app you are building.

regards,
Richard.