Replacing the database in Active Record with RPC-based interface

Hi there,

We're about to move our persistent store from a MySQL database to an
RPC-based data store.

However, we really like programming against the AR-api, and would like
to keep as much as possible from, so that we can keep stuff like
callbacks, validations, relations etc.

How would you do it?

Does it make sense to replace the mysql-adapter with and RPC-based
adapter, translating SQL statements into equivalent rpc calls? And the
convert the result-set into whatever AR uses in its conversion into
objects?

It's probably easiest to create your own model class from scratch that
mimics the same API. I started working on porting more abstract model
concepts (observers, validators, callbacks, etc) to a very
experimental ActiveModel project so this job should be easier in the
future. But, Rails 2.0 has taken priority.