Skip to content

Commit 634b43d

Browse files
committed
wip - data streaming docs
1 parent a9ad610 commit 634b43d

11 files changed

+185
-397
lines changed
Lines changed: 14 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Datastreaming
1+
# Data Streaming
22

33
```{toctree}
44
:glob:
@@ -9,26 +9,21 @@
99
datastreaming/*
1010
```
1111

12-
The datastreaming system is being built as part of in-kind work to ESS. It will be the system that the ESS uses to take data and write it to file - basically their equivalent to the [ICP](/specific_iocs/DAE-and-the-ICP). The system may also replace the ICP at ISIS in the future.
12+
The data streaming system is being built as a requirement for HRPD-X and possibly SANDALS-II, separate (and complementary) to the `MNeuData` project. It is architecturally similar to the system that the ESS uses to take data (neutron events, sample environment, and anything else that we can throw into a streaming platform) and write it to file. Previously ISIS aided development to the ESS' streaming pipeline as part of an in-kind project. The system will replace the ICP at ISIS.
1313

14-
In general the system works by passing both neutron and SE data into [Kafka](https://kafka.apache.org/) and having clients that either view data live (like Mantid) or write the data to file, additional information can be found [here](http://accelconf.web.cern.ch/AccelConf/icalepcs2017/papers/tupha029.pdf) and [here](https://iopscience.iop.org/article/10.1088/1742-6596/1021/1/012013).
14+
In general this works by producing both neutron events and histograms, sample environment data, and other diagnostic data into a [Kafka](https://kafka.apache.org/) cluster and having clients (consumers in Kafka lingo!) that either view data live and act on it or write the data to a nexus file. Additional information can be found [here](http://accelconf.web.cern.ch/AccelConf/icalepcs2017/papers/tupha029.pdf) and [here](https://iopscience.iop.org/article/10.1088/1742-6596/1021/1/012013).
1515

16-
All data is passed into flatbuffers using [these schemas](https://github.com/ess-dmsc/streaming-data-types) - we have a tool called [saluki](https://github.com/ISISComputingGroup/saluki) which can deserialise these and make them human-readable after they've been put into Kafka.
16+
All data is serialised into [Flatbuffers](https://flatbuffers.dev/) blobs using [these schemas](https://github.com/ess-dmsc/streaming-data-types) - we have a tool called [saluki](https://github.com/ISISComputingGroup/saluki) which can deserialise these and make them human-readable after they've been put into Kafka.
1717

18-
The datastreaming layout proposed looks something like this, not including the Mantid steps or anything before event data is collected:
18+
Overall architecture is still being decided, but this is an initial idea of how it could look.
1919

20-
![](ESSDSLayout.png)
20+
<TODO>
2121

22-
## Datastreaming at ISIS
23-
24-
Part of our in-kind contribution to datastreaming is to test the system in production at ISIS. Currently it is being tested in the following way, with explanations of each component below:
25-
26-
![](ISISDSLayout.png)
2722

2823
{#kafkacluster}
2924
## The Kafka Cluster
3025

31-
There is a Kafka cluster at `livedata.isis.cclrc.ac.uk`. Port 31092 is used for the primary Kafka broker.
26+
There is a (non-production!) Kafka cluster at `livedata.isis.cclrc.ac.uk:31092`.
3227
A web interface is available [here](https://reduce.isis.cclrc.ac.uk/redpanda-console/overview).
3328

3429
:::{important}
@@ -37,71 +32,19 @@ Automation team. See `\\isis\shares\ISIS_Experiment_Controls\On Call\autoreducti
3732
support information.
3833
:::
3934

40-
### I want my own local instance of Kafka
41-
42-
See {ref}`localredpanda`
43-
44-
## Neutron Data
45-
46-
The ICP on any instrument that is running in full event mode and with a DAE3 may stream neutron events into Kafka.
47-
48-
This is controlled using flags in the `isisicp.properties` file:
49-
50-
```
51-
isisicp.kafkastream = true
52-
# if not specified, topicprefix will default to instrument name in code
53-
isisicp.kafkastream.topicprefix =
54-
# FIA team run their kafka cluster on port 31092, not 9092
55-
isisicp.kafkastream.broker = livedata.isis.cclrc.ac.uk:31092
56-
isisicp.kafkastream.topic.suffix.runinfo = _runInfo
57-
isisicp.kafkastream.topic.suffix.sampleenv = _sampleEnv
58-
isisicp.kafkastream.topic.suffix.alarms = _alarms
59-
```
60-
61-
In the same file, you will also need to ensure the following properties are set:
62-
63-
```
64-
isisicp.incrementaleventnexus = true
65-
66-
# Event rate, can adjust up or down
67-
isisicp.simulation.neventssim = 5000
35+
## How to/FAQs
36+
See {ref}`datastreaminghowto`
6837

69-
# Ensure simulated data is switched on
70-
isisicp.simulation.simulatedata = true
71-
isisicp.simulation.simulatespec0 = true
72-
isisicp.simulation.simulatebin0 = true
73-
isisicp.simulation.spreadsimevents = true
74-
```
75-
76-
You additionally need to ensure you are running in event mode. You can do this using the DAE tables `wiring_event_ibextest.dat`, `detector_ibextest.dat` & `spectra_ibextest.dat`. Copies of these tables can be found at:
77-
78-
```
79-
\\isis\shares\ISIS_Experiment_Controls\event_mode_tables
80-
```
38+
## Run starts/stops
39+
See {ref}`dsrunstartstops`
8140

8241
## SE Data
8342

8443
See [Forwarding Sample Environment](datastreaming/Datastreaming---Sample-Environment)
8544

45+
## Neutron events and histograms
46+
See {ref}`dseventshistos`
47+
8648
## Filewriting
8749

8850
See [File writing](datastreaming/Datastreaming---File-writing)
89-
90-
## System Tests
91-
92-
:::{note}
93-
These tests are not currently enabled.
94-
:::
95-
96-
Currently system tests are being run to confirm that the start/stop run and event data messages are being sent into
97-
Kafka and that a Nexus file is being written with these events. The Kafka cluster and filewriter are being run in docker
98-
containers for these tests and so must be run on a Windows 10 machine. To run these tests you will need to
99-
install [docker for windows and add yourself as a docker-user](https://docs.docker.com/docker-for-windows/install/#install-docker-desktop-on-windows).
100-
101-
## The future of streaming at ISIS
102-
103-
After the in-kind work finishes and during the handover, there are some proposed changes that affect the layout and
104-
integration of data streaming at ISIS. This diagram is subject to change, but shows a brief overview of what the future
105-
system might look like:
106-
107-
![](FUTUREISISDSLayout.png)
-24 KB
Binary file not shown.

doc/specific_iocs/dae/ESSDSLayout.xml

Lines changed: 0 additions & 109 deletions
This file was deleted.
-31 KB
Binary file not shown.

0 commit comments

Comments
 (0)