I have a 2-tier application (a heavy client written in C++ which connects to the object-oriented database). The database itself is InterSystems Cache', and it is actually both a database and an application server (Cache' is also a MUMPS interpreter).
For performance reasons, I want to design a client-side cache (or, more generally, a persistence manager).
InterSystems Cache' does have "fast" interfaces like ODBC/JDBC, but I'm dealing with a lot of legacy client code which has already been using Object Binding for ages. So I can't change the architecture of the client, but have to make the protocol faster. The protocol itself is originally very verbose: all class/method/property names are sent verbatim, so, for instance, creating a single object server-side "costs" me 50k traffic.
Classes at the server side support inheritance and can have properties and methods. So using Cache' Object Binding means I can:
- create and delete objects,
- read and update properties, and
- call methods.
What is important here, a server-side method call generally executes the code, the nature of which is unknown to the client. Since this code may potentially alter the state of the objects in the database, client-side cache may need to be invalidated after a method call. This is different from regular CRUD operations, where the client can keep track of changes he made to the objects, and update the cache accordingly.
Questions:
- Which Java persistence managers are worth looking at, so that I can take the idea and reinvent the wheel? I'm thinking of J2EE entity beans, JPA, and in-memory grids like Coherence.
- Which C++ persistence managers can be adapted to use the InterSystems API? Particularly, are Protocol Buffers a fit for my task?
- Which methods can be used to "compress" the protocol which is originally very verbose on the wire? My first call is ZIP-compressing the traffic and hashing (encoding) class/method/property names (so that a TLV structure containing integers instead of names is sent over the network). Any other ideas?
- What reading on Enterprise Patterns (particularly, in C++) applicable in my case can you suggest?