Using Message Broker with EPICS: SPX Controls Use Cases Siniša Veseli Software Engineer AES / Software Services Group EPICS v4 Group Meeting September.

Slides:



Advertisements
Similar presentations
COM vs. CORBA.
Advertisements

Channel Access Protocol Andrew Johnson Computer Scientist, AES Controls Group.
Introduction to push technology © 2009 Research In Motion Limited.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
Network Management Overview IACT 918 July 2004 Gene Awyzio SITACS University of Wollongong.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Communicating over the Network Network Fundamentals – Chapter 2.
UDP - User Datagram Protocol UDP – User Datagram Protocol Author : Nir Shafrir Reference The TCP/IP Guide - ( Version Version.
MIT iCampus iLabs Software Architecture Workshop June , 2006.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
1 ITC242 – Introduction to Data Communications Week 12 Topic 18 Chapter 19 Network Management.
Networking Theory (part 2). Internet Architecture The Internet is a worldwide collection of smaller networks that share a common suite of communication.
Chapter 13 Embedded Systems
Software Engineering Module 1 -Components Teaching unit 3 – Advanced development Ernesto Damiani Free University of Bozen - Bolzano Lesson 2 – Components.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Communicating over the Network Network Fundamentals – Chapter 2.
What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host IP treats a computer as an endpoint of communication Best.
Process-to-Process Delivery:
Hands-On Microsoft Windows Server 2008 Chapter 1 Introduction to Windows Server 2008.
Using Message Broker with EPICS: SPX Controls Use Cases Siniša Veseli Software Engineer AES / Software Services Group EPICS Collaboration Meeting October.
Data Center Infrastructure
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
Avro Apache Course: Distributed class Student ID: AM Name: Azzaya Galbazar
NetworkProtocols. Objectives Identify characteristics of TCP/IP, IPX/SPX, NetBIOS, and AppleTalk Understand position of network protocols in OSI Model.
Presentation on Osi & TCP/IP MODEL
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Chapter 4 Networking and the Internet Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Institute of Computer and Communication Network Engineering OFC/NFOEC, 6-10 March 2011, Los Angeles, CA Lessons Learned From Implementing a Path Computation.
Remote Access Chapter 4. Learning Objectives Understand implications of IEEE 802.1x and how it is used Understand VPN technology and its uses for securing.
Remote Access Chapter 4. Learning Objectives Understand implications of IEEE 802.1x and how it is used Understand VPN technology and its uses for securing.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Network Services Networking for Home and Small Businesses – Chapter 6.
Chapter Three Network Protocols By JD McGuire ARP Address Resolution Protocol Address Resolution Protocol The core protocol in the TCP/IP suite that.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
Outline Overview Video Format Conversion Connection with An authentication Streaming media Transferring media.
Guide to Linux Installation and Administration, 2e1 Chapter 2 Planning Your System.
Unit – I CLIENT / SERVER ARCHITECTURE. Unit Structure  Evolution of Client/Server Architecture  Client/Server Model  Characteristics of Client/Server.
TCP/IP Transport and Application (Topic 6)
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Computer Emergency Notification System (CENS)
1 Introduction to Middleware. 2 Outline What is middleware? Purpose and origin Why use it? What Middleware does? Technical details Middleware services.
9 September 2008CIS 340 # 1 Topics reviewTo review the communication needs to support the architectures variety of approachesTo examine the variety of.
Event-Based Hybrid Consistency Framework (EBHCF) for Distributed Annotation Records Ahmet Fatih Mustacoglu Advisor: Prof. Geoffrey.
Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
.NET Enterprise Services COM+ 1.5 麥超俊 Bobby Mak 架構技術推廣經理開發工具暨平台推廣處台灣微軟股份有限公司.
802.11n Sniffer Design Overview Vladislav Mordohovich Igor Shtarev Luba Brouk.
 Apache Airavata Architecture Overview Shameera Rathnayaka Graduate Assistant Science Gateways Group Indiana University 07/27/2015.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
Messaging. Message Type Patterns Command Invoke a procedure in another application SOAP request is an example Document Message Single unit of information,
Distributed (Operating) Systems -Communication in Distributed Systems- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet.
S O A P ‘the protocol formerly known as Simple Object Access Protocol’ Team Pluto Bonnie, Brandon, George, Hojun.
1 Microsoft Windows 2000 Network Infrastructure Administration Chapter 4 Monitoring Network Activity.
Chapter 131 Distributed Processing, Client/Server, and Clusters Chapter 13.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
AMQP, Message Broker Babu Ram Dawadi. overview Why MOM architecture? Messaging broker like RabbitMQ in brief RabbitMQ AMQP – What is it ?
Matthias Clausen, Jan Hatje, DESY CSS Overview – Alarm System and Management CSS Overview - GSI, 11 Februrary CSS Overview Alarm System and CSS.
PvaPy: Python API for EPICS PV Access Siniša Veseli Scientific Software Engineering & Data Management Advanced Photon Source EPICS Meeting October 2015.
© 2008 by Wind River; made available under the EPL v1.0 | 19-Nov-2008 TCF The Target Communication Framework Michael Scharf, Wind River wiki.eclipse.org/DSDP/TM/TCF_FAQ.
FlowLevel Client, server & elements monitoring and controlling system Message Include End Dial Start.
Monitoring Dynamic IOC Installations Using the alive Record Dohn Arms Beamline Controls & Data Acquisition Group Advanced Photon Source.
Chapter 27 Network Management Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IST 201 Chapter 11 Lecture 2. Ports Used by TCP & UDP Keep track of different types of transmissions crossing the network simultaneously. Combination.
Common Transport Rafael Schloming. Objectives Scaling Engineering Time ● N experts in protocol & language -> 1 protocol expert & N language experts ●
Windows 2008 Overview Lecture 1.
Distribution and components
CHAPTER 3 Architectures for Distributed Systems
Chapter 3: Windows7 Part 4.
Multimedia and Networks
Process-to-Process Delivery:
Software models - Software Architecture Design Patterns
Presentation transcript:

Using Message Broker with EPICS: SPX Controls Use Cases Siniša Veseli Software Engineer AES / Software Services Group EPICS v4 Group Meeting September 10, 2013

Outline  About SPX  Why Use Message Broker?  SPX Controls Software  Performance Measurements  Summary EPICS v4 Group Meeting September 10,

About SPX  SPX: Short-Pulse X-rays project  Originally one of the major goals of the APS Upgrade (APS-U) -Addressed the need for intense, tunable, high-repetition rate, picosecond x-ray pulses -Ultimate goal: deliver short (2ps) x-ray pulses at 6.5MHz  Technically most complex part of the APS-U -2 cryomodules, each with 4 superconducting RF deflecting cavities operating at 2815MHz -Must keep at minimum disturbance of the storage ring during user operation -SPX0 Systems: 2 cavity cryomodule, used for testing  Not compatible with the recent APS-U direction (evaluating incorporation of the Multi-bend Achromat Lattice) EPICS v4 Group Meeting September 10,

4

SPX Controls Requirements  The entire SPX system must be thoroughly integrated with the existing APS storage ring controls, timing, and diagnostics  Provide remote monitoring and control to all SPX subsystems consistent with APS standards and existing OAG tools -Data must be stored in SDDS (Self-Describing Data Sets) format  Provide the necessary interfaces between the SPX and other APS systems as required by the SPX needs (e.g. RTFB, MPS, Event System, etc.)  Provide a real-time data processing environment for the SPX control algorithms to ensure they can be executed at the necessary rate  Provide thorough diagnostic information and tools to assist in quick determination of SPX performance and post-mortem fault analysis (required for maintaining high availability) 5 EPICS v4 Group Meeting September 10, 2013

SPX Controls Use Cases  Keep up with LLRF Controllers: must be able to handle data rates of up to 15MB/s per Controller  Access to complex data structures  Real-time access to monitoring and diagnostics data to multiple users simultaneously  Ability to access real-time data using Matlab/Octave  Data storage services  Cataloging services  Fast logging system 6 EPICS v4 Group Meeting September 10, 2013

Why Message Broker?  Advanced Message Queuing Protocol (AMQP) supports wide variety of communications patterns and is frequently used in enterprise applications  Typical use cases: -Real-Time feed or constantly updating data -Point-to-point messaging -Advanced publish-and-subscribe -Delivering messages when destination comes online -Receiving constant status updates and sending large messages at the same time and over the same network connection -Transactional messaging -Communication between diverse programming languages/operating systems -Remote procedure call patterns  Number of freely available AMQP broker/client implementations (QPID, ActiveMQ, RabbitMQ, SwiftMQ…)  Can we leverage some of the available AMQP tools for EPICS applications, not as a replacement for CA/PVA, but alongside those? 7 EPICS v4 Group Meeting September 10, 2013

Advanced Message Queuing Protocol  Originated in 2003 (JP Morgan & Chase, London UK)  Open standard, v1.0 became OASIS standard in 10/2012  Wire-level protocol, mandates behavior of messaging providers and clients to assure interoperability between different implementations  Few protocol details: -Basic unit of data: frame -Nine frame bodies used to initiate, control and tear down message transfer between two peers -Messages on a link flow in one direction only -All message transfers must be acknowledged (for reliability guarantees) -Multiple links can be combined in a session -Application creates (immutable) bare messages that have a body and an optional list of standard (e.g., message id) and application-specific properties -Messages may be annotated by intermediaries (via message headers) -Application data can be in any form/encoding: one can use AMQP for sending self-describing data 8 EPICS v4 Group Meeting September 10, 2013

AMQP vs PVA  PV Access: natural evolution of Channel Access, designed with EPICS applications in mind (for signal monitoring, scientific data services)  Data type support: -Both protocols support all basic (primitive) types and strings -AMQP also supports Decimal32/64/128, TimeStamp, and Uuid -AMQP supports described types (primitive type + descriptor), PVA supports introspection data (describes type of user data item) -PVA supports Unions, AMQP does not -PVA supports BitSets (finite sequence of bits) -Both support composite types (structures) -Both support Arrays (sequence values of a single type) -AMQP supports (polymorphic) Lists and Maps (polymorphic mapping from distinct keys to values)  PVA channel: connection to a single named resource that resides on some server (client-server model)  AMQP type systems involve broker as intermediary: messages on a link flow in one direction only 9 EPICS v4 Group Meeting September 10, 2013

AMQP vs PVA  Protocols utilize different channel/link management  Both protocols have a concept of control vs application messages  PVA application message headers are fixed size (8-byte long)  PVA has predefined messages types (e.g., channel get, channel put, channel put- get, channel monitor, channel array, etc.)  PVA servers must broadcast beacon messages over UDP (beacons are used for announcing new servers and server restarts); PVA channel search messages are typically sent over UDP, while data transmission uses TCP  AMQP is built on top of TCP  AMQP has built in support for transactions and security  PVA: optimized for performance, geared towards simplicity and efficiency  AMQP: more flexibility, more complexity 10 EPICS v4 Group Meeting September 10, 2013

11 EPICS v4 Group Meeting September 10, 2013

12 EPICS v4 Group Meeting September 10, 2013

13 EPICS v4 Group Meeting September 10, 2013

Plugin Performance: Testing  LLRF4 Driver (SPX0) collects data in 32KB “chapters” (16 I/Q waveforms with 512 integers)  LLRF “stream” size is determined by couple of EPICS PVs: -Number of chapters to collect in a single ND array -Number of ND arrays to collect and stream  LLRF streams are associated with numerous ND Attributes (sent separately from actual ND Array data)  LLRF IOC has 3 stream plugins: -TCP (uses asyn v4.18 IP port driver, about 3.1K lines of support code) -PVA (uses EPICS v4.3.0 RPC client, about 2.1K lines of support code) -AMQP (Apache QPID v0.20, about 1.7K lines of support code)  Client side performance was measured in terms of time required to pack and send one ND array data to a service running on a remote host over a gigabit network  Measured times do not include service processing time, but in case of PVA they include empty RPC response (less than 2ms)  Client machine: 8GB RAM, 4 cores/8 threads, 1Gbit NIC 14 EPICS v4 Group Meeting September 10, 2013

15 EPICS v4 Group Meeting September 10, 2013

Plugin Performance: Results  Software can easily keep up with nominal data rates  One second worth of LLRF ND Array data is processed in about:  TCP Stream Plugin: 0.15 seconds  PVA Stream Plugin: 0.30 seconds  AMQP Stream Plugin: 1.85 seconds (would require 2 threads to keep up)  PVA plugin performance is a factor of 6 better than AMQP plugin for streaming arrays (monomorphic data): QPID v0.20 C++ APIs have no support for AMQP arrays and require sending array elements via lists (very inefficient)  Comparable PVA/AMQP plugin performance for ND attributes (polymorphic data)  Preparing/sending initial stream message with about 200 LLRF ND Attributes (approximately 16KB of structured data):  TCP Stream Plugin: prepare/send message in under 0.5 milliseconds  PVA Stream Plugin: 4-5 milliseconds to pack, 4-5 milliseconds to send; initial call to RCP service takes milliseconds  AMQP Stream Plugin: 3-4 milliseconds to pack, 4-5 milliseconds to send 16 EPICS v4 Group Meeting September 10, 2013

Message Broker Approach: Lessons Learned  Our Broker Choice: Apache QPID -Open source, supports AMQP v1.0 and several earlier protocol versions -Platform Support: Linux, OS X, JVM -Extensive set of management tools and easy to use APIs -Client Support: C/C++, Java, Python, Perl, PHP… -Extensive documentation -Excellent support for maps/dictionaries -Extremely flexible and configurable -Works “out of the box” -Active user community, large user base  QPID-related Issues: -Inadequate API support results in subpar performance with arrays -No client support for VxWorks  General issues: -Not all brokers support AMQP v1.0 (not compatible with earlier protocol versions) 17 EPICS v4 Group Meeting September 10, 2013

Summary  One can successfully integrate message-oriented middleware into EPICS-based systems alongside CA/PVA  Main advantages of this approach: -Flexibility -Ability to leverage large number of freely available (open source) tools and frameworks  AMQP is an open standard protocol that ensures interoperability between different implementations of messaging providers/clients  Broker choice impacts performance, platform/language/feature support, ease of use, configuration options, etc. 18 EPICS v4 Group Meeting September 10, 2013