SCOOPLI: a library for concurrent object-oriented programming on .NET

Authors:     Piotr Nienaltowski, Volkan Arslan

 

Affiliation:   ETH Zürich
                     Chair of Software Engineering
                     ETH Zentrum
                    8092 Zürich
                    Switzerland

E-mail: Piotr.Nienaltowski@inf.ethz.ch Volkan.Arslan@inf.ethz.ch

Web:http://se.inf.ethz.ch

Keywords: concurrent object-oriented programming, SCOOP, Eiffel, Design by Contract, distributed programming, .NET Remoting, .NET Threading.

Abstract

The SCOOP model (Simple Concurrent Object-Oriented Programming) proposed by Bertrand Meyer[1]offers a comprehensive approach to build­ing high-quality concurrent and distributed systems. The idea of SCOOP is to take object-oriented programming as given, in a simple and pure form based on the concepts of “Design by Contract”, which have proved highly successful in improving the quality of sequential programs, and extend them in a minimal way to cover concurrency and distribu­tion. The extension indeed consists of just one keyword separate; the rest of the mechanism largely derives from examining the consequences of the notion of contract in a non-sequential set­ting. The model is applicable to many different physical setups, from multiprocessing to mul­tithreading, network programming, Web services, highly parallel processors for scientific computation, and distributed computation. For application programmers, writing concurrent applications with SCOOP is extremely simple, not requiring the usual baggage of concurrent and multithreaded programming (semaphores, rendezvous, conditional critical regions etc.). The model takes advantage of the inherent concurrency implicit in object-oriented programming to provide programmers with a simple extension enabling them to produce concurrent applications with little more effort than sequential ones.

Although SCOOP has attracted considerable attention, it has only had prototype implementations so far. Our research work is aimed at refining the model and providing a working, production-quality implementation. We have decided to use Microsoft .NET as reference platform for the implementation of SCOOP. .NET offers several mechanisms that seem to be extremely suitable for SCOOP: most of them are provided by System.Runtime.Remoting and System.Threading namespaces.

In this article, we present SCOOPLI for .NET: a library implementation of SCOOP. We focus on the mapping of SCOOP concepts to .NET constructs. We show how processors can be mapped to AppDomains, and how separate calls are implemented. We also discuss distributed programming with SCOOPLI. Finally, we point out the improvements that may be achieved by the use of .NET, as opposed to the previous, thread-based, implementation.

References

[1]Bertrand Meyer, Object-Oriented Software Construction, 2nd edition, Prentice Hall, 1997.

The research work presented in this paper is part of the project “SCOOP: Environment for dependable distributed and reliable object-oriented computing, based on the principles of Design by Contract”. This project has been financially supported by the Hasler Foundation (Berne, Switzerland).