Quoting PierreW
<wamrewam-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>:> Hi guys,
>
> I need to make an "architecture" choice for my app. I believe it
> corresponds to a fairly common case, yet I can''t find much input
> online. I was hoping you could give me some recommendations or point
> me in the right direction.
>
> The app is a kind of mashup, so it does two things:
> - handle users requests. I call it the "live" part.
> - at regular intervals, build cache information, then merge it with
> the main info. It is my "background" part.
>
There are a number of Ruby/Rails background processors (Workling/Starling,
BackgroundRb, etc.). Most are multi-threaded or multi-process. Have a
cronjob (or use any built-in cron type scheduling) to dump a bunch of Web
service requests into the queue and let the background processor handle the
multi-tasking.
Any decent database server can handle requests from multiple processes. You
may need to use some kind of locking (table locking, row locking,
transactions) to handle overlapping read/update/write requests. I know MySQL
and Postgres can handle this. Probably MSSQL (I don''t work w/
Windows). I
don''t know enough about sqlite3 to say.
Use any of the Rails servers (Mongrel, Passenger, Apache, Nginx, ...) for the
live part. Start with one of the debug/development friendly, single-threaded
servers (Webrick and others). Deploy on a heavier duty server that can handle
the expected load, or at least the load until your idea proves itself, or
disproves itself with real users.
There are a number of solutions of varying scale that have relatively light
switching costs. Start small and friendly and then swap pieces of the
solution as the load increases.
And don''t chase the latest and greatest, "best" technology at
the expense of
developing your idea.
HTH,
Jeffrey
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.