ICALEPCS 2009
THP074
Decoupling Control System Components Using Asynchronous Publish/Subscribe Middleware
C.Timmer, D.Abbott, D.Lawrence, E.J.Wolin*, E.Jastrzembski, V.H.Gyurjyan, W. G.Heyes (JLAB)
A speaker* at ICALEPCS 2007 advocated the decoupling of control system components through the use of asynchronous communications. The cMsg package from the Jefferson Lab DAQ group implements true publish/subscribe communications using a narrow interface that meets most of the requirements outlined in the talk referenced earlier. Decoupled or loosely-coupled communication ensures that changes to one part of a control system have no effect on other parts of the system. Asynchronous communication eliminates needless waits and timeouts. And the flexibility of the subscription space and the ability to transmit arbitrary information allows cMsg to be used for virtually any type of control application, including run control, logging, monitoring, hardware control, alarm systems, etc. In this paper we describe how publish/subscribe works, how it differs from client/server communications, and how asynchronous publish/subscribe communications allows for decoupling. We further describe the cMsg package and its narrow API, how it was designed for simplicity and ease of use, how we use it in control systems at JLab, and how we integrate cMsg with EPICS Channel Access.
* Stephen A, Lewis, "Elements of Control System Longevity", Proceedings of ICALEPCS 2007, Knoxville, TN, US.
US Department of Energy