dev@glassfish.java.net

Command Replication : Broadcast of commands

From: Vijay Ramachandran <vijay.ramachandran_at_oracle.com>
Date: Sun, 11 Jul 2010 11:21:34 -0700

FYI : If you are the owner of one or more CLIs in GlassFish, this mail
will be of interest to you.

While helping CLI owners make their CLI cluster aware, it was found that
a very small subset of commands require the ability to broadcast the
command to all server instances in the domain irrespective of the target
specified. After trying out various options, it has been decided that
the best way forward is to add the ability of broadcasting a command in
the command replication framework itself. An initial implementation of
this is currently available in 3.1 trunk. To make use of this feature,
you have to specify the RuntimeType.ALL in the @Cluster annotation as
shown below :

@Cluster(RuntimeType.ALL)
@Service(name="create-jdbc-connection-pool")
@Scoped(PerLookup.class)
@I18n("create.jdbc.connection.pool")
public class CreateJdbcConnectionPool implements AdminCommand {
..
..
}

_*Please note:

* Broadcasting of a command comes at a cost and it can affect the
scalability; going forward we will try to reduce this cost in the
replication framework itself but the cost is not going to be zero
* So far we have identified only a very small subset of commands (those
that add config level elements to the domain) that require this feature;
A vast majority of the commands will not need this broadcast feature at all
* Do not use this broadcast feature indiscriminately; Talk to me or
Jerome before using feature
*_
Thanks

Vijay