Abstract
A continuously increasing number of interconnected computer devices makes the requirement for programming abstractions for remote one-to-many interaction yet more stringent. The publish/subscribe paradigm has been advocated as a candidate abstraction for such one-to-many interaction at large scale. Common practices in publish/subscribe, however, include low-level abstractions which hardly leverage type safety, and provide only poor support for object encapsulation. This tends to put additional burden on software developers; guarantees such as the aforementioned type safety and object encapsulation become of increasing importance with an accrued number of software components, which modern applications also involve, besides an increasing number of hardware components.Type-based publish/subscribe (TPS) is a high-level variant of the publish/subscribe paradigm which aims precisely at providing guarantees such as type safety and encapsulation. We present the rationale and principles underlying TPS, as well as two implementations in Java: the first based on a specific extension of the Java language, and a second novel implementation making use of recent general-purpose features of Java, such as generics and behavioral reflection. We compare the two approaches, thereby evaluating the aforementioned features---as well as additional features which have been included in the most recent Java 1.5 release---in the context of distributed and concurrent programming. We discuss the benefits of alternative programming languages and features for implementing TPS. By revisiting alternative abstractions for distributed programming, including “classic” and recent ones, we extend our investigations to programming language support for distributed programming in general, pointing out that overall, the support in current mainstream programming languages is still insufficient.
- Agha, G. 1985. Actors: A model of concurrent computation in distributed systems. Ph.D. thesis, University of Michigan, Computer and Communication Science.]] Google ScholarDigital Library
- Aguilera, M. and Strom, R. 2000. Efficient atomic broadcast using deterministic merge. In Proceedings of the 19th ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing (PODC). 209--218.]] Google ScholarDigital Library
- Aguilera, M., Strom, R., Sturman, D., Astley, M., and Chandra, T. 1999. Matching events in a content-based subscription system. In Proceedings of the 18th ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing (PODC). 53--62.]] Google ScholarDigital Library
- Aksit, M., Wakita, K., Bosch, J., Bergmans, L., and Yonezawa, A. 1993. Abstracting object interactions using composition filters. In Proceedings of the 7th European Conference on Object-Oriented Programming (ECOOP). 152--184.]] Google ScholarDigital Library
- Altherr, M., Erzberger, M., and Maffeis, S. 1999. iBus---A software bus middleware for the Java platform. In Proceedings of the International Workshop on Reliable Middleware Systems of the 13th IEEE Symposium On Reliable Distributed Systems (SRDS). 43--53.]]Google Scholar
- Araujo, F. and Rodrigues, L. 2002. On QoS-Aware publish/subscribe. In Proceedings of the International Workshop on Distributed Event-based Systems (DEBS).]]Google Scholar
- Armstrong, J., Virding, R., Wikström, C., and Williams, M. 1996. Concurrent Programming in Erlang, 2nd ed. Prentice-Hall, Upper Saddle River, NJ.]] Google ScholarDigital Library
- Bacon, J., Moody, K., Bates, J., Hayton, R., Ma, C., McNeil, A., Seidel, O., and Spiteri, M. 2000. Generic support for distributed applications. IEEE Comput. 33, 3 (Mar.), 68--76.]] Google ScholarDigital Library
- Baehni, S., Eugster, P., and Guerraoui, R. 2002. OS support for peer-to-peer programming: A case for TPS. In Proceedings of the 22th IEEE International Conference on Distributed Computing Systems (ICDCS). 355--362.]] Google ScholarDigital Library
- Baehni, S., Eugster, P., and Guerraoui, R. 2004. Data-Aware multicast. In Proceedings of the 5th IEEE International Conference on Dependable Systems and Networks (DSN). 233--242.]] Google ScholarDigital Library
- Baehni, S., Eugster, P., Guerraoui, R., and P.Altherr. 2003. Pragmatic type onteroperability. In Proceedings of the 23rd IEEE International Conference on Distributed Computing Systems (ICDCS).]] Google ScholarDigital Library
- Benton, N., Cardelli, L., and Fournet, C. 2004. Modern concurrency abstractions for C#. ACM Trans. Program. Lang. Syst. 26, 5 (Sept.), 769--804.]] Google ScholarDigital Library
- Birman, K. 1993. The process group approach to reliable distributed computing. Commun. ACM 36, 12 (Dec.), 36--53.]] Google ScholarDigital Library
- Bracha, G. 2004. Generics in the Java programming language. Tech. Rep., Sun Microsystems, Inc. July.]]Google Scholar
- Bracha, G. and Cook, W. 1990. Mixin-Based inheritance. In Proceedings of the 5th ACM Conference on Object-Oriented Programming Systems, Languages and Applications and 4th European Conference on Object-Oriented Programming (OOPSLA/ECOOP). 303--311.]] Google ScholarDigital Library
- Bracha, G., Odersky, M., Stoutamire, D., and Wadler, P. 1998. Making the future safe for the past: Adding genericity to the Java programming language. In Proceedings of the 13th ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA). 183--200.]] Google ScholarDigital Library
- Briot, J.-P. 1989. Actalk: A testbed for classifying and designing actor languages in the Smalltalk-80 environment. In Proceedings of the 3rd European Conference on Object-Oriented Programming (ECOOP). 109--129.]]Google Scholar
- Bruce, K., Petersen, L., and Fiech, A. 1997. Subtyping is not a good “match” for object-oriented languages. In Proceedings of the 11th European Conference on Object-Oriented Programming (ECOOP). 104--127.]]Google Scholar
- Bruce, K., Schuett, A., and van Gent, R. 1995. PolyTOIL: A type-safe polymorphic object-oriented language. In Proceedings of the 9th European Conference on Object-Oriented Programming (ECOOP). 27--51.]] Google ScholarDigital Library
- Canning, P., Cook, W., Hill, W., Olthoff, W., and Mitchell, J. 1989. F-Bounded polymorphism for object-oriented programming. In Proceedings of the 4th ACM International Conference on Functional Programming and Computer Architecture (FPCA). 273--280.]] Google ScholarDigital Library
- Cardelli, L. 1995. A language with distributed scope. In Conference Record of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). 286--297.]] Google ScholarDigital Library
- Cardelli, L., Donahue, J., Jordan, M., Kalsow, B., and Nelson, G. 1989. The modula-3 type system. In Conference Record of the 16th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). 202--212.]] Google ScholarDigital Library
- Cardelli, L. and Gordon, A. 1998. Mobile ambients. In International Conference on Foundations of Software Science and Computation Structures (FOSSACS). 140--155.]] Google ScholarDigital Library
- Caromel, D. 1993. Towards a method of object-oriented concurrent programming. Commun. ACM 36, 90--102.]] Google ScholarDigital Library
- Carzaniga, A., Rosenblum, D., and Wolf, A. 2000. Achieving scalability and expressiveness in an Internet-Scale event notification service. In Proceedings of the 19th ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing (PODC). 219--227.]] Google ScholarDigital Library
- Chambers, C. 1995. The cecil language specification and rationale: Version 2.0. Tech. Rep. UW-CS 93-03-05, Department of Computer Science and Engineering, University of Washington. Dec.]]Google Scholar
- Ciancarini, P. and Rossi, D. 1997. Jada---Coordination and communication for Java agents. In Mobile Object Systems: Towards the Programmable Internet. Lecture Notes in Computer Sceince, vol. 1222. Springer, 213--228.]] Google ScholarDigital Library
- Damm, C., Eugster, P., and Guerraoui, R. 2004. Linguistic support for distributed programming abstractions. In Proceedings of the 24th IEEE International Conference on Distributed Computing Systems (ICDCS). 244--251.]] Google ScholarDigital Library
- Dedecker, J., Cutsem, T. V., Mostinckx, S., D'Hondt, T., and Meuter, W. D. 2006. Ambient-Oriented programming in AmbientTalk. In Proceedings of the 20th European Conference on Object-Oriented Programming (ECOOP). 230--254.]] Google ScholarDigital Library
- Delporte-Gallet, C., Fauconnier, H., Guerraoui, R., and Kouznetsov, P. 2005. Mutual exclusion in asynchronous systems with failure detectors. J. Parallel Distrib. Comput. 65, 492--505.]] Google ScholarDigital Library
- Ellis, M. and Stroustrup, B. 1992. The Annotated C++ Reference Manual. Addison-Wesley, Reading, MA.]] Google ScholarDigital Library
- Engler, D., Wallach, D., and Kaashoek, M. 1996. Design and implementation of a modular, flexible, and fast system for dynamic protocol composition. Tech. Rep. TM-552, Massachusetts Institute of Technology, Laboratory for Computer Science. May.]]Google Scholar
- Eugster, P. 2006. Uniform proxies for Java. In Proceedings of the 21st ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA). 139--152.]] Google ScholarDigital Library
- Eugster, P., Damm, C., and Guerraoui, R. 2004. Towards safe distributed application development. In Proceedings of the 26th International Conference on Software Engineering (ICSE). 347--356.]] Google ScholarDigital Library
- Eugster, P., Felber, P., Guerraoui, R., and Handurukande, S. 2002. Event systems: How to have ones cake and eat it too. In Proceedings of the International Workshop on Distributed Event-Based Systems (DEBS). 625--630.]] Google ScholarDigital Library
- Eugster, P. and Guerraoui, R. 2001. Content-Based publish/subscribe with structural reflection. In Proceedings of the 6th Usenix Conference on Object-Oriented Technologies and Systems (COOTS). 131--146.]] Google ScholarDigital Library
- Eugster, P. and Guerraoui, R. 2002. Probabilistic multicast. In Proceedings of the 3rd IEEE International Conference on Dependable Systems and Networks (DSN). 313--323.]] Google ScholarDigital Library
- Eugster, P., Guerraoui, R., and Damm, C. 2001. On objects and events. In Proceedings of the 16th ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA). 131--146.]] Google ScholarDigital Library
- Eugster, P., Guerraoui, R., Handurukande, S., Kermarrec, A.-M., and Kouznetsov, P. 2003. Lightweight probabilistic broadcast. ACM Trans. Comput. Syst. 21, 4 (Nov.), 341--374.]] Google ScholarDigital Library
- Eugster, P., Guerraoui, R., and Sventek, J. 2000. Distributed asynchronous collections: Abstractions for publish/subscribe interaction. In Proceedings of the 14th European Conference on Object-Oriented Programming (ECOOP). 252--276.]] Google ScholarDigital Library
- Fischer, M., Lynch, N., and Paterson, M. 1985. Impossibility of distributed consensus with one faulty process. J. ACM 32, 2 (Apr.), 217--246.]] Google ScholarDigital Library
- Fournet, C. and Gonthier, C. 1996. The reflexive chemical abstract machine and the join calculus. In Conference Record of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). 372--385.]] Google ScholarDigital Library
- Fournet, C., Laneve, C., Maranget, L., and Remy, D. 1997. Implicit typing à la ML for the join-calculus. In Proceedings of the 8th International Conference on Concurrency Theory (CONCUR). 196--212.]] Google ScholarDigital Library
- Freeman, E., Hupfer, S., and Arnold, K. 1999. JavaSpaces Principles, Patterns, and Practice. Addison-Wesley, Reading, MA.]] Google ScholarDigital Library
- Gamma, E., Helm, R., Johnson, R., and Vlissides, J. 1995. Design Patterns, Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading, MA.]] Google ScholarDigital Library
- Gelernter, D. 1985. Generative communication in Linda. ACM Trans. Program. Lang. Syst. 7, 1 (Jan.), 80--112.]] Google ScholarDigital Library
- Gelernter, D. and Carriero, N. 1992. Coordination languages and their significance. Commun. ACM 35, 2 (Feb.), 97--107.]] Google ScholarDigital Library
- Goldberg, A. and Robson, A. 1983. Smalltalk-80: The Language and Its Implementation. Addison-Wesley, Reading, MA.]] Google ScholarDigital Library
- Gosling, J., Joy, B., Steele, G., and Bracha, G. 2000. The Java Language Specification, 2nd ed. Addison-Wesley, Reading, MA.]] Google ScholarDigital Library
- Gregono, P. and Sakkinen, M. 2000. Copying and comparing: Problems and solutions. In Proceedings of the 14th European Conference on Object-Oriented Programming (ECOOP). 226--250.]] Google ScholarDigital Library
- Grolaux, D., Glynn, K., and Roy, P. V. 2004. A fault tolerant abstraction for transparent distributed programming. In the 2nd International Conference on Multiparadigm Programming in Mozart/Oz (MOZ). 149--160.]]Google Scholar
- Haahr, M., Meier, R., Nixon, P., Cahill, V., and Jul, E. 2000. Filtering and scalability in the ECO distributed event model. In Proceedings of the 5th IEEE International Symposium on Software Engineering for Parallel and Distributed Systems (PDSE). 83--92.]] Google ScholarDigital Library
- Happner, M., Burridge, R., and Sharma, R. 2002. Java message service. Tech. Rep., Sun Microsystems, Inc. Mar.]]Google Scholar
- Harrison, T., Levine, D., and Schmidt, D. 1997. The design and performance of a real-time CORBA event service. In Proceedings of the 12th ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA). 184--200.]] Google ScholarDigital Library
- Havelka, D., Schulte, C., Brand, P., and Haridi, S. 2004. Thread-Based mobility in oz. In the 2nd International Conference on Multiparadigm Programming in Mozart/Oz (MOZ). 137--148.]]Google Scholar
- Hejlsberg, A. and Wiltamuth, S. 2001. C# Language Specification. Microsoft Press, Redmond, WA.]] Google ScholarDigital Library
- Kafura, D., Mukherji, M., and Lavender, G. 1993. ACT++: A class library for concurrent program. in C++ using actors. J. Object Oriented Program. 6, 6 (Oct.), 47--55.]]Google Scholar
- Kennedy, A. and Syme, D. 2001. Design and implementation of generics for the .NET common language runtime. In Proceedings of the 2001 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI).]] Google ScholarDigital Library
- Koenig, P. 1999. Messages vs objects for application integration. Distrib. Comput. 2, 3 (Apr.), 44--45.]]Google Scholar
- Krishnamurthy, B. and Rosenblum, D. 1995. Yeast: A general purpose event--action system. IEEE Trans. Softw. Eng. 21, 10 (Oct.), 845--857.]] Google ScholarDigital Library
- Liebermann, H. 1986. Using prototypical objects to implement shared behavior in object-oriented systems. In Proceedings of the ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA). 214--223.]] Google ScholarDigital Library
- Liskov, B. 1988. Distributed programming in argus. Commun. ACM 31, 3 (Mar.), 300--312.]] Google ScholarDigital Library
- Liskov, B. 1993. A history of CLU. ACM SIG-PLAN Not. 28, 3 (Mar.), 133--147.]] Google ScholarDigital Library
- Mansouri-Samani, M. and Sloman, M. 1997. GEM: A generalized event monitoring language for distributed systems. Distrib. Syst. Eng. 4, 2 (June), 96--108.]]Google Scholar
- Meyer, B. 1992a. Applying design by contract. IEEE Comput. 25, 10 (Oct.), 40--51.]] Google ScholarDigital Library
- Meyer, B. 1992b. Eiffel: The Language. Object-Oriented Series. Prentice-Hall, Upper Saddle River, NJ.]] Google ScholarDigital Library
- Meyer, B. 2002. Systematic concurrent object-oriented programming. Commun. ACM 36, 9, 56--80.]] Google ScholarDigital Library
- Milner, R. 1977. A theory of type polymorphism in programming. J. Comput. Syst. Sci. 17, 348--375.]]Google ScholarCross Ref
- Milner, R. 1999. Communicating and Mobile Systems: The π-Calculus. Cambridge University Press, New York.]] Google ScholarDigital Library
- Nielson, F. and Nielson, H. 1988. Two-Level semantics and code generation. Theor. Comput. Sci. 56, 1 (Jan.), 59--133.]] Google ScholarDigital Library
- Oberg, R. 2000. Understanding and Programming COM+. Prentice Hall, Upper Saddle River, NJ.]] Google ScholarDigital Library
- Oki, B., Pfluegl, M., Siegel, A., and Skeen, D. 1993. The information bus---An architecture for extensible distributed systems. In Proceedings of the 14th ACM Symposium on Operating System Principles (SOSP). 58--68.]] Google ScholarDigital Library
- OMG. 2000. Notification Service Standalone Document. OMG.]]Google Scholar
- OMG. 2001a. The Common Object Request Broker: Architecture and Specification, Chapter Value Type Semantics. OMG.]]Google Scholar
- OMG. 2001b. Event service. In CORBAservices: Common Object Services Specification. OMG.]]Google Scholar
- OMG. 2002. The Common Object Request Broker: Architecture and Specification, Version 3.0. OMG.]]Google Scholar
- OMG. 2003. Data Distribution Service for Real Time Systems Specification. OMG.]]Google Scholar
- Opyrchal, L., Astley, M., Auerbach, J., Banavar, G., Strom, R., and Sturman, D. 2000. Exploiting IP multicast in content-based publish-subscribe systems. In Proceedings of the 3rd IFIP/ACM International Conference on Distributed Systems Platforms and Open Distributed Processing (Middleware). 185--207.]] Google ScholarDigital Library
- Ostrovsky, K., Prasad, K., and Taha, W. 2002. Towards a primitive higher order calculus of broadcasting systems. In Proceedings of the 4th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming. 2--13.]] Google ScholarDigital Library
- Powell, D. 1996. Group communications. Commun. ACM 39, 4 (Apr.), 50--97.]] Google ScholarDigital Library
- Pratikakis, P., Spacco, J., and Hicks, M. 2004. Transparent proxies for Java futures. In Proceedings of the 19th ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA). 206--223.]] Google ScholarDigital Library
- Rivard, F. 1996. Smalltalk: A reflective language. In Proceedings of the 1st International Conference on Metalevel Architectures and Reflection (Reflection). 21--38.]]Google Scholar
- Rosenberry, W., Kenney, D., and Fisher, G. 1993. OSF Distributed Computing Environment: Understanding DCE. O'Reilly, Sebastopol, CA.]] Google ScholarDigital Library
- Solorzano, J. and Alagic, S. 1998. Parametric polymorphism for Java: A reflective solution. In Proceedings of the 13th ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA). 216--225.]] Google ScholarDigital Library
- Srinivasan, R. 1995. RFC 1831: Remote procedure call protocol specification version 2. Tech. rep., Sun Microsystems, Inc. Aug.]] Google ScholarDigital Library
- Steele, G. 1999. Growing a language. Higher-Order Symb. Comput. 12, 3 (Oct.), 221--236.]] Google ScholarDigital Library
- Sun. 2005. Core Java J2SE 5.0. Sun Microsystems, Inc. http://java.sun.com/j2se/1.5.0/.]]Google Scholar
- Taha, W. and Sheard, T. 1997. Multi-Stage programming. In Proceedings of the ACM International Conference on Functional Programming (ICFP). 321--321.]] Google ScholarDigital Library
- Talarian Corporation. 1999. Everything you need to know about Middleware: Mission-Critical interprocess communication (white paper). Talarian Corporation, http://www.talarian.com/.]]Google Scholar
- Thai, T. and Lam, H. 2001. .NET Framework Essentials. O'Reilly, Sebastopol, CA.]] Google ScholarDigital Library
- Thomas, D. 2004. Message oriented programming: The case for first class messages. J. Object Technol. 3, 5 (May--June), 7--12.]]Google ScholarCross Ref
- TIBCO. 1999. TIB/Rendezvous white paper. TIBCO, Inc. http://www.rv.tibco.com/.]]Google Scholar
- Unyapoth, A. and Sewell, P. 2001. Nomadic Pict: Correct communication infrastructure for mobile computation. In Conference Record of the 28th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). 116--127.]] Google ScholarDigital Library
- Yonezawa, A., Shibayama, E., Takada, T., and Honda, Y. 1987. 4: Modeling and programming in an object-oriented concurrent language abcl/1. In Object-Oriented Concurrent Programming. MIT Press, Cambridge, MA. 55--89.]] Google ScholarDigital Library
- Zenger, M. and Odersky, M. 2001. Implementing extensible compilers. In ECOOP Workshop on Multiparadigm Programming with Object-Oriented Languages.]]Google Scholar
Index Terms
- Type-based publish/subscribe: Concepts and experiences
Recommendations
A Design for Type-Directed Programming in Java
Type-directed programming is an important and widely used paradigm in the design of software. With this form of programming, an application may analyze type information to determine its behavior. By analyzing the structure of data, many operations, such ...
Associated types and constraint propagation for mainstream object-oriented generics
Proceedings of the 20th annual ACM SIGPLAN conference on Object oriented programming systems languages and applicationsSupport for object-oriented programming has become an integral part of mainstream languages, and more recently generic programming has gained widespread acceptance as well. A natural question is how these two paradigms, and their underlying language ...
Towards a Java Subtyping Operad
FTFJP'17: Proceedings of the 19th Workshop on Formal Techniques for Java-like ProgramsThe subtyping relation in Java exhibits self-similarity. The self-similarity in Java subtyping is interesting and intricate due to the existence of wildcard types and, accordingly, the existence of three subtyping rules for generic types: covariant ...
Comments