If you're not running on rails threadsafe! mode you'll have no
concurrency issues. A messaging queue could also be a solution to your
problem.

-
Maurício Linhares
http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr



On Mon, Aug 17, 2009 at 8:56 PM, Frank
Poo<[email protected]> wrote:
>
>
>
> Hi folks:
>
> I'm building something akin to Google Analytics and currently I'm doing
> real time database updates.  However this isn't really scaling anymore,
> so I need to stop doing synchronous DB operations.  In the short term,
> I'm trying to reduce DB writes, so I'm thinking about a global hash (say
> declared in environment.rb) that is accessible from my controllers and
> models that I can write to in lieu of writing to the DB.  Every so often
> I can have a task write the updates that need to be written to the DB.
>
> Question:
> 1) Does this sound reasonable?
> 2) Will I run into any concurrency problems?  Which ones?
> 3) How does this compare with writing to the file system and importing
> later?
>
> Thanks so much in advance, you ROCK!
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to