Network objects are a simple and natural abstraction for distributed object-oriented programming. Languages that support network objects, however, often leave synchronization to the user, along with its associated pitfalls, such as data races and the possibility of failure. In this paper, we present D-SCOOP, a distributed programming model that allows for interference-free and transaction-like reasoning on (potentially multiple) network objects, with synchronization handled automatically, and network failures managed by a compensation mechanism. We achieve this by leveraging the runtime semantics of a multi-threaded object-oriented concurrency model, directly generalizing it with a message-based protocol for efficiently coordinating remote objects. We present our pathway to fusing these contrasting but complementary ideas, and evaluate the performance overhead of the automatic synchronization in D-SCOOP, finding that it comes close to—or outperforms—explicit locking-based synchronization in Java RMI.
Distributed software development—in which developers are located in different geographical locations—is common practice in today’s software industry. Teams are distributed over different countries, work in different time zones, may speak different languages and have different cultural backgrounds. All these conditions make it a challenge to collaborate effectively and efficiently in a distributed team. This thesis aims to provide new insights on how teams are affected by distribution, what the consequences are for the projects they work on, and how new techniques and tools could help to improve collaboration. The thesis investigates the impact of distribution on the communication amongst team members, showing that a substantial amount of the overall project time is spend on communication between the distributed parties of the development team. It further investigates the impact of different distribution scenarios, in particular, comparing distribution over two locations with distribution over three locations, and the role different time zone ranges have on the communication behavior of developers. The thesis also analyzes if and how the choice of development process affects distributed projects. We study metrics such as the overall success, economic savings, or motivation of the development teams, depending on the type of software development process used. For this, we use data from industry projects developed in Europe, Asia, and the Americas. Our findings suggest that choice of process alone is not a critical factor to succeed in globally distributed development. Another contribution of this thesis adds to our understanding of how often developers in distributed teams are insufficiently aware of the changes performed by other team members, and how often the changes of individual developers conflict with each other. Additionally, this thesis presents novel approaches on how configuration management systems can be combined with tools to detect and prevent conflicts between individual developers’ changes. It also introduces a debugging technique and an integrated tool, specifically designed to support effective collaboration among developers during shared debugging sessions. We discuss the design of both these tools and evaluate them in case studies, demonstrating their usefulness in collaborative development. Finally, this thesis presents an analysis on how programs are evolved over time. Knowledge on how programs are changed is instrumental when building tools that report changes to developers. In this contribution we focus on programs and languages that support contracts, a form of lightweight formal specifications, and analyze 21 contract-equipped projects written in Eiffel, C#, and Java. Our findings suggest that awareness tools, which monitor and analyze changes from developers, would benefit from adopting contracts as a language element that should be monitored.
In shared-memory concurrent programming, shared resources can be protected using synchronization mechanisms such as monitors or channels. The connection between these mechanisms and the resources they protect is, however, only given implicitly; this makes it difficult both for programmers to apply the mechanisms correctly and for compilers to check that resources are properly protected. This paper presents a mechanism to automatically check that shared memory is accessed properly, using a methodology called shared ownership. In contrast to traditional ownership, shared ownership offers more flexibility by permitting multiple owners of a resource. On the basis of this methodology, we define an abstract model of resource access that provides operations to manage data dependencies, as well as sharing and transfer of access privileges. The model is rigorously defined using a formal semantics, and shown to be free from data races. This property can be used to detect unsafe memory accesses when simulating the model together with the execution of a program. The expressiveness and efficiency of the approach is demonstrated on a variety of programs using common synchronization mechanisms.
Programming models for concurrency are optimized for dealing with nondeterminism, for example to handle asynchronously arriving events. To shield the developer from data race errors effectively, such models may prevent shared access to data altogether. However, this restriction also makes them unsuitable for applications that require data parallelism. We present a library-based approach for permitting parallel access to arrays while preserving the safety guarantees of the original model. When applied to SCOOP, an object-oriented concurrency model, the approach exhibits a negligible performance overhead compared to ordinary threaded implementations of two parallel benchmark programs.
Many novel programming models for concurrency have been proposed in the wake of the multicore computing paradigm shift. They aim to raise the level of abstraction for expressing concurrency and synchronization in a program, and hence to help developers avoid programming errors. Because of this goal, the semantics of the models themselves becomes ever more complex, increasing the risk of design flaws. We propose a methodology for prototyping concurrency models using executable formal specifications. The prototype can be used to test and correct the model at an early stage. Once the development is completed, the executable formal specification serves as an unambiguous reference. We apply this methodology to SCOOP, an object-oriented concurrency model. Using this approach, we were able to uncover and fix three major flaws in the model.