After a good nights' sleep and a fresh mind, I've had a rethink and
have a potential solution. Tell me what you guys think, this will
apply to both 3.x -> 2.x compat, 3.x -> 1.x compat and 3.x -> 2.x
compat.
1. For each release, create a "namespace-safe" package. E.g., for
3.0.0, create jbosscache-core.jar as well as jbosscache-core-namespace-
safe.jar. This would be constructed using jarjar, where
org.jboss.cache.* is translated to org.jboss.cache.3.* (or
org.jboss.cache.2.*).
2. Create new distributions for each compatibility layer. E.g., for
3.0.0, a jbosscache-core-2.x-compat.jar and a jbosscache-core-1.x-
compat.jar. These modules would depend on the "namespace-safe"
module, and provide a delegation layer emulating either 2.x or 1.x
interfaces.
The upside is that the compat jar can be used as a drop-in replacement
for 1.x, but it will not expose new APIs and such.
So if someone wants 1.x compatibility AND be able to use new APIs,
then they'd be stuck. But IMO if they want new APIs then they're
rewriting code anyway and could just use the new jars.
WDYT?
Cheers
Manik
On 18 Aug 2008, at 19:47, Manik Surtani wrote:
On 18 Aug 2008, at 19:37, Bela Ban wrote:
> +100. Do you suggest a bridge/adapter approach ?
This could be an alternate approach. We are talking about an
adapter for making 2.x and 3.x compatible with 1.x interfaces; it
would be much easier to do the same to make 3.x compatible with
2.x. Potentially helps to keep the core 3.x APIs clean so if people
want to use 3.x directly they have a chance to use cleaner APIs.
The drawback is that everyone uses the adapter and never the cache
directly, which beats the purpose of the new APIs altogether.
Thoughts?
--
Manik Surtani
Lead, JBoss Cache
manik(a)jboss.org
_______________________________________________
jbosscache-dev mailing list
jbosscache-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jbosscache-dev
--
Manik Surtani
Lead, JBoss Cache
manik(a)jboss.org