distributed models

Hello,
I am designing a web application that has several tiers including a
Flex client, Rails server and SAP back-end. The application is an
extension of functionality offered by SAP system. SOAP based web
services are used communicate with the back-end.
I am pondering on the implications of the fact that some of my data
models are likely to be in the back-end and some in the Rails
application and some are distributed (shared) between Rails and the
back-end. I would appreciate any pointers toward relevant knowledge on
this subject and if anyone tried something similar with Rails.
Some of the questions I have to find answers to are:
- How does one use ActiveRecord with shared models?
- What are the implications of this type of distributed design?
- Relevant design patterns.

thank you,
Slava

- How does one use ActiveRecord with shared models?

You don't, ActiveRecord is for relational databases only. If your
backend support REST-style web services, you can use ActiveResource
that looks like ActiveRecord.

- What are the implications of this type of distributed design?
- Relevant design patterns.

You'll find a discussion and many patterns related to this at
"Patterns of Enterprise Application Architeture" and "Domain Driven
Design" books.

Fine answer thank you much for your help.

thanks,
My back-end does not support REST web services. It supports SOAP web
services, so I can not use ActiveResource.
Since I posted this question, I found sap4rails library that replaces
ActiveRecord with SAP3Rails. The library looks like it was not
modified since 2007, so I am wondering if it is up-to-date. I wonder
if anyone has worked with sap4rails and if it is a good solution for
integrating with SAP back-end.

thanks,
Slava