Master of DonNTU Baltin D.B.
DonNTU

Dmitriy Baltin

Faculty "Computer science"
Speciality "Software engineering"

E-mail:
dima_baltin@mail.ru
CV:
Go to my CV
Pages in the internet:
http://dimetrius.com.ua
Spring PPI Project
Master's work theme:
"Pattern-oriented concurrent programming models on .NET platform"

Supervisor: Andryukhin Alexandr Ivanovich

Abstract

Existing parallel programming libraries and systems, such as, written for C and Fortran, MPI (Message Passing Interface) implementations or, for example, NESL, Charm++ are low-leveled, oriented only to the procedural or functional programming model[1] and, thus, not consonant with the modern object-oriented style application developing.

On this stage in the direction of new models of parallelism creation it is important to mention the model of the concurrent programming, offered by Nick Benton, Luca Cardelly and Cedric Fournet – Polyphonic C#[2]. This model is based on join-calculations and, so-called «asynchronous» methods which can be executed in the separate thread.

The parallel programming system Spring PPI (Spring Parallel Programming Interface)[3] is also based on the model of synchronous and asynchronous (distance- in terminology of Spring PPI) methods, however the specific feature of the system is transfer of asynchronous methods execution on the other computer (node of cluster), and also provide the programmer high-level mechanism of co-operations (massage passing) between asynchronous methods. The distinguishing feature of the system is implementation of parallel programming patterns (standard methods). Thus, the system allows a programmer to use easily tested approaches of parallel programs design and to think at higher abstract level while developing algorithms.



Aims and tasks of work

  • development and efficiency increase of a high-level concurrent programming model;
  • complete integration of parallel programming model with the object-oriented programming paradigm;
  • research and component implementation of the parallel programming patterns, as universal approach of high-quality software development;
  • development and research of access and processing parallel model for enterprise applications data (based on using databases);


Spring PPI system implementation

Spring PPI system is written on C# and consists of 2 programming modules: the system of cluster administration (Run-time of the system) and concurrent programming framework.

Thus, Spring PPI is:

1) parallel programming framework – is .NET assembly to connect to the cluster program-client and providing high-leveled concurrent programming interface;

2) Cluster administrator (ClusterAdministrator) is the program, started on the front cluster host and responsible for management of cluster calculable resources between programs-clients requests;

3) Cluster working node (ClusterLeaf) is the program, working on every cluster computer and responsible for execution of asynchronous methods, I.e. providing basic calculable function on every cluster node.

Conceptually the deployment diagram of Spring PPI system is illustrated on fig. 1.

Äèàãðàììà ðàçâåðòûâàíèÿ Spring PPI Áàëòèí Äìèòðèé

Fig. 1 Spring PPI deployment diagram

Spring PPI is realized, based on work with ports, and doesn’t use .NET Remoting, MSMQ, Indigo or other technology for remote co-operation between computers. Remote asynchronous method calls is based on reflection mechanisms.

The scheme of asynchronous method call in Spring PPI is presented on animation 1.

Àíèìàöèÿ Spring PPI Áàëòèí Äìèòðèé

Animation 1 - The scheme of asynchronous method call in Spring PPI



Spring PPI parallel programming pattern

1. Singleton

Singleton[14] is base, elementary pattern which encapsulates execution of one remote method on a cluster.

2. Pipeline

Pipeline in Spring PPI is a chain of Singletons, which are executed in sequence. Thus pattern functionality is developed so that output data of the current chain element (Singleton) can serve as input data for next element, however this is not necessary. The Pipeline structure is presented on a fig. 2

ïàòòåðí Pipeline Spring PPI Áàëòèí Äìèòðèé

Fig. 2 – Pipeline structure in Spring PPI

3. Master-Slave

Master-Slave pattern[13] realizes «master-slave» relation between the remote methods. The scheme of pattern work is following: there is a main process – Master and a few processes - Slaves. In Spring PPI pattern is realized so, that a main process can co-operate with slaves by passing messages of different type. Every slave process for every type of message has proper handler.

ïàòòåðí Master-Slave Spring PPI Áàëòèí Äìèòðèé

Ðèñ. 3 - Master-Slave pattern structure in Spring PPI

4. Divide and Conquer

Divide and Conquer pattern[14](«Divide and rule») in Spring PPI can describe the difficult tree-like hierarchy of tasks (Singletons). Tasks in a tree are bound by a relation «parent-child». Every «parent» can have a few «children» and, that is very important, every «child» can have a few «parents». The common rule of pattern functionality is that every «child» is executed automatically only when all of his «parents» completed its work. The example of Divide and Conquer task tree is presented on a fig. 4.

ïàòòåðí Divide And Conquer Spring PPI Áàëòèí Äìèòðèé

