PAcceptor and SConnector frameworks
2000, ACM Computing Surveys
Abstract
In this article we present the PAcceptor and SConnector frameworks that facilitate rapid deployment of applications that require both concurrency and inter-process communication system services. The PAcceptor and SConnector frameworks encapsulate both threads -primitive for concurrency --and sockets -primitive for inter-process communication --. These frameworks present a single interface to these disparate but essential services and thus promote the use of these abstractions in combination with ease. These frameworks may be customized to fabricate arbitrary applications by providing appropriate hotspot definitions. The frameworks obviate the need for explicit understanding and expertise over the underlying system servicessockets and threads -as well as the intricacies involved in combining the native socket and thread level services. The PAcceptors accept incoming connect requests using socket and provide service in parallel using threads while the SConnectors permit one or more threads to share a single connection to send data over the connection. Robust infrastructures for distributed and concurrent computing have been available for well over a decade and yet significant effort is required to exploit these services. As evidenced by a recent Technical Opinion column "Parallel Computing Still Not Ready for the Mainstream", in CACM the reason is neither due to the lack of infrastructures nor due to our cognitive ability to manage parallelism and concurrency. To the contrary parallelism and concurrency are quite innate and we thrive based on our ability to solve problems concurrently. The reason for the lack of use of these powerful technologies, we posit, is due to the combinatorial explosion of the conceptual difficulty in leveraging these abstract albeit powerful system services. Simplicity and maintainability is chosen over --better performance-and overwhelming complexity. Thus, in this article we present the PAcceptor and SConnector frameworks --which encapsulate these system level abstractions, hiding many of the difficult conceptual aspects--such that these high performance services may be leveraged sans their associated conceptual barriers. Programming with threads --an abstraction for concurrency --and sockets --an abstraction for inter-process communication --is anything but simple. Both conceptually { timing errors, race conditions, synchronization } and programmatically { thread attributes, socket options, and notational nuances } programming with these services is highly distractive in nature for application developers. Combining these two abstractions is even more complex. Understandably, more often than not engineers trade performance for simplicity and choose not to use these high performance devices solely due to the complexity involved. It is in this context that frameworks become highly relevant. Frameworks mitigate the barriers and promote the use of such complex abstractions by encapsulating them, while preserving the associated semantics [See 2 for examples].
References (9)
- "Parallel Computing Still Not Ready for the Mainstream", Domenico Talia, Communications of the ACM, Vol. 40, No. 7, Pages 98-99, July 1997.
- "Object-Oriented Application Frameworks", Fayad, M. and Schmidt, D., , Communications of the ACM, Vol. 40, No. 10, October 1997.
- Douglas C. Schmidt, ACE: The Adaptive Communications Environment, see http://siesta.cs.wustl.edu/~schmidt/ACE.html.
- Raman Kannan," Managing Continuous Data Feed with Subscriber/Publisher Pattern." (TR- SE-DNA-95-003). OOPSLA 95 Workshop on Patterns (Austin, Texas, October 15, 1995).
- Unix Network Programming, Richard Stevens, Prentice Hall, 1990.
- The TaskPile is a customization of a shared workpile library written to accompany the book by "ThreadTime" by Scott J. Norton and Mark D. Dipasquale, Hewlett Packard Professional Books, Published by Prentice Hall, 1996.
- The ThreadPool implementation is a customization of a library written by Robert Sproull to accompany the book by "Programming with Threads," by Steve Kleiman, Devang Shah, and Bart Smaalders (SunSoft Press, 1995).
- Gamma, E., R. Helm, R. Johnson, and J. Vlissides, Design Patterns: Elements of Reusable Object Oriented Software, Addison Wesley, Reading, MA, 1994.
- Raman Kannan," Scaleable Architecture for Reliable, High Volume Data Feed Handlers", TR-SE-DNA-97-002, Software Engineering Department, Monmouth University, NJ 07764.