Hacker News new | past | comments | ask | show | jobs | submit login
No True "mod_ruby" Is Damaging Ruby's Viability On The Web (rubyinside.com)
12 points by pius on Jan 10, 2008 | hide | past | favorite | 6 comments



I just deployed two applications for a client using mod_ruby and eruby. You can just upload rhtml files, and they just work. I may be missing something here, but it seems to me that you can use mod_ruby just like mod_php.

Is this the best way to develop most applications? Probably not, but it's good for simple, quick and dirty projects. I'm a big fan of the application continuously running inside the web server as is usually done with Hunchentoot.


> but it seems to me that you can use mod_ruby just like mod_php.

If two apps are using the same Ruby instance, then they are sharing String, Array, Integer, etc. And ObjectSpace. So one app can alter any class (say, undefine or redefine to_s on something) and the other app will share those changes.

mod_ruby runs all apps in the same Ruby process.

If the Web sites are pretty basic and not using any metaprogramming magic, then maybe there will be no problem. If they are creating classes with the same name, but different behavior, then maybe not so good.


That could be just a bit problematic. PHP doesn't have Ruby's metaprogramming features, but it does have globals, classes and the like. How does it deal with this issue?


Couldn't you just use mod_lisp? It's not actually lisp-specific, IIRC.


You could also get the same effect using mod_proxy and not have to modify mongrel or webrick to speak the mod_lisp protocol. mod_lisp doesn't solve the problem as it requires a continuously running process to handle requests, and per-app additions to the Apache config. You can't just upload the files and go on typical shared hosting.


"DHH's opinion appears to be that shared hosts should put up or shut up, but I disagree"

Ugh. He said it should be solved by people who need a solution. He doesn't used shared hosting, so it's not his priority.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: