DJFractal uses several concepts:
djfractal.FractalComputer
interface;
djfractal.Scheduler
interface; fcs collection
A fractal computer takes djfractal.FractalData
and returns
a djfractal.FractalResult
. FractalData
are
produced by the djfractal.Distributer
following the algorithm
describes in
the Mandelbrot applet. When a FractalResult
is returned,
it is drawn on the screen. The algorithm try to draw most interesting areas
first.
In order to distribute several FractalData
s to many
FractalComputer
s, the distributer uses a collection of fractal
computers called fcs
. This collection is an implementation of
the standard java.util.Collection
.
To run DJFractal, two options are currently available (may change in the future):
java djfractal.Main
java djfractal.Main JNDI_URI
FractalComputer
implementation (see Mandala Web Site for
documentation).
java djfractal.Main
java
-Dmandala.rami.impl.apf=mandala.rami.impl.ThreadPooledAPFactory
djfractal.Main
java -Dmandala.rami.impl.apf=mandala.rami.impl.FifoAPFactory
djfractal.Main
java mandala.jacob.remote.protocols.rmi.ServerRunner ActiveMap
JNDI_ActiveMap_BindName
Note 1: replace JNDI_ActiveMap_BindName
by
the name JNDI must bind the active map to.
Note 2: replace rmi
by udp
or
tcp
for other protocols.
Note 3: several properties may be defined when using
JNDI. See JNDI documentation for details. If the protocol is
rmi
, then Mandala uses default properties so you don't
have to specify any. An rmiregistry is also automatically started (if
none are found).
fcs
collection used by DJFractaljava mandala.jacob.remote.protocols.rmi.ServerRunner
Collection JNDI_FCS_BindName
fcs
collection
java FractalComputerClassName JNDI_FCS_URI
JNDI_AciveMap_URI
Note 1: CLASSPATH
problems may happened here. Both the remote active container and
the fcs
remote collection must kwow where the
FractalComputerClassName
are available. Several solutions
are possible:
mandala.jar
and
djfractal.jar
files;
codebase
such as
java.rmi.server.codebase for the rmi protocol. Such a server is
delivered in Mandala in the mandala.util.HTTPServer
class.
Note 2: Security Policies
problems may happened here due to remote class loading. Ensure
you've a well formed .java.policy file (see the policytool
utility shipped with the JRE). See the Mandala
FAQ and the Java documentation for details.
java djfractal.Main JNDI_FCS_URI
The CardProxy.main()
method already runs an RMI active map
in which she stores semi-transparent proxy of fractal computers running in
smartcards. Hence, only the remote fcs
collection needs to be
instantiated (see FCS instantiation above).
CardProxy
:
$ export LD_LIBRARY_PATH=$PCSC_DIR/lib:$LD_LIBRARY_PATH $ #CLASSPATH already contains "mandala.jar:djfractal.jar" $ export CLASSPATH=$CLASSPATH:$PCSC_DIR/lib/jpcsc.jar $ java samples.CardProxy JNDI_FCS_URI RMIActiveMapBindName
java djfractal.Main JNDI_FCS_URI