mvn site
by Mircea Markus
Hi,
mvn site does't work in our current setup, it throws a runtime
exception whenever run.
i've simplified the setup and created an JIRA for the surefire team: http://jira.codehaus.org/browse/SUREFIRE-572
, waiting for an answer.
Subsequently we cannot see results of findbugs reports in the maven.
Even worse, when running 'mvn findbugs:check' the report is empty
(unfortunately that's an very incorrect output). I've created an issue
for the mvn findbugs project as well: https://sourceforge.net/tracker/?func=detail&aid=2851027&group_id=61626&a...
And on a more personal note - I don't like maven (to put it easy)
Cheers,
Mircea
14 years, 8 months
Query API and non POJO entries
by Michael Neale
This is kind of directed to Navin - I haven't really caught up on
how/what you are doing with with the query stuff (had a quick search
of the mailling list), but I had a few thoughts/ideas:
I would like to be able to query content in the cache which is not a
POJO - as in the data has some meaning which is not fields of a pojo
(eg it is JSON, or XML, or some binary format) - so say we know that
an entry in the cache is a certain type (MIME type) we can index it
accordingly (I have done this with Lucene in Jackrabbit before and it
works quite nicely) - I am proposing a MIMECacheEntry for this (this
is obviously of use to me in the RESTful interface) - do you think
this is doable ? (I have some other ideas re searching within key
string patterns as well which would be really nice).
Thoughts?
(and I need to have a look at that branch I think).
--
Michael D Neale
home: www.michaelneale.net
blog: michaelneale.blogspot.com
14 years, 8 months
Util.getInstance
by Mircea Markus
There are a bunch of getInstance methods in Util for instantiating
objects that throw very specific checked exceptions(throws
IllegalAccessException, InstantiationException).
I'm thinking to remove this checked exceptions and wrap them in an
runtime CacheException, to simplify the calling code that catches them
and wraps them in a CacheException itself. If one would need to be
informed weather a class couldn't be instantiated, it can catch the
thrown CacheException.
Wdyt?
Cheers,
Mircea
14 years, 8 months
[ISPN-6] Switch to distribution for default entity/collection cache?
by Galder Zamarreno
Hi,
While working on documenting the Infinispan cache provider, I've been
thinking on the default cache settings for each Hibernate type:
- Entity/Collection: Bearing in mind the requirement to keep this cache
synchronous, in the past we've gone for invalidation rather than
replication because using replication could mean having to replicate a
lot of data to all nodes in the cluster. For Infinispan however, I was
thinking of the possibility of making sync distribution default for
entities though since we are not replicating to everyone any more.
One doubt I have about here is how much of an advantage would be to
bring an entity from another node in the cluster if present
(distribution) vs loading it from the database if not available in the
local cache (invalidation).
The one downside I see of distribution vs invalidation is that if an
entity is not available locally and is not available in the cluster,
distribution is more expensive that invalidation, since dist involves
round trip in cluster and round trip to database, vs round trip to
database with invalidation.
However, unless eviction kicks in, this should only affect the 1st time
an entity/collection is queried cos the next time, it will be
distributed already and potentially in the L1 of the node that requested
it if it's not one of the owners.
So, I think I would make distribution default for entity/collection.
Thoughts? I'd still leave an invalidated configuration in the default
config file so that people can potentially swap to it if they want to.
- Query: I think we should stick to same JBC2/3 default here which is
local.
- Timestamps: Given the chattiness of this cache, and the low size
payloads, asynchronous replication still looks to me like a good default
for this cache.
Cheers,
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
14 years, 8 months
Infinispan REST server
by Michael Neale
Hey all.
(brief into: I am Mic, work for JBoss, on Drools and other things, I
got chatting to Manik one day and on a cold sunday morning started
hacking...)
I have been working on a RESTful server using RESTEasy as part of the
infinispan server effort. Its really quite easy to do, but I believe
useful for some cases I have in mind (involving non java clients)...
For the moment, while I play with things and then tidy up, I have
thrown the code up here:
http://github.com/michaelneale/Infinispan-rest/tree/master but plan to
put this in the infinispan tree when happy (it is a war, but we can
also have stand alone distros).
The basic cache operations map pretty nicely to HTTP verbs, GET, PUT,
DELETE (can wipe out an element or a whole cache) etc etc... with meta
info in the headers etc... (will be documenting it shortly, probably
on the wiki). For example, a http PUT to /foo/bar puts an element with
a key value of "foo" in the named cache "bar" (one cache manager
config per running server instance). Content-Type headers are needed
so the GET can operate correctly (also, this will probably be useful
down the track for indexing for search/queries, as the payload data
itself is a byte[] from the request body entity/stream).
I am also working on making it honour "eTags" - which are quite handy
(a GET with an eTag means it doesn't have to return the result if it's
copy is already good). This means you could, for instance, use
infinispan as a pretty dynamic content distribution network, pushing
out content updates as often as you like, but taking the load of the
servers (and network) where possible. Another option with persistence
is basically similar to the amazon s3 service (including per cache or
"bucket" ACLs, not hard to do)... many possibilities...
Some questions: I need to track things like "created" or "updated"
time etc.. things that the cache would track - but I can't work out
how to get at that data (so I can put it in the CacheEntry object, but
it seems redundant???) - ideas?
Also, if there a way to list the named caches in a cache manager?
(just thinking as an optional feature).
Anyway, love to hear ideas...
Michael.
14 years, 8 months
mvn improvements
by Mircea Markus
Hi,
Following some guidelines from "Mvn the definitive guide" I've
factorized common libraries parent pom.xml(log4j and xstrem) - this
will allow us to change the version identifier during upgrades in a
single place, rather than in several.
I also reduced dependency for each module: each module depends by
default by easymock, easymockextension and testng. All other 'shared'
artifacts were moved to dependecyManagent (from dependency).
Some unused dependencies (mvn dependecy:analyze) were removed.
Please let me know if you see any build issues.
And a question: what is the purpose of having a parent pom.xml and
<root>/pom.xml -> can't the <root>/pom.xml be the parent?
Cheers,
Mircea
14 years, 8 months
findbugs found issue
by Mircea Markus
Hi,
findbugs detects a problem in the following code:
public void clear() {
// This is expensive...
// lock all segments
for (Segment s : segments) s.lock();
try {
for (Segment s : segments) s.locklessClear();
initLinks();
} finally {
for (Segment s : segments) s.unlock();
}
}
the general description of the issue is:
Method does not release lock on all paths
This method acquires a JSR-166 (java.util.concurrent) lock, but does
not release it on all paths out of the method. In general, the correct
idiom for using a JSR-166 lock is:
Lock l = ...;
l.lock();
try {
// do something
} finally {
l.unlock();
}
In my eyes the code is okay, am I missing something?
Cheers,
Mircea
14 years, 8 months
[ISPN-165] Adding visitPutForExternalReadCommand to Visitor interface?
by Galder Zamarreno
Hi,
Re: https://jira.jboss.org/jira/browse/ISPN-165
In JBC, this was fixed by having a overriding
visitPutForExternalReadCommand in InvalidationInterceptor and avoiding
going remote in its implementation.
In ISPN however, there does not appear to be a similar
visitPutForExternalReadCommand method, which forces you to check the
flags passed (Flag.FAIL_SILENTLY, Flag.FORCE_ASYNCHRONOUS,
Flag.ZERO_LOCK_ACQUISITION_TIMEOUT)
Now, not all calls to with these flags are related to
putForExternalRead, so I'd suggest adding a
visitPutForExternalReadCommand to the Visitor interface.
Thoughts?
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
14 years, 8 months