Aug 14th, 2011, 07:16 PM
Gigaspaces as Spring Cache provider
Hi group. I am working with spring framework and Gigaspaces (7.1.4). Some days ago i read about "Spring 3.1 M1: Cache Abstraction".
I made an example but using ehcahe. I would like use gigaspaces as a Spring Cache provider.
May you help me to setup gigaspaces as Spring Cache provider
Aug 15th, 2011, 06:26 AM
I put together a Spring Cache provider using OpenSpaces: https://github.com/jottinger/openspaces-cache
It should work with older versions of GigaSpaces as well as the 8.0.x series; there're no relevant API changes that I know of. Of course, you should update if at all possible; 8.0.x is pretty nice.
Aug 15th, 2011, 12:36 PM
I downloaded the test project (https://github.com/jottinger/openspaces-cache)
with GigaSpaces 7.1.4 and it worked as expected (just modified the spaceclass
MapEntry to implements serializable).
This week I will try integrating it into my project.
Thank you so much for your help. It was very useful. The test project is very clear. Again thank you very much for your collaboration.
Aug 15th, 2011, 12:48 PM
Any time. Note that the implementation as written has potential improvements; if you have a specific use case to tailor for (or metrics to consider), it can be done more efficiently.
However, you should also consider the actual caching requirements; using GigaSpaces as a cache like this isn't a bad idea, but there are optimizations that are more transparent than a cache and give you just as much performance improvement.
Aug 15th, 2011, 03:00 PM
Jotting good afternoon:
Thank you very much for your advice. In the project I'm working I use the following architecture:
Web Tier: Web Project deployed in GigaSpaces (jetty). This component use the core's remote services and it has a load balancer becouse it is deployed in cluster (partitioned-
Business Tier: Core deployed using GigaSpaces. This component expose the remote service.
Persistence: we are using Postgres 9.0.4.
The web project has a reporting system with mybatis (to query the database, do not use spaces), so in this part i want to use GigaSpaces as Spring Cache provider.
Similarly I will perform appropriate tests to examine the behavior.
Again, thank you very much for your help and valuable advice.
Tags for this Thread