openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fernando Padilla <>
Subject Re: openjpa-slices
Date Fri, 21 Nov 2008 04:40:52 GMT
I have finished walking through the whole slices code, and it looks 
good. Aside from minimal janitorial/code clean, there is one feature 
that I will want to get implemented.

I think we need to have a plugin to figure out the slice targets the 
queries run against.  So that application code might be able to know 
better about the queries and determine that any particular query might 
only get results on one or two slices..  (sharding has less benefits if 
most queries are forced to execute against all slices).

Currently this is supported through query "hints", but I think that is a 
really bad choice, since hints would be hard-coded, and you force you to 
do a full code change and rebuild, if you wanted to change the number or 
names of slices, etc etc.. (way too intimate and spaghetti code)

I propose to add another plugin, or extend the DistributionPolicy to 
return possible query targets, when you pass in a query, etc etc.. (i 
would also pass in the FecthConfiguration to allow application centric 
hints to help the code decide).

Any comments? ideas? brain-storms??

ps - Along the lines of mixing configurations with code.. the 
replication feature is driven by the @Replicated annotation in a class, 
when really the ReplicationPolicy is the one that should decide which 
classes are replicated and how.. it seems like a pain to have to 
coordinate both code annotation, and configuration level code..  So I 
propose to remove @Replicated annotation, and just expose another 
isReplicated method to the ReplicationPolicy.

Fernando Padilla wrote:
> So I was wondering if anyone is actively maintaining the slices 
> implementation?  My company, we are going to be doing a big bet on 
> sharding and OpenJPA, so I would probably be giving feedback, ideas and 
> patches towards the slices..
> but I wanted to know who might be accepting/reviewing such discussions, 
> so they don't fall on deaf ears..

View raw message