From 4154688f5e91772f9a9c0d001316886b74686d9e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 23 Apr 2021 16:11:22 +0200 Subject: Add documentation about ZMQ/MsgPack --- doc/articles/online.rst | 85 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 doc/articles/online.rst (limited to 'doc') diff --git a/doc/articles/online.rst b/doc/articles/online.rst new file mode 100644 index 00000000..84e037ca --- /dev/null +++ b/doc/articles/online.rst @@ -0,0 +1,85 @@ +========================================== +Real-time data processing with indexamajig +========================================== + +Instead of reading from files, indexamajig can get its data over a ZeroMQ +socket. Use ``--zmq-input`` instead of ``--input`` or ``-i``. An error will +be generated if you use ``--zmq-input`` and ``--input`` or ``-i`` +simultaneously. + +Indexamajig assumes that the socket is a *pub/sub* socket. You will also need +to specify which message prefixes to subscribe to. Use ``--zmq-subscribe`` for +this:: + + indexamajig --zmq-input=tcp://127.0.0.1:5002 \ + --zmq-subscribe=ondaframedata \ + -o output.stream -g Eiger.geom ... + +You can use ``--zmq-subscribe`` multiple times to subscribe to multiple message +prefixes. + +The option ``--no-image-data`` will be honoured, if given. This makes it +possible to quickly check streaming data for "indexability". + + +Data format +=========== + +In this version, CrystFEL makes the following assumptions about the data +received via ZeroMQ: + +* The data is serialised using MessagePack +* The data consists of either a single MsgPack 'map' object, or an array of + maps. + If there are multiple map objects in the array, only the first one will be + used. The others will be ignored. +* The image data is given as a two-dimensional array (i.e. no 3D arrays with + 'panel number' as one of the dimensions). +* The image data itself is given as a MsgPack 'map' object with "type"=>"