LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > Lightweight MVC Ruby framework and LS?

Reply
 
Thread Tools Display Modes
  #1  
Old 12-19-2006, 12:27 AM
aemadrid aemadrid is offline
Senior Member
 
Join Date: Aug 2006
Posts: 57
Default Lightweight MVC Ruby framework and LS?

I have been working with Rails for the last 2 yearsand it's been great. Nevertheless, I am looking for a lightweight MVC Ruby framework that integrates well with LS. Looking around I found Merb which seems to fit what I'm looking for just right although the integration with LS through the LSAPI does not seem obvious or even possible. My problem is that I love how the LSAPI forks children on a need to use basis without my undivided attention and Merb (and Mongrel for that matter) like to do their own thing. Am I missing something? Is there an easy way to get both the LSAPI hookup and lightweight Rails mojo at the same time? Any ideas?

Thanks in advance,


AEM
Reply With Quote
  #2  
Old 12-20-2006, 08:48 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
I think it is possible, LSAPI is a communication protocol between LSWS and ruby, should be able to run anything on top of that.

The hook between LSAPI and any ruby web application should be very simple, just take a look at our RailsRunner.rb. You can try make a hook to the Merb in pure ruby.
Reply With Quote
  #3  
Old 12-20-2006, 12:04 PM
aemadrid aemadrid is offline
Senior Member
 
Join Date: Aug 2006
Posts: 57
Default Wrapping

I'm trying to figure it out. Merb is basically a large HttpHandler for Mongrel and from what I read in the Wiki the only way to run Mongrel is through proxying. For fun I'm going to try to run an skeleton Merb app and try to run:

Code:
while LSAPI.accept != nil
  Merb::Server.run
end
Something tells me it's going to break but we'll see. Another approach came from looking at the LSAPI examples. What if I could take the guts of Mongrel for URL parsing and do my own processing ala Merb there. I don't know, seems like a lot of work but we'll see.

Thanks!


AEM


Quote:
Originally Posted by mistwang View Post
I think it is possible, LSAPI is a communication protocol between LSWS and ruby, should be able to run anything on top of that.

The hook between LSAPI and any ruby web application should be very simple, just take a look at our RailsRunner.rb. You can try make a hook to the Merb in pure ruby.
Reply With Quote
  #4  
Old 12-20-2006, 12:15 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
You can safely assume it is a persistent CGI container, all CGI environment variables is available. On top of that, you can craft a Mongrel HttpHandler object and make Merb think it is running under Mongrel.
Reply With Quote
  #5  
Old 12-21-2006, 03:28 PM
aemadrid aemadrid is offline
Senior Member
 
Join Date: Aug 2006
Posts: 57
Thanks for for the info. I tried getting Merb to run using the LSAPI but it didn't work. Nevertheless, I'm going forward with starting from scratch using the standard cgi libraries. I'm loving the performance so far. We'll see how it does at the end of the project.

Thanks again,


Adrian Madrid

Quote:
Originally Posted by mistwang View Post
You can safely assume it is a persistent CGI container, all CGI environment variables is available. On top of that, you can craft a Mongrel HttpHandler object and make Merb think it is running under Mongrel.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:36 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.