blissdata: No synchronization of scan state
BlLissdata client provides an implementation as decouples individual scans.
As result there is no way to synchronize different scans together.
For a scan sequence for example
- SEQUENCE
- SCAN1
- SCAN2
The START of SCAN2 can be read client side before the END of SCAN1.
We talk about short timing of about 80ms
127.0.0.1:10003> json.get esrf:scan:01HGZMS926YVK7GXA7XGVXH5BF state_stream
"{\"pk\":\"01HGZMS926V2R4TKV4QSN94DS4\",\"encoding\":\"\",\"info\":\"\"}"
127.0.0.1:10003> xread streams esrf:stream:01HGZMS926V2R4TKV4QSN94DS4 0
1) 1) "esrf:stream:01HGZMS926V2R4TKV4QSN94DS4"
2) 1) 1) "1701869036616-0"
2) 1) "state"
2) "0"
2) 1) "1701869036627-0"
2) 1) "state"
2) "1"
3) 1) "1701869036630-0"
2) 1) "state"
2) "2"
4) 1) "1701869038678-0"
2) 1) "state"
2) "3"
5) 1) "1701869038687-0" <------------------ STOP
2) 1) "state"
2) "4"
127.0.0.1:10003> xread streams esrf:stream:01HGZMSB4VDQP02FASHKJW4T2P 0
1) 1) "esrf:stream:01HGZMSB4VDQP02FASHKJW4T2P"
2) 1) 1) "1701869038749-0" <------------------- START of the next SCANS
2) 1) "state"
2) "0"
2) 1) "1701869038762-0"
2) 1) "state"
2) "1"
3) 1) "1701869038765-0"
2) 1) "state"
2) "2"
4) 1) "1701869042814-0"
2) 1) "state"
2) "3"
5) 1) "1701869042821-0"
2) 1) "state"
2) "4"
The events was properly published, but are not read in the same order.
Right now that's a problem for flint, and the data display (F5).
For flint i will mitigate the problem by adding a delay of 0.5ms at the start of every scans.
But it would be good to provide a blissdata API which allow to read such events in the right order (if it is important for the client). Could be another client API.
Edited by Valentin Valls