Speedo is in fact a assembly of several existing products solving a part of the problem. Then to understand the Speedo architecture, knownledges on the following topics are required:
The plan for the documentation is as follows:
The SpeedoHome describes common fields and methods for a
persistent class.There is only one SpeedoHome instance per persistent
class. |
![]() |
The persistent 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. Externalizing the state from the persistent class enables to choose easily the concurrency policy:
The SpeedoAccessor is also a State containingg the status (dirty, new, clean, deleted, ...) of the persistent instance in the context (working set /transaction). |
![]() |
In memory there is only one SpeedoHome per persistent class. |
![]() |
This section presents the management of ProxyManager components.
There
The SpeedoProxyManager component:
The SpeedoProxyManager component is a primitive component exporting the
ProxyManager
interface. A SpeedoProxyManager is a javax.jdo.PersistenceManager.
Hence, this component implements 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 represent a working set (transactional or not) this PM is
forever linked 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 instances.
Concerning the javax.jdo.Query implementation, this PM uses
SpeedoQuery. There is no pooling
mechanism for queries: they are created every time it is needed.
The SpeedoProxyManager uses a JormFactory
to fetch PClassMapping instances
and to perform 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, enabling 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 component 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