Fig. 4 - The example of Divide and Conquer task tree

5. Repository

Repository[13] - pattern describes mechanisms for processes (remote methods) to work with shared memory. SharedMemory class is used to access to the Repository. All Repository is divided on cells, every cell has the unique identifier (ID) of string type. The object of any type can be saved in a cell - from a boolean type objects to the difficult objects hierarchy. The process of writing and reading data from a cell is based on the serialization mechanism.

ïàòòåðí Repository Spring PPI Áàëòèí Äìèòðèé

Fig. 5 - Repository pattern structure



Calculable experiments results

As an example for the estimation of work of the system were realized three known algorithms of matrix multiply: Fox, Cannon and striped. All algorithms were realized using Master-Slave and Repository patterns.

Every algorithm was started on 1, 2 and 4 processors. Experiments were conducted on a cluster, based on local network (100 Ìb/s) and computers with processors - 2.4 GHz.

Figures 6, 7, 8 present scale capability for each of the algorithms

àëãîðèòì Ôîêñà Spring PPI Áàëòèí Äìèòðèé

Fig. 6 - Scalability of Fox algorithm realized with Spring PPI

àëãîðèòì Êåííîíà Spring PPI Áàëòèí Äìèòðèé

Fig. 7 - Scalability of Cannon algorithm realized with Spring PPI

ëåíòî÷íûé àëãîðèòì Spring PPI Áàëòèí Äìèòðèé

Fig. 8 - Scalability of striped algorithm realized with Spring PPI

Thus, Cannon and Fox algorithms showed good scale capability, I.e. at twice increasing of the number of calculable nodes (processors) – time of algorithm execution time reduced twice.

Thus, it on the example of three known algorithms of matrix multiply was shown, that Spring PPI Run-time system is scalable system.



Conclusion

During the work of master's degree dissertation the system of the concurrent programming - Spring PPI - was developed. Spring PPI realizes a high-leveled parallel programming model. This model uses the concept of remote (distance) method, method which is executed on a cluster. Thus, a model is fully integrated with the object-oriented design approach.

During the dissertation work, was theoretically and practically grounded the necessity of parallel programming patterns using. Using patterns is a method to make programs development process more universal, reduce the complexity of parallel programs. Framework Spring PPI implements parallel programming patterns: Singleton, Master-Slave, Pipeline, Divide and Conquer and Repository. As demonstration of the offered pattern based parallelism model were realized the classic algorithms of parallel matrix multiply: Fox algorithm, Cennon’s algorithm and striped algorithm. All three algorithms showed high scalability level, thus, we can say about scalability of Spring PPI Run-time system.

During further implementation of master's degree dissertation work will be conducted on developing and researching of parallel model to access and processing data using relational database as the source. Further Spring PPI will be applied for realization of parallel versions of book-keeping algorithms.



References

1. Foster I. Designing and Building Parallel Programs. — Addison Wesley.

2. Modern Concurrency Abstractions for C# In B. Magnusson (Ed.), Proceedings of the 16th European Conference on Object-Oriented Programming (ECOOP 2002). University of Malaga, Spain. LNCS 2374, Springer-Verlag Nick Benton, Luca Cardelli, Cedric Fournet, Microsoft Research, Cambridge

3. Spring PPI site http://springppi.dimetrius.com.ua/

4. Parallel Programming Portal http://parallel.ru/

5. Voevodin V.V. Ïàðàëëåëüíûå âû÷èñëåíèÿ. - SPb.: BHV, 2002.

6. Official site MPI - MPICH http://www-unix.mcs.anl.gov/mpi/mpich/

7. Multiprocessor MPI implementation - MP-MPICH http://www.lfbs.rwth-aachen.de/content/mp-mpich

8. MPI for Windows – WMPI : http://dsg.dei.uc.pt/wmpi

9. Official site PVM http://www.epm.ornl.gov/pvm

10. Project BSPlib http://www.bsp-worldwide.org/implmnts/oxtool/

11. BSP standart http://web.comlab.ox.ac.uk/oucl/work/bill.mccoll/oparl.html

12. Official site OpenMP http://www.openmp.org

13. Massingill, B.L., Mattson, T.G., Sanders, B.A.: A pattern language for parallel application programming. Technical Report CISE TR 99-022, University of Florida, 1999

14. Massingill, B.L., Mattson, T.G., Sanders, B.A.: More Patterns for Parallel Application Programs PLoP 2001

15. Martin Fowler. Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, 1st edition, 1999. With contributions by Kent Beck, John Brant, William Opdyke, and Don Roberts.

Biography Abstract Library Links Search Report Individual Task
© DonNTU. Dmitriy Baltin 2007