Chapter 13. Introduction to ROP

Table of Contents

What is ROP
Main Features

What is ROP

"Remote Object Persistence" is a low-overhead web services-based technology that provides lightweight object persistence and query functionality to 'remote' applications. In other words it provides familiar Cayenne API to applications that do not have direct access to the database. Instead such applications would access Cayenne Web Service (CWS). A single abstract data model (expressed as Cayenne XML DataMap) is used on the server and on the client, while execution logic can be partitioned between the tiers.The following picture compares a regular Cayenne web application and a rich client application that uses remote object persistence technology:

Persistence stack above consists of the following parts:

  • ORM Tier: a server-side Cayenne Java application that directly connects to the database via JDBC.

  • CWS (Cayenne Web Service): A wrapper around an ORM tier that makes it accessible to remote CWS clients.

  • Remote Tier (aka Client Tier): A Java application that has no direct DB connection and persists its objects by connecting to remote Cayenne Web Service (CWS). Note that CWS Client doesn't have to be a desktop application. It can be another server-side application. The word "client" means a client of Cayenne Web Service.

Main Features

  • Unified approach to lightweight object persistence across multiple tiers of a distributed system.

  • Same abstract object model on the server and on the client.

  • Client can "bootstrap" from the server by dynamically loading persistence metadata.

  • An ability to define client objects differently than the server ones, and still have seamless persistence.

  • Generic web service interface that doesn't change when object model changes.

  • An ability to work in two modes: dedicated session mode or shared ("chat") mode when multiple remote clients collaboratively work on the same data.

  • Lazy object and collection faulting.

  • Full context lifecycle

  • Queries, expressions, local query caching, paginated queries.

  • Validation

  • Delete Rules