[ANN] Mandala: dynamic concurrent and/or distributed programming
From: Pierre Vigneras (vigneras_at_labri.fr)
Date: 01/23/04
- Previous message: Dale King: "Re: Eclipse, Memory Hog"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 23 Jan 2004 18:07:05 +0100
The open source Mandala project (http://mandala.sf.net) is a library that
allows any object to be used asynchronously and/or remotely.
+ Concurrency (RAMI package)
Dealing with concurrency is a well known challenge and the use of
threads leads to dependencies between the concurrency needed and the
actual implementation of it. For example, using a thread-safe object in
a web service leads to the use of a threads pool whereas using a
non-thread-safe object leads to threads competition for a monitor
acquisition.
Mandala allows developper to separate the business logic of their
objects and the concurrency issues of their use. The instanciator of an
object is the one who knows:
- how the object should be used (non-thread-safe object);
and eventually
- how the object will be used.
For example, given a java.io.ObjectOutputStream instance, you know as a
client of this object that it is not thread safe. Hence, instead of
dealing with many synchronized blocks into your source code to prevent
concurrent access to this instance, you just specify that any
concurrent access to this object must be done using a FIFO policy.
On the opposite, you may specify a thread-pooled policy for concurrent
access on an already thread-safe object such as a java.util.Vector
instance.
+ Remote Objects (JACOb package)
Mandala also focuses on remote objects. Contrary to Java-RMI, CORBA or
EJB, where your business objects must implement an interface or extends
a given class, Mandala remote objects can be any object.
Consider a java.math.BigDecimal instance. How do you make such an
instance remotely accessible using RMI for example? You may define a
wrapper which implements - say - a RMIBigDecimal interface which itself
extends java.rmi.Remote. This interface defines almost every public
method of the original java.math.BigDecimal but each of this method may
be declared as able to throw the java.rmi.RemoteException.
In Mandala, things are much simpler. Since any object may become
remote, you just tell Mandala to make your instance remote, and use a
proxy on it (as in RMI, where you use the stub). Note that asynchronous
remote method invocation is still possible and recommanded in order to
create parallelism.
To summarize, Mandala features are the following:
* RAMI:
- Asynchronous references: extension of standard Java
synchronous reference (provides the '==' semantic);
- Asynchronous method invocations using future objects and/or
callbacks (event-driven programming) mechanism;
- Separation of asynchronous semantics and their
implementations (concurrent versus single-threaded semantic)
* JACOb:
- Multi-protocol: currently RMI, TCP, UDP are provided;
- Asynchronous remote method invocations
- Remote exception handling based on global listeners: this
allows both "only business code in remote method invocation"
paradigm or the traditional per-method remote exception
handling (RMI-like) to be implemented;
Concerning the Mandala development:
+ Designed by interfaces: anyone may provide its own implementation of
asynchronous policy, asynchronous references, ActiveMap, protocol, etc.
+ Extensive use of design patterns -- maybe too extensive!
+ Designed with unitary tests (JUnit)
+ Build with the standard Ant build tool
Check the Mandala web site at http://mandala.sf.net for more infos.
PS: Are you interested in the Mandala development? See the TODO list and join
our team!
-- No one equals eipi: -1 = e^(i.Pi)
- Previous message: Dale King: "Re: Eclipse, Memory Hog"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]