[
http://opensource.atlassian.com/projects/hibernate/browse/HSHARDS-1?page=...
]
Max Ross commented on HSHARDS-1:
--------------------------------
Interesting idea. Would this be different than plugging in a distributed cache that just
happens to be distributed across multiple SFs running in the same jvm?
As long as your replicated data has the same primary key on each shard it seems like this
would work great. We'd probably want some way to configure which cached objects are
available across shards and which ones are available only the shard from which they were
originally loaded since we don't want everything that's in the second level cache
to be shared across shards. I assume the class level would be the right place to control
this. Or maybe it's time to introduce a third-level cache. :-)
Support for replicated data
---------------------------
Key: HSHARDS-1
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSHARDS-1
Project: Hibernate Shards
Type: New Feature
Components: engine
Versions: 3.0.0.Beta1
Environment: all environments
Reporter: Max Ross
Assignee: Max Ross
It's currently difficult to deal with replicated, slow-changing data. For example,
you might have a Country table on all your shards with the same data and the guarantee
that this data will never change. You'd want to create associations to Country
objects in your domain model too. So now suppose you want to create a new persistent
object with an association to a Country. First off, your query to lookup that country by
id is going to return 1 Country per shard. That in and of itself is a problem, but
supposing we could do something to make it return just one shard. How do we guarantee
that we get the Country that lives on the shard that the object is going to be saved on?
We haven't even gone through shard selection yet! So anyway, yeah, we need to address
this. Enhancing the cross-shard relationship detection interceptor to "swap"
out the wrong Country instance for the right Country instance seems like an interesting
idea.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira