Hi,
Thanks a lot for this code Matthew..
I think what will be needed is:
- a flag in the context for the recipient of the notification to know
that this is a distant notification
- the plugins or other notification recipient to take this case into
account and do the appropriate action
- fix the notification mecanism to not make recipient rely on
information that cannot be available in this case. Maybe the
notification mecanism should not transmit a context but a specific
object with can only contain compatible information. The context would
then be a "local" only context which is still needed to get the database
connection for example.
Basically we need to review what the context needs are for plugins and
notification recipients
The problem can be even more complex. For example we don't want email
notification to be sent twice and the lucene architecture is something
to think about in clustered environment. You might want to have 2
indexes to ensure failover but not 20.
Ludovic
Matthew Conway a écrit :
I've added some clustering support code to xwiki.
To enable
clustering, edit oscache.properties and uncomment the specified line.
One problem has to do with the need for some code to be notified when
a document has been changed by some other machine in the cluster e.g.
machine A saves a doc, broadcasts invalidate to other machines, but
machine B has code that needs to know when any doc has changed (e.g.
email notification or lucene plugin). I've tried to account for this
with the class XWikiCacheListener, but couldn't come up with a
completely satisfactory solution. Since its execution is triggered by
jgroups when it receives a cache flush event over the network, there
is no Context, and thus any notification recipient that uses something
thats not in the dummy Context I create will fail - e.g.
XWikiPageNotiification line 30 tries to use the request object and
throws a NPE - in this case we could fix it by checking if request is
null, but I don't know where else it might break. Suggestions would
be appreciated.
To see the changes added for clustering, you can: svn diff -r 1065:1066
Matt
------------------------------------------------------------------------
--
You receive this message as a subscriber of the xwiki-dev(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
--
Ludovic Dubost
XPertNet:
http://www.xpertnet.fr/
Blog:
http://www.ludovic.org/blog/
XWiki:
http://www.xwiki.com
Skype: ldubost AIM: nvludo Yahoo: ludovic