Problem: Imagine a scenario where multiple clients access (i.e., requests) the same DEVIO
instance, being the same SMIO or not. For operations that work in 2 or more messages, like the acquisition, there could be a concurrency issue in that different clients request an acquisition with different parameters (by means of the data_aquire () function).
In this state, currently, there is no way to be sure that subsequently calls to get_data_block (), will return data relative to the respective data_aquire () parameters. Of course, if the a second
data_aquire () requests less samples than the first one, and the first client requests for a certain block of data, invalid blocks will still be reported to the client correctly, but that wouldn't make sense, as the client specifically requested for more samples.
Solution: There are various approaches that could be taken, two of them are:
1: Mark down operations that require two or more exported functions to be completed atomically
2: Don't allow other clients to perform functions belonging to a specific operation, until the first client has received an answer
Issue by lerwys Wednesday May 28, 2014 at 12:03 GMT Originally opened as https://github.com/lerwys/bpm-software-old-bakcup/issues/7
Problem: Imagine a scenario where multiple clients access (i.e., requests) the same DEVIO instance, being the same SMIO or not. For operations that work in 2 or more messages, like the acquisition, there could be a concurrency issue in that different clients request an acquisition with different parameters (by means of the data_aquire () function).
In this state, currently, there is no way to be sure that subsequently calls to get_data_block (), will return data relative to the respective data_aquire () parameters. Of course, if the a second data_aquire () requests less samples than the first one, and the first client requests for a certain block of data, invalid blocks will still be reported to the client correctly, but that wouldn't make sense, as the client specifically requested for more samples.
Solution: There are various approaches that could be taken, two of them are: