Hello. This is something of an architecture question. I have this idea of having a server with huge memory, that is used as a big objects cache holder. The clients send "Actions" to this server(like Search Person with property age<13). And then, this machine(to complicate things it would be nice to have more instances of this server and distribute the Persons list for each instance to hold half the data, and both instances would work on the query - MapReduce style) will then return the Persons that match the criteria. Other "Actions" would be a specific cache flush, or say "Update Person with id=3 to instance ...", etc.
Guess the best thing that does that it's Oracle Coherence, but I wonder if anybody has other open source solutions, or ideas.
One simple solution would be to use EhCache with Hibernate, but I do not know what protocol I would use to turn this into a server(I see sending the actions as invoking methods on the "server" and the methods return the list of Persons that match the query). Maybe simple RMI could be used. I'm not yet convinced, I would like a more proven solution, a framework, also it would be nice to have failover, autodiscovery and map reduce. I guess I could wrap GridGain on top of my EhCache solution and solve that? Would that be overkill(I may stick to only one instance of this datagrid server).
Other option would be Terracotta. The thing is I do not know very much about Terracotta, only that you can share data among instances. If I add elements from a process to the distributed cache, and in another process is there a local copy of the cache, and only differences are replicated? That would be great for the fact that every process would query the local cache and that would be very fast, but it will also mean much memory used in the client processes.
So anybody got any ideas?
Thank you.