|
Wednesday, July 27, 2005 |
The JCache API rocks. Now if only the Expert Group would release a public draft of the RI I'd be very happy! :). Please guys - just ship an early access release or something real soon. Anyway...
When working with SOA and ESBs caching often becomes important. If
every time a service needs some data it always performs a remote
request over HTTP/JMS on a back end system you often get large amounts
of traffic and high latency and high loads on back end systems.
Putting a cache in front of service requests can often save lots of
traffic, increase throughput rate and take load of expensive back end
systems. One of the downsides of Web Services in general (as opposed to
REST) is they don't lend themselves very well to the web centric
caching structures such as when using HTTP GET with the front end web
cache.
In ServiceMix we have a caching JBI component
which works with any JCache provider. The nice thing about this is it
works with any JCache provider (or even just a Map :) and can be used
in any service pipeline or orchestration irrespective of the transport
of the service (web service, HTTP REST, JMS, POJO) and caches at the
service invocation level - usually in memory to avoid off-process
caching overhead. The only tricky part is creating a key expression
from the request; which typically a simple XPath expression will do the
trick.
BTW a tip to all those wishing to use JCache until the EG finally
releases a public beta; just use a Map for your cache, use dependency
injection and you'll be all set for JCache when its finally public :)
11:00:53 AM
|
|
© Copyright 2007 James Strachan.
|
|
|
|
|
|
July 2005 |
Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
|
|
|
|
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
|
|
|
|
|
|
Jun Aug |
|
|
|
|
|
|