On Sep 8, 8:27 am, Konstantin <[EMAIL PROTECTED]> wrote:
> > Why would you need to? You've already got mongrel or apache or
> > whatever sitting in front of it (unless you're not doing this over http)
>
> To say truly, it's my first API script (and the first daemon script),
> and I have poor theoretical knowledge in this area. So I have tried to
> make something, but maybe in the wrong way.
> I just thought, that if I make a controller in Rails application, it
> will initialize many unnecessary actions and it may be very time
> consumable. In my script I use only limited number of Models, no
> templates, no controllers.
> Moreover, for API script I need a non-standard port (because some
> clients work badly with 80 and 443 ports), but the whole Rails
> application should work as normal.
>
> Can this be done inside a regular Rails application? Will be thankful
> for good tips :)
This could all be done inside a regular rails app and there's very
little reason to do otherwise (you might want to run your api off a
dedicated cluster of mongrels but right now that would probably be
premature optimisation). You claim to be worry about efficiency, but
it sounds like you've already made it massively inefficient by writing
it as a script that reloads the rails environment for each request.
In terms of tips there aren't really - just do it. You'll have to
fiddle around with your apache configs to get it served on a different
port from the rest of your apps but that's the only fiddly bit.
Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---