a
Speedo is in fact a assembly of several existing product solving a part of the problem. Then to understand the Speedo architecture, aknownledges on the following topics are required:
Here is a plan of this documentation:
The persistant instance is enhanced in order to become a SpeedoProxy implementation. A SpeedoProxy instance supports the PBinding interface (see JORM concepts), the CacheEntry interface (see Perseus concepts), and the javax.jdo.PersistenceCapable concept.
|
![]() |
A SpeedoAccessor is a java instance containing the fields of the persistence class. The SpeedoAccessor is a kind of state associated to a persistent class. The fact to externalize the state from the persistent class, permit to choose easily the concurrency policy:
The SpeedoAccessor is also a State containg the status (dirty, new, clean, deleted, ...) of the persistent instance in the context (working set /transaction). |
![]() |
In memory there is an unique persistent instance (SpeedoProxy) with a
particular identifier, but there is one or several states (SpeedoAccessor). A
SpeedoAccessor can be shared or not weither the concurrency policy. |
![]() |
This section presents the management of ProxyManager components. There
The SpeedoProxyManager component:
The SpeedoProxyManager component is a primitive component exporting the
interface
ProxyManager. A SpeedoProxyManager is a javax.jdo.PersistenceManager.
This component implements therefore all methods of the
javax.jdo.PersistenceManager interface. The SPM (SpeedoProxyManager) is
always linked to a WorkingSet which is also the javax.jdo.Transaction.
This implementation delegates most of the JDO methods (
javax.jdo.PersistenceManager) to the underlying
TransactionPersistenceManager, the perseus component managing the concurrency,
the caching and the loading aspect.
In order to represents a working set (transtional or not) this PM is linked
forever to an org.
objectweb.speedo.workingset.api.Transaction instance. The status of this
Transaction instance changes when this PM is allocated or closed, or when
transaction demarcations are done through the javax.jdo.Transaction
interface.
This implementation uses a
QueryManager for allocating
CompiledQuery instance.
Concerning the javax.jdo.Query implementation, this PM uses
SpeedoQuery
which are created each time (No
pooling mechanism).
The SpeedoProxyManager uses a JormFactory
for fetching PClassMapping instances
and therefore for assuming the initialization of the JORM persistent classes.
The SpeedoProxyManager uses a PNameCoder
(org.objectweb.jorm.naming.api.PNameCoder) in order to convert identifiers of
persistent classes. The translation is bidirectional between internal identifier
(org.objectweb.jorm.naming.api.PName) and user identifier (String, object id
class, ..).
The SpeedoProxyManagerFactory component:
The SpeepoProxyManagerFactory is a factory of SpeedoProxyManager. This
primitive component exports the
ProxyManagerFactory interface, permitting to manage the proxy manager
allocations. Due to a high cost of SpeedoProxyManager instances allocation, the
unsused SpeedoProxyManager are pooled. For this reason, the
SpeedoProxyManagerFactory uses a Pool
(org.objectweb.perseus.pool.api.Pool) managing SpeedoProxyManager. The
SpeedoProxyManagerFactory manages also the attachement of SpeedoProxyManager
to the current thread through the SpeedoProxyManagerSwitch component (see
below).
The SpeedoProxyManagerInstanciator component:
The ProxyManagerInstanciator is a primitive components in charge of the
ProxyManager and the Transaction allocation. It exports the PoolMatchFactory
interface in order to be used by a Pool as Factory of pool resource. The pool
resource is the ProxyManager instance.
It uses a ConnectionHolderFactory for allocating ConnectionHolder to the created
Transaction components.
The SpeedoProxyManagerSwitch component:
The
SpeedoProxyManagerSwitch is an implementation of
the
ProxyManagerSwitch based on the use of a ThreadLocal
field, for binding ProxyManager instances to threads. The ThreadLocal
field contains an instance of ProxyManager of an ArrayList of ProxyManager. A
SpeedoProxyManagerSwitch is a fractal component which have no bindings.
TODO
The SpeedoQueryManager component:
The compiled query
TODO
TODO
TODO
TODO