ProActive: Programming, Composing, Deploying on the Grid
An Open Source Middleware For Parallel, Distributed, Multicore Computing

ProActive Programming

Reference Manual


Version 5.1.0


The OASIS Research Team and ActiveEon Company



INRIA UNSA CNRS-I3S
OW2 ActiveEon



Generated on 2011-08-29

ProActive Programming v5.1.0 Documentation

Legal Notice

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; version 3 of the License.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

If needed, contact us to obtain a release under GPL Version 2 or 3, or a different license than the GPL.

Contact: or

Copyright 1997-2010 INRIA/University of Nice-Sophia Antipolis/ActiveEon.

Mailing List

Mailing List Archive

http://www.objectweb.org/wws/arc/proactive

Bug-Traking System

http://bugs.activeeon.com/browse/PROACTIVE


Contributors and Contact Information

Team Leader

Denis Caromel
INRIA 2004, Route des Lucioles, BP 93
06902 Sophia Antipolis Cedex
France
phone: +33 492 387 631
fax: +33 492 387 971
e-mail:

Contributors from OASIS Team Contributors from ActiveEon Company
  • Brian Amedro

  • Francoise Baude

  • Francesco Bongiovanni

  • Florin-Alexandru Bratu

  • Viet Dung Doan

  • Yu Feng

  • Imen Filali

  • Fabrice Fontenoy

  • Ludovic Henrio

  • Fabrice Huet

  • Elaine Isnard

  • Vasile Jureschi

  • Muhammad Khan

  • Virginie Legrand Contes

  • Eric Madelaine

  • Elton Mathias

  • Paul Naoumenko

  • Laurent Pellegrino

  • Guilherme Peretti-Pezzi

  • Franca Perrina

  • Marcela Rivera

  • Christian Ruz

  • Bastien Sauvan

  • Oleg Smirnov

  • Marc Valdener

  • Fabien Viale

  • Vladimir Bodnartchouk

  • Arnaud Contes

  • Cédric Dalmasso

  • Christian Delbé

  • Arnaud Gastinel

  • Jean-Michel Guillaume

  • Olivier Helin

  • Clément Mathieu

  • Maxime Menant

  • Emil Salageanu

  • Jean-Luc Scheefer

  • Mathieu Schnoor

Former Important Contributors
  • Laurent Baduel (Group Communications)

  • Vincent Cave (Legacy Wrapping)

  • Alexandre di Costanzo (P2P, B&B)

  • Abhijeet Gaikwad (Option Pricing)

  • Mario Leyton (Skeleton)

  • Matthieu Morel (Initial Component Work)

  • Romain Quilici

  • Germain Sigety (Scheduling)

  • Julien Vayssiere (MOP, Active Objects)


List of Figures
List of Tables
List of Examples
Preface

Part I. Programming With Active Objects

Chapter 1. Active Object Definition
1.1. Overview
1.2. Active Object Structure
Chapter 2. Active Objects: Creation And Advanced Concepts
2.1. Overview
2.2. Restrictions on creating active objects
2.3. Instantiation Based Creation
2.3.1. Using PAActiveObject.newActive(...)
2.3.2. Using PAActiveObject.newActiveInParallel(...)
2.4. Object Based Creation using PAActiveObject.turnActive(...)
2.5. Active Object Creation Arguments
2.5.1. Using classname and target
2.5.2. Using Constructor Arguments
2.5.3. Using Parameterized Classes
2.5.4. Using A Node
2.5.5. Using A Custom Activity
2.5.6. Using the factory pattern with Active Objects
2.5.7. Using MetaObjectFactory to customize the meta objects
2.6. Elements of an active object and futures
2.6.1. Role of the stub
2.6.2. Role of the proxy
2.6.3. Role of the body
2.6.4. Role of the instance of class Worker
2.7. Asynchronous calls and futures
2.7.1. Creation of a Future Object
2.7.2. Methods affected by futures
2.7.3. Asynchronous calls in details
2.7.4. Good ProActive programming practices
2.7.5. Lightweight failure detection
2.8. Automatic Continuation in ProActive
2.8.1. Sending Futures
2.8.2. Receiving Futures
2.8.3. Illustration of an Automatic Continuation
2.9. Data Exchange between Active Objects
Chapter 3. Typed Group Communication
3.1. Overview
3.2. Instantiation Typed Group Creation
3.3. Group representation and manipulation
3.4. Group as result of group communications
3.5. Broadcast vs Dispatching
3.6. Access By Name
3.7. Unique serialization
3.8. Activating a ProActive Group
Chapter 4. Mobile Agents And Migration
4.1. Migration Overview
4.2. Using Migration
4.3. Complete example
4.4. Dealing with non-serializable attributes
4.4.1. Using The MigrationStrategyManager Interface
4.4.2. Using readObject(...) and writeObject(...)
4.5. Mixed Location Migration
4.5.1. Forwarders And Agents
4.5.2. Forwarder And Agent Parameters
4.5.3. Configuration File
4.5.4. Location Server
Chapter 5. Exception Handling
5.1. Exceptions and Asynchrony
5.1.1. Barriers around try blocks
5.1.2. TryWithCatch Annotator
5.1.3. throwArrivedException() and waitForPotentialException()

