E. Caching Component
The fact that the gateway is acting as a broker between applications
and PACS servers means a latency penalty is imposed
due to the indirection of the requests. Users dislike waiting for
data, so the usability of applications relying on the gateway for
data access is also influenced by the latency of a request. It
is therefore desirable to minimize it. Considering the gatewaythere are two main sources of latency. The first one is the time
involved in accessing the back-end PACS. The second source
of latency is due to the computational expense of the request.
Particularly, the time the gateway takes to parse the request and
to perform any image conversion or transformations required. In
order to reduce both sources of latency a caching componentwas
implemented between the gateway’s web interfaces and communication
components. Since a number of representations may
exist for an object and each representation may be modified by
an image transformation (such as scaling, application of a region
of interest) an object may have a multitude of representations on
cache. Both the PACS native data type and requested transforms
are cached. Therefore, before asking for any resource from a
PACS, whenever a resource request is received, the cache is consulted.
If that resource is present on cache, the communication
components are not notified and no data are transferred from the
PACS to the broker, thereby reducing communication latency.
Depending on the cache temporality and previous requests, a
resource may be present on cache, but not with the desired representation.
In such cases, a transformation is performed on the
cached data only if there is no quality loss. Being implemented
as a standalone component, the caching policy is orthogonal and
transparent to both the client and other components of the gateway.
The caching mechanism currently in place follows a Least
Recently Used discard policy. However, this component has access
to the PACS communication components and more refined
policy that, for instance, prefetch data may be implemented.