I am just wandering is there is any reference how to design DAO (data access object) with multiple connection to different data source, in the right way. I need to build one on Ruby. In short, it should be object that provides simplified access to data stored in SQL DB, noSQL DB, etc. The methods should be write data to different data source and retrieve data from different data source, of course access to data source should be managed by priority, for example, noSQL much faster that SQL, so the data should be read from noSQL first.
I am pretty sure there are should be few examples, please point them out.
Try datamapper: http://datamapper.org/