Configuration visitor - Re: [JBoss JIRA] Commented: (ISPN-145) No transport and singleton store enabled should not be allowed
by Vladimir Blagojevic
Hi,
Galder and I talked about this offline. Time to involve you guys!
I just completed visitor pattern for our configuration objects. Visitor
is passed from root of configuration - InfinispanConfiguration object.
InfinispanConfiguration class has a new method:
public void accept(ConfigurationBeanVisitor v)
How do we want to integrate this visitor into existing structure?
1) We add a new factory method to InfinispanConfiguration with
additional ConfigurationBeanVisitor parameter
2) We leave everything as is and if there is a need to pass some visitor
we pass it to InfinispanConfiguration instance directly (from
DefaultCacheManager)
DefaultCacheManager will pass ValidationVisitor to
InfinispanConfiguration that will verify configuration semantically.
Regards,
Vladimir
On 09-09-09 10:19 AM, Galder Zamarreno wrote:
> Good idea :)
>
> On 09/09/2009 04:13 PM, Vladimir Blagojevic wrote:
>> Yeah,
>>
>> I was thinking that we can make a visitor for configuration tree and
>> then you can do verification of any node and other things as well. Use
>> cases will come up in the future for sure.
>>
>> Cheers
>>
>>
>>
>> On 09-09-09 3:29 AM, Galder Zamarreno (JIRA) wrote:
>>> [
>>> https://jira.jboss.org/jira/browse/ISPN-145?page=com.atlassian.jira.plugi...
>>>
>>> ]
>>>
>>> Galder Zamarreno commented on ISPN-145:
>>> ---------------------------------------
>>>
>>> Not sure I understand what you mean by generic though. You mean any
>>> component to have a validation step of some sort?
>>>
>>> Thanks for taking this on :)
>>>
>>>> No transport and singleton store enabled should not be allowed
>>>> --------------------------------------------------------------
>>>>
>>>> Key: ISPN-145
>>>> URL: https://jira.jboss.org/jira/browse/ISPN-145
>>>> Project: Infinispan
>>>> Issue Type: Bug
>>>> Components: Loaders and Stores
>>>> Affects Versions: 4.0.0.ALPHA6
>>>> Reporter: Galder Zamarreno
>>>> Assignee: Vladimir Blagojevic
>>>> Priority: Minor
>>>> Fix For: 4.0.0.CR1
>>>>
>>>>
>>>> Throw configuration exception if singleton store configured without
>>>> transport having been configured.
>>>> It makes no sense to have singleton store enabled when there's no
>>>> transport.
>>
>
13 years, 2 months
Defining new commands in modules
by Manik Surtani
So this is an extension to the discussion around a GenericCommand that has been going around. IMO a GenericCommand is a big -1 from me for various reasons - the whole purpose of the command pattern is so we have strongly typed and unit testable commands. This will help the ongoing work by Mircea, Sanne and Israel on various modules that need to define custom commands.
I proposed the following solution to Mircea earlier today, I'll repeat here for you guys to discuss. Note that this is a *half baked* solution and needs more thought! :-)
* If a module needs to define custom commands, it should define its own ReplicableCommand implementations in its' own module.
* It should define a sub-interface to Visitor (MyModuleVisitor) with additional methods to handle the new commands
* Interceptors defined in this module should extend CommandInterceptor AND implement MyModuleVisitor
* These new commands can be created directly, or via a new CommandFactory specially for these commands.
Now for the un-finished bits. :)
* How does RemoteCommandFactory instantiate these new commands? The module should have a way of registering additional command IDs with RemoteCommandFactory.fromStream(). See
http://fisheye.jboss.org/browse/Infinispan/branches/4.2.x/core/src/main/j...
Perhaps RemoteCommandFactory.fromStream() should look up the ID in a map of command creator instances, and each module can register more of these with the RemoteCommandFactory?
* How do interceptors defined in the core module handle commands it isn't aware of? handleDefault()? Or should we define a new handleUnknown() method in Visitor for this case, which would default to a no-op in AbstractVisitor? E.g., in a module-specific command such as MyModuleCommand, I would implement:
class MyModuleCommand implements ReplicableCommand {
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable {
if (Visitor instanceof MyModuleVisitor) {
return ((MyModuleVisitor) visitor).visitMyModuleCommand(ctx, this);
} else {
return visitor.handleUnknown(ctx, this);
}
}
}
Cheers
Manik
PS: There is no JIRA for this. If we like this approach and it works, I suggest we create a JIRA and implement it for 4.2. The impl should be simple once we resolve the outstanding bits.
--
Manik Surtani
manik(a)jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org
13 years, 6 months
ISPN 200
by Israel Lacerra
Manik,
What you mean by:
" * The calling node returns a CacheQuery impl that lazily fetches
and collates results from the cluster." (JIRA)
Is enough if each node returns a list of keys and then, we lazily get the
values using the keys? Or the process has to be more lazy yet?
thanks!
Israel Lacerra
13 years, 11 months
Using Coverity scan?
by Sanne Grinovero
Hello,
Did you consider enabling Infinispan to be monitored by coverity's
code analysis services? They are free for OSS projects, I saw a demo
recently and was quite amazed. It's similar to FindBugs, but not only
about static code checks. They checkout your code from trunk and then
run several analysis on it periodically, one of them is about dynamic
thread behavior to predict deadlocks or missing fences instrumenting
the code, and produce nice public reports; AFAIK you don't need to
setup anything yourself, besides getting in touch to ask for it.
It's only available for C and Java code, and they have an impressive
list of OSS projects in the C world (linux kernel, httpd server,
samba, gnome, GCC, PostgreSQL, ...) but not much on Java.
http://scan.coverity.com/
No, I'm not affiliated :-) Just thinking that it might be useful to
have if it's not too hard to setup.
Cheers,
Sanne
14 years
Why is loading from store needed before storing in cache store?
by Galder Zamarreño
Hi,
I'd like to list the reasons why we load data from the cache store, if not present in memory, when trying to modify a k/v.
So far, the most powerful one I've found is when you're dealing with cold caches and you need to return previous value. You definitely need to load first to get previous value before modifying.
Now, if this is the only situation, it could be optimised by checking whether unreliableReturnValues is on or not.
This is somehow linked with the discussion wrt https://jira.jboss.org/browse/ISPN-693 and the previous email thread for http://lists.jboss.org/pipermail/infinispan-dev/2010-October/006436.html
I can't think of any other situations right now, but it'd be interesting to know whether anyone knows other (Manik, Mircea?)
Any information arising from this thread should be condensed into javadoc for loadIfNeeded method.
Cheers,
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
14 years, 1 month
Migrating to github
by Manik Surtani
Guys,
I've put together a short doc on migrating to github.
http://community.jboss.org/wiki/InfinispanFromSvnToGit
Please have a look and let me know your thoughts.
As for when, I think we have a couple of windows here, one is:
* Just after releasing 4.2.0.BETA1
* Wait for 4.2.0.Final
My preference would be the former, since we will always have ongoing releases whether on trunk (5.0) or 4.2.
I am in the process of setting up a mirror of our SVN repo on github so people can familiarise themselves with the process. I'll share this info soon.
Cheers
Manik
--
Manik Surtani
manik(a)jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org
14 years, 1 month
Cloud-TM & Infinispan
by Paolo Romano
Hi all,
I am new here, so let me first introduce myself. I am Paolo Romano, a
researcher working at INESC-ID Lisbon, you can find more about me and my
research activities at my webpage: http://www.gsd.inesc-id.pt/~romanop.
I am posting to this mailing list to introduce the Cloud-TM project
(http://www.cloudtm.eu), a EU funded project started in June which
brings together Red Hat, INESC-ID Lisbon (http://www.gsd.inesc-id.pt),
Rome University "La Sapienza" (http://www.dis.uniroma1.it/~hpdcs) and
Algorithmica (http://www.algorithmica.it).
Citing the project's abstract:
"Cloud-TM aims at defining a novel programming paradigm to facilitate
the development and administration of cloud applications. It will
develop a Self-Optimizing Distributed Transactional Memory middleware
that will spare programmers from the burden of coding for distribution,
persistence and fault-tolerance, letting them focus on delivering
differentiating business value. Further, the Cloud-TM platform aims at
minimizing the operational costs of cloud applications, pursuing optimal
efficiency via autonomic resource provisioning and pervasive self-tuning
schemes."
Infinispan is expected to play a key role in Cloud-TM, as it has been
chosen as the reference platform to integrate the main research results
achieved during the project. Specifically, our plan is to extend
Infinispan along the following main directions:
1. Build a library of alternative replication mechanisms optimized for
different workload scenarios (e.g. hi/low conflict rate, read/write
intensive) and scales of the platform (e.g. few/many nodes,
local/geographical distribution)
2. Developing self-scaling mechanisms aimed at elastically allocating
nodes from Cloud computing platforms to Infinispan caches depending on
the current workload.
3. Developing self-tuning mechanisms that will adaptively alter the data
replication and distribution algorithms depending on the current
workload characteristics and scale of the platform.
4. Providing programmers with a Distributed Software Transactional
Memory interface via a wrapper over Infinispan. This wrapper would be
close in spirit to what PojoCache is for TreeCache, though we are
currently oriented towards using a Domain Modelling Language and a
precompilation phase to generate the code to interact with Infinispan
(along the lines of what is done in the Fenix framework,
https://fenix-ashes.ist.utl.pt/trac/fenix-framework). Note that we are
still at very early design phase, so we are open to ideas, comments and
especially to learn from your experiences with PojoCache.
As developers of Infinispan, your feedback is extremely valuable to us.
On one hand, as nobody better than you could provide us indications on
how to fit within Infinispan's codebase any new experimental feature we
will be developing in the least intrusive fashion. On the other hand, as
you can help us to identify what are the most critical issues for
realistic deployments of Infinispan in Cloud environments, pointing out,
for instance, which ones, among the current Infinispan
paramers/functionalities, would benefit the most from self-tuning
approaches.
We have already started looking at the internal structure of the
replication's modules of Infinispan, and in the next days we will be
posting more about the kind of replication schemes (see point 1 above)
we would like to integrate in Infinispan, and how we are planning to do so.
In the meanwhile, as a teaser :-), I am sending a reference to a couple
of recent papers of ours if you are curious to know what kind of
replication solutions we are currently working on:
- http://www.gsd.inesc-id.pt/~romanop/files/papers/prdc09.pdf
- http://www.gsd.inesc-id.pt/~romanop/files/papers/middleware10.pdf
Cheers,
Paolo
--
Paolo Romano, PhD
Researcher at INESC-ID
Rua Alves Redol, 9
1000-059, Lisbon Portugal
Tel. + 351 21 3100300
Fax + 351 21 3145843
Webpage http://www.gsd.inesc-id.pt/~romanop
14 years, 1 month
Grid singletons using Infinispan ?
by Tristan Tarrant
I have browsed quickly through the Infinispan docs, but I haven't found
anything that would help me with what I need.
In the past I have used JBoss' feature for deploying cluster-wide
singletons, but obviously this is app-server-dependent. Is it possible to
use Infinispan to implement the same thing ?
Tristan
14 years, 1 month
when is BETA1 release
by Mircea Markus
Hi,
ISPN-180 is the blocker for the BETA1 release. My current estimate for finishing this is next Tue/Wen.
So next BETA will most likely be then - I'll keep you posted on the progress.
Cheers,
Mircea
14 years, 1 month