users@shoal.java.net

Re: [Shoal-Users] Shoal supported -> [ANN] New Plugin: Clustering any Atmosphere Shoal supported -> [ANN] New Plugin: Clustering any Atmosphere Application on Any Container]

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 06 Jul 2009 11:08:14 -0400

Salut,

Bongjae Chang wrote:
> Hi Jeanfrancois,
>
> I also think that this is a very interesting project!
>
> I would like to comment a little about ShoalFilter.
>
> I looked into ShoalFilter.java(http://is.gd/1m1gn) simply.
>
> In ShoalFilter.java
> ---
> private void registerForGroupEvents(GroupManagementService gms){
> gms.addActionFactory(new JoinNotificationActionFactoryImpl(this));
> gms.addActionFactory(new FailureSuspectedActionFactoryImpl(this));
> gms.addActionFactory(new FailureNotificationActionFactoryImpl(this));
> ...
> }
>
> public void processNotification(Signal signal) {
> try{
> signal.acquire();
> ...
> signal.release();
> ...
> }
> ---
>
> I think that signal.acquire() and signal.release() are redundant if you use default ActionFactories with which Shoal has provided users like JoinNotificationActionFactoryImpl, FailureNotificationActionFactoryImpl and etc...
>

OK thanks. I've based my implementation on the sample that Shoal ship with:

    * https://shoal.dev.java.net/SimpleShoalGMSSample.java



> If signal.acquire() is duplicated without signal.release(), an unexpected error could be occurred.
>
> When processNotification() is called once, maybe signal.acquire() has already been called in Action#consumeSignal(), and when processNotification() will be returned, Action#consumeSignal() will release it.
>
> If you would like to acquire and release the signal separately, you should implement Shoal's ActionFactory and Action.
>
> But, Shoal's ActionFactories and Signals which ShoalFilter used basically don't implement Signal#acquire() and Signal#release() practically.
>
> So current ShoalFilter has no effect on my concern.
>
> My two cents. :)

OK I will go ahead and remove the acquire()/release() and see what I'm
getting.

Thanks for the feedback!

-- Jeanfrancois



>
> Thanks.
>
> --
> Bongjae Chang
>
>
> ----- Original Message -----
> From: "Jeanfrancois Arcand" <Jeanfrancois.Arcand_at_Sun.COM>
> To: <users_at_shoal.dev.java.net>
> Sent: Saturday, July 04, 2009 12:10 AM
> Subject: [Shoal-Users] Shoal supported -> [ANN] New Plugin: Clustering any Atmosphere Shoal supported -> [ANN] New Plugin: Clustering any Atmosphere Application on Any Container]
>
>
>> Salut,
>>
>> FYI, the Atmosphere Project (http://atmosphere.dev.java.net) now offer
>> clustering support using Shoal. I've implemented the basic and I'm sure
>> the plugin will add more and more features.
>>
>> Great Work!
>>
>> -- Jeanfrancois
>>
>> -------- Original Message --------
>> Subject: [ANN] New Plugin: Clustering any Atmosphere Application on Any
>> Container
>> Date: Thu, 02 Jul 2009 23:01:50 -0400
>> From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
>> Reply-To: users_at_atmosphere.dev.java.net
>> To: users_at_atmosphere.dev.java.net
>>
>> Hi,
>>
>> I've just committed a new plugin called cluster-shoal, based on the
>> Shoal project:
>>
>> * http://shoal.dev.java.net
>>
>> Mainly, this plugin allows any atmosphere applications to broadcast
>> messages inside a cluster. I've tested the chat sample using two server
>> on two different machines (Tomcat and Jetty). You can try it by
>> downloading the atmosphere-char.war, the edit the web.xml and set:
>>
>>> <init-param>
>>> <param-name>org.atmosphere.useCluster</param-name>
>>> <param-value>shoal</param-value>
>>> </init-param>
>> Right now the chat uses the ShoalFilter (which is a BroadcastFilter)
>>
>> * http://is.gd/1m1bO (JavaDoc)
>> * http://is.gd/1m1gn (code)
>>
>> See how ChatAtmosphereHandler uses it (quite simple):
>>
>> * http://is.gd/1m1j2
>>
>> This is another example of how easy is to extends Atmosphere. I've also
>> added a new @Cluster annotations
>>
>> * http://is.gd/1m1eg
>>
>> for peoples using atmosphere-core. In the next few days I will add
>> sample and explain how the annotation can be used.
>>
>> Feedback appreciated!
>>
>> -- Jeanfrancois
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_atmosphere.dev.java.net
>> For additional commands, e-mail: users-help_at_atmosphere.dev.java.net
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_shoal.dev.java.net
>> For additional commands, e-mail: users-help_at_shoal.dev.java.net
>>
>>
>>
>>