Skip to content
Diego R. Zagals edited this page Sep 7, 2016 · 11 revisions

ZeroMQ as an alternative to the CORBA Notification Service for Alma Common Software

Abstract

The control of Atacama Large Millimeter/submillimeter Array (ALMA) is done using software built on a distributed object-oriented framework, specially designed for this job, called ALMA Common Software (ACS). ACS offers several services and common design patterns for applications developed on it. In general, ACS is based on Common Object Request Broker Architecture (CORBA) offering an abstraction of CORBA for services, making more easy the construction and deployment of distributed applications.

One of the services offered is the ACS Notification Channel based on CORBA Notification Service. This service is responsible of handling asynchronous messages between objects using ACS. There are alternatives for the CORBA Notification Service that could offer better performance and scalability.

Acronyms

  • ALMA: Atacama Large Millimeter/submillimeter Array
  • ACS: ALMA Common Software
  • 0MQ: ZeroMQ
  • DDS: Data Distribution Service
  • TAO: The ACE ORB (open source CORBA implementation written entirely in C/C++)

Introduction

The ALMA is a major collaboration effort between European (ESO), North American (NRAO) and East Asian countries (NAOJ), under operations on the Chilean Chajnantor plateau, at 5.000 meters of altitude. Currently, it is the largest radio-telescope on Earth, it has 66 antennas of 12-meter and 7-meter diameter, distributed over a wide extension, with up to 16 kilometers of baseline separation. ALMA has three types of 12-meters antennas: Vertex, Alcatel and Mitsubishi.

ALMA Software uses ACS as its main framework. ACS provides a software infrastructure common to all partners and consists of a documented collection of common patterns in and of components, which implement those patterns. The heart of ACS is based on a distributed component model, with ACS components implemented as CORBA objects in any of the supported programming languages. The teams responsible for the control system's development use ACS Components as the basis for control high level entities and for the implementation of devices such as an antenna mount control. ACS provides common CORBA-based services such as logging, error and alarm management, configuration database and lifecycle management.

Currently ACS relies on a CORBA Notification Service implementation (TAO Notify_Service) for its messaging system (a distributed and decoupled implementation of the Publish-subscribe architectural pattern), which is part of CORBA 2.x standard. It is known that this standard is not widely used in the industry. At this moment there are other alternatives (i.e. JMS, DDS, AMQP, ZeroMQ, etc) that may offer better message broker. Better could means either better throughput, less network overhead, better management and/or monitoring, more reliable or better support from the open-source community. However the current ACS Notification Channel API must be kept, to allow to do a seamless transition to the new messaging broker.

Global objective:

For both performance and features, it may be an advantage for ACS to use ZeroMQ instead of Notify Service as the underlying mechanism for message based communication.

Particular objectives:

  • Become familiar with ZeroMQ framework.
  • Compare ZeroMQ and Notify Service interfaces and see if a common abstraction can be found, to allow ACS to run either of these in a way that is transparent to code using ACS. Such an abstraction would probably be built into the "SimpleSupplier" and related ACS classes which offer messaging functionality to ACS components.
  • Implementation shall be done in C++, Java an optionally in python.
  • Set up a test, ideally with some measurement of throughput and other performance indicators, which uses DDS for communication.

Planning

Milestone Planned Completion Date Status
Read documentation of the requirements for this project Week 0 🆗
Become familiar with ZeroMQ framework Week 1 🆗
Compare ZeroMQ and Notify Service interfaces Week 2 🆗
Prototype design Week 4 🆗
Implementation of ZeroMQ as test Week 6 🆗
ZeroMQ integrated into the build system Week 9
Tests Week 11
Write the thesis and Presentation Week 14

Notes

ZeroMQ

  • Framework able to carry atomic messages asynchronously.
  • Avalaible for most SO (Linux, Windows, OSX) and support various programming languages (C, C++, Java, Python, Ruby,...) and comunication protocols (TCP, IPC, inproc, PGM, SOCKS5).
  • Has it own communication protocol (ZMTP - ZeroMQ Message Transport Protocol), which describes how two pieces talk, over TCP or IPC.
  • Works with different type of patterns (Pub-Sub, Request-Reply, Router-Dealer).

Pub-Sub Pattern

  • Is used for one-to-many distribution of data or events from a single publisher to multiple subscribers.
  • 5[ms] to stablish connection between subscriber and publisher.
  • 1K messages for 1 [ms].
  • Subscriber always miss the first messages that the publisher sends.
  • Sub socket MUST set a subscription using zmq_setsockopt().
  • One subscriber can be connected to many publishers.
  • Recomendation: sub socket starts first and then the pub socket

GIT

http://github.com/diegorz/ZeroMQ-ACS

Worklogs

2016-04-04

  • Read Documentation of the ZeroMQ
  • Write on Wiki of ACS-Community

2016-04-05

  • Read Documentation of the ZeroMQ

2016-04-07

  • Study ZeroMQ - The Guide

2016-04-08

  • Study ZeroMQ - The Guide

2016-04-11

  • Study SOCKET API
  • Compile ACS on Ubuntu

2016-04-12

  • Study Messaging Patterns

2016-04-15

  • Study Pub-Sub Pattern

2016-04-18

  • Study Advanced Pub-Sub Patterns

Next

  • ZeroMQ into ACS

Interesting links: