Rails and Scaling with Multiple Databases
Custom Programming, Database, Framework, Ruby on Rails
Joe points out the following from this interview with Twitter’s Alex Payne:
The problem is that more instances of Rails (running as part of a Mongrel cluster, in our case) means more requests to your database. At this point in time there’s no facility in Rails to talk to more than one database at a time.
..
In my case, ActiveRecord provided exactly the right level of functionality. I can have multiple database connections established and write code to manage when each should be used. Control of which connection is used is managed at the model level. Connections cascade up inheritance chains and I can specify that one model use the connection specified on another model using a simple delegate statement:
class A < ActiveRecord::Base
end
class B < ActiveRecord::Base
class << self
delegate :connection, :to => A
end
end
…
Full article: http://tomayko.com/writings/rails-multiple-connections
License: Creative Commons
Indexed in May 2008
Related Info Web
- Why Trails is better than Rails
- Ajax and Ruby on Rails
- Rails-like PHP Framework
- Technology Watch and Competitive intelligence for SEM-SEO
- How to switch your default session store
I haven't used much of the new "Rails"type development kits yet. However, if I have to choose amongst them, I would be choosing Trails. The main problem with Grails (and Rails) is you are adding a new language to the mix. If all you have are highly skilled developers and not planning to do Global Resourcing then that's all cool.. .. So...
Selecting a framework for Ajax could be considered like placing a simple layer on top of a strong framework. Ajax and another framework are considered as two separate entities that will almost not touch each other.. .. But that parallelism between Ajax and their framework is not seen when you use Ruby on Rails. The Ajax and Ruby on Rails becomes one...
There are two Rails-like PHP frameworks gaining momentum and amounting a zealous following, both of which have recently gone stable.Symfony and CakePHP, written in pure PHP follow the same MVC (Model, View, Constroller) architecture found on Rails.. ... Full article: http://yelotofu.com/2007/03/rails-like-php-framework/ License: Creative Commons Attribution 3.0 Unported...
1. Introduction We can define Technology Watch as the systematic procedure of capturing, analysing and exploiting useful information for strategic decision making in a company or organisation. In this article we will analyse what Technology Watch consists of and its relation with other similar disciplines, like strategic planning, knowledge management and especially competitive intelligence, to which it is inseparable. .. The information sources can be...
About Rails session stores Sessions allow you to store objects in memory between requests. This is useful for objects that are not yet ready to be persisted, such as a Signup object constructed in a multi-paged process, or objects that don’t change much and are needed all the time, such as a User object for a system that requires login.. Rails has...
