I've been wondering about this particular use case for a while:
A client application simply uses get, put, and query for objects stored in Infinispan,
where the objects really are mapped to a real schema in a relational database. If the
objects were JPA-like entities, the database mapping could be defined via a subset of the
JPA annotations. Essentially, Infinispan becomes a key-value store on top of a traditional
database with a domain-specific schema. Add some JAXB annotations, and it quickly becomes
possible to expose these entities via a simple RESTful service. A new cache store
implementation could persist the entities to JDBC using the annotations.
This may seem a bit odd at first. Why not just use JPA directly? IMO, for a certain class
of applications, this scenario is architecturally easier to understand. Plus, if you put
this on top of Teiid's ability to create a virtual database (with a virtual schema
that matches what you want the objects to be), then you could put these new entities on
top of an existing database with a schema that doesn't necessarily mirror the entity
structure.
Is this crazy? Is there a better way of achieving this?
Randall
Show replies by date