Event: ICCS 2002 Tutorial, Amsterdam, Netherlands (22nd. April 2002)

Title: "Process Oriented Design for Java: Concurrency for All"

Speaker:

  • Peter Welch, University of Kent at Canterbury (phw@ukc.ac.uk)

  • Abstract

    Concurrency is thought to be an advanced topic – much harder than serial computing which, therefore, needs to be mastered first. This paper contends that this tradition is wrong, which has radical implications for the way we educate people in Computer Science – and on how we apply what we have learnt.

    A process-oriented design pattern for concurrency is presented with a specific binding for Java. It is based on the algebra of Communicating Sequential Processes (CSP) [1, 2, 3] as captured by the JCSP [4, 5, 6, 7, 8, 9] library of Java classes.  No mathematical sophistication is needed to master it. The user gets the benefit of the sophistication underlying CSP simply by using it. Those benefits include the simplification wins we always thought concurrency should generate.

    Although the Java binding is new, fifteen years of working with students at Kent have shown that the ideas within process-oriented design can be quickly absorbed and applied. Getting the ideas across as soon as possible pays dividends – the later it's left, the more difficult it becomes to wean people off serial ways of thought that often fit applications so badly.  Having said that, experienced engineers quickly find that their skills in serial design and programming carry over without conflict into the world of communicating processes - which is not the case when working with a concurrency model based on threads and (various kinds of) locks, where overlooked race hazards constantly threaten our security.

    JCSP enables a view of systems as layered networks of concurrent components, generating and responding to events communicated to each other through channels, barriers and other (formally defined) synchronisation primitives. The resulting image and discipline is intuitive, close to hardware design and correspondingly easy to visualise, reason about, compose and scale. Concurrency for all - and for everyday use - in the design and implementation of most kinds of computer system is both achievable and necessary.

    Keywords: components, processes, channels, design patterns, Java™, CSP, JCSP, CTJ.


    References

    1. C.A.R.Hoare. Communicating Sequential Processes. CACM, 21-8, pp. 666-677, August 1978.
    2. C.A.R.Hoare. Communicating Sequential Processes. Prentice Hall, 1985.
    3. A.W.Roscoe. The Theory and Practice of Concurrency. Prentice Hall, ISBN 0-13-674409-5, 1997.
    4. P.H.Welch and P.D.Austin. The JCSP Home Page. http://www.cs.ukc.ac.uk/projects/ofa/jcsp/, 1999.
    5. P.H.Welch, Java Threads in the Light of occam/CSP. In ‘Architectures, Languages and Patterns for Parallel and Distributed Applications’, WoTUG-21, pp. 259-284, IOS Press (Amsterdam), ISBN 90 5199 391 9, April 1998.
    6. P.H.Welch. Parallel and Distributed Computing in Education.  In J.Palma et al. ‘VECPAR’98’, Lecture Notes in Computer Sciince, vol. 1573, Springer-Verlag, June 1998.
    7. G.S.Stiles, A.Bakkers, G.H.Hilderink and P.H.Welch. Safe and Verifiable Design of Concurrent Programs. In ‘Proceedings of the 3rd. International Conference on Software Engineering and Applications’, pp 20-26, IASTD, Oct. 1999.
    8. D.Lea. Concurrent Programming in Java (Second Edition): Design Principles and Patterns. The Java Series, Addison-Wesley, section 4.5, 1999.
    9. J.M.R.Martin and P.H.Welch. A CSP model for Java Multithreading. In ‘Proceedings of the International Symposium on Software Engineering for Parallel and Distributed Systems (PDSE 2000)’, pages 114-122, IEEE Computer Society Press, June 2000.