Part II. Programming With High Level APIs

Chapter 6. Master-Worker API
6.1. Overview
6.2. Logger Settings
6.3. Master Creation And Deployment
6.3.1. Local Master creation
6.3.2. Remote Master creation
6.4. Adding Resources
6.5. Tasks definition and submission
6.6. Results retrieval and reception order
6.7. Terminating the master
6.8. Worker ping period
6.9. Worker task flooding
6.10. Worker Memory
6.10.1. Structure and API
6.10.2. Storing data
6.10.3. Retrieving and using the data
6.11. Monte-Carlo PI Example
Chapter 7. The Calcium Skeleton Framework
7.1. Introduction
7.1.1. About Calcium
7.1.2. The Big Picture
7.2. Quick Example
7.2.1. Define the skeleton structure
7.2.2. Implementing the Muscle Functions
7.2.3. Create a new Calcium Instance
7.2.4. Provide an input of problems to be solved by the framework
7.2.5. Collect the results
7.2.6. View the performance statistics
7.2.7. Release the resources
7.3. Supported Patterns
7.4. Execution Environments
7.4.1. MultiThreadedEnvironment
7.4.2. ProActiveEnvironment
7.4.3. ProActiveSchedulerEnvironment (unstable)
7.5. File Access and Transfer Support (beta)
7.5.1. WorkSpace
7.5.2. Annotated Muscle Functions
7.5.3. Muscle Function Example
7.5.4. Input and output files from the framework
7.6. Performance Statistics (beta)
7.6.1. Global Statistics
7.6.2. Local Result Statistics
Chapter 8. OOSPMD
8.1. OOSPMD: Introduction
8.2. SPMD Group Creation
8.3. Synchronizing activities with barriers
8.3.1. Total Barrier
8.3.2. Neighbour barrier
8.3.3. Method Barrier
8.4. MPI to ProActive Summary
Chapter 9. Wrapping Native MPI Application
9.1. Simple Deployment of unmodified MPI applications
9.2. MPI Code Coupling
9.2.1. MPI Code Coupling API
9.2.2. MPI Code Coupling Deployment and Example
9.2.3. The DiscoGrid Project
9.3. MPI Code Wrapping
9.3.1. Code Wrapping API
Chapter 10. Accessing data with Data Spaces API
10.1. Introduction
10.2. Configuring Data Spaces
10.2.1. Data Spaces and GCM Deployment
10.2.2. Command-line tools
10.2.3. Manual configuration
10.3. Using Data Spaces API
10.3.1. Code snippets and explanation
10.3.2. Complete example

Part III. ProActive Configuration

Chapter 11. ProActive Basic Configuration
11.1. Overview
11.2. How does it work?
11.3. Where to access this file?
11.3.1. ProActive Default Configuration file
11.3.2. User-defined ProActive Configuration file
11.3.3. Alternate User Configuration file
11.4. ProActive properties
11.4.1. Required
11.4.2. Fault-tolerance properties
11.4.3. rmi ssh properties
11.4.4. Other properties
11.5. Configuration file example
11.6. Log4j configuration
11.6.1. ProActive Appender
11.6.2. ProActive Appender and GCM Deployment
11.6.3. Other appenders
Chapter 12. Network configuration
12.1. Available communication protocols
12.1.1. ProActive Network Protocol (PNP, pnp://)
12.1.2. ProActive Network Protocol over SSL (PNPS, pnps://)
12.1.3. ProActive Message Routing (PAMR, pamr://)
12.1.4. Java RMI
12.1.5. HTTP
12.2. TCP/IP configuration
12.3. Enabling several communication protocols
Chapter 13. Using SSH tunneling for RMI or HTTP communications
13.1. Overview
13.2. Network Configuration
13.3. ProActive runtime communication patterns
13.4. ProActive application communication patterns.
13.5. ProActive communication protocols
13.6. The rmissh communication protocol

Part IV. Deployment And Virtualization

Chapter 14. ProActive Grid Component Model Deployment
14.1. Introduction
14.2. Deployment Concepts
14.3. GCM Deployment Descriptor Overview
14.4. GCM Application Descriptor Overview
14.5. ProActive Deployment API
14.5.1. Resources fixed by the application (SPMD)
14.5.2. Resources fixed by the application deployer
14.5.3. On demand Scalability
14.6. GCM Deployment Descriptor
14.6.1. The <environment> element
14.6.2. The <resources> element
14.6.3. The <infrastructure> element
14.7. GCM Application Descriptor
14.7.1. The <environment> element
14.7.2. The <application> element
14.7.3. The <resources> element
Chapter 15. XML Deployment Descriptors
15.1. Objectives
15.2. Principles
15.3. Different types of VirtualNodes
15.3.1. VirtualNodes Definition
15.3.2. VirtualNodes Acquisition
15.4. Different types of JVMs
15.4.1. Creation
15.4.2. Acquisition
15.5. Validation against XML Schema
15.6. Complete description and examples
15.7. Infrastructure and processes
15.7.1. Local JVMs
15.7.2. Remote JVMs
15.7.3. DependentListProcessDecorator
15.8. Infrastructure and services
15.9. Processes
15.10. Descriptor File Transfer
15.10.1. XML Descriptor File Transfer Tags
15.10.2. Supported protocols for file transfer deployment
15.10.3. Triggering File Transfer Deploy
15.10.4. Triggering File Transfer Retrieve
15.10.5. Advanced: FileTransfer Design
Chapter 16. ProActive File Transfer
16.1. Introduction and Concepts
16.2. File Transfer API
16.2.1. API Definition
16.2.2. How to use the API Example
16.2.3. How File Transfer API works
Chapter 17. How to terminate a ProActive application
17.1. Destroying active objects
17.2. Killing JVMs
17.2.1. Killing JVMs started with a GCM Deployment
17.2.2. Killing JVMs started with an XML Deployment
Chapter 18. Variable Contracts for Descriptors
18.1. Variable Contracts for Descriptors
18.1.1. Principle
18.1.2. Variable Types
18.1.3. Variable Types User Guide
18.1.4. Variables Example
18.1.5. External Variable Definitions Files
18.1.6. Program Variable API
Chapter 19. GCMDeployment and Virtual Environment.
19.1. ProActive & Hardware Virtualization QuickStart.
19.1.1. Hardware Virtualization Overview.
19.1.2. How does it work with ProActive.
19.1.3. Software compatibility.
19.2. Virtualization Layer Setup.
19.2.1. Overall prerequisites.
19.2.2. Editor dependent.
19.3. GCMDeployment and Virtual Environment.
19.3.1. Principles.
19.3.2. VMware products.
19.3.3. Hyper-V
19.3.4. XenServer
19.3.5. KVM, Qemu, Qemu-KVM, LXC, UML, Xen OSS
19.3.6. VirtualBox
19.4. Troubleshooting.
Chapter 20. Technical Service
20.1. Context
20.2. Overview
20.3. Progamming Guide
20.3.1. A full GCM Application Descriptor
20.3.2. A full XML Descriptor File (former deployment)
20.3.3. Nodes Properties
20.4. Further Information

Part V. Back matters

Appendix A. Frequently Asked Questions
A.1. Frequently Asked Questions
A.1.1. How do I build ProActive from the distribution?
A.1.2. Why don't the examples and compilation work under Windows?
A.1.3. Why do I get a Permission denied when trying to launch examples scripts under Linux?
A.1.4. How does the node creation happen?
A.1.5. How does the RMI Registry creation happen?
A.1.6. What is the class server, why do we need it?
A.1.7. What is a reifiable object?
A.1.8. What is the body of an active object? What are its local and remote representations?
A.1.9. What is a ProActive stub?
A.1.10. Are the call to an active object always asynchronous?
A.1.11. Why do I get a java.lang.NoClassDefFoundError exception about asm?
A.1.12. Why do I get a java.lang.NoClassDefFoundError exception about bcel?
A.1.13. Why do I get a java.security.AccessControlException exception access denied?
A.1.14. Why do I get a java.rmi.ConnectException: Connection refused to host: 127.0.0.1 ?
A.1.15. Why aren't my object's fields updated?
A.1.16. How can I pass a reference on an active object? What is the difference between this and PAActiveObject.getStubOnThis()?
A.1.17. How can I create an active object?
A.1.18. What are the differences between instantiation based and object based active objects creation?
A.1.19. Why do I have to write a no-args constructor?
A.1.20. How do I control the activity of an active object?
A.1.21. What happened to the former live() method and Active interface?
A.1.22. Why should I avoid to return null in methods body?
A.1.23. How do I make a Component version out of an Active Object version?
A.1.24. Why is my call not asynchronous?
A.1.25. What is the difference between passing parameters in deployment descriptors and setting properties in ProActive Configuration file?
A.1.26. Why ProActive is slow to start ?
A.1.27. Why do I see The ProActive log4j collector is still not available, printing logging events on the console to avoid log loss when a ProActive runtime is started ?
A.1.28. About the former deployment process: why do I get the following message when parsing my XML deployment file: ERROR: file:~/ProActive/descriptor.xml Line:2 Message:cvc-elt.1: Cannot find the declaration of element 'ProActiveDescriptor' ?
Appendix B. Reference Card
B.1. Main concepts and definitions
B.2. Main Principles: Asynchronous Method Calls And Implicit futures
B.3. Explicit Synchronization
B.4. Programming Active Objects' Activity And Services
B.5. Reactive Active Object
B.6. Service methods
B.7. Active Object Creation:
B.8. Groups:
B.9. Explicit Group Synchronizations
B.10. OO SPMD
B.11. Migration
B.12. Components
B.13. Security:
B.14. Deployment
B.15. Exceptions
B.16. Export Active Objects as Web services
B.17. Deploying a fault-tolerant application
B.18. Branch and Bound API
B.19. File Transfer Deployment
Bibliography
Index