Summary: | device management in QSampler goes mad if timeout occured in liblscp | ||
---|---|---|---|
Product: | QSampler | Reporter: | Christian Schoenebeck <cuse> |
Component: | qsampler | Assignee: | Rui Nuno Capela <rncbc> |
Status: | CLOSED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | SVN Trunk | ||
Hardware: | Other | ||
OS: | Linux |
Description
Christian Schoenebeck
2005-05-04 19:09:22 CEST
I'm considering to take the brute-force approach while on liblscp, regarding these timeouts issue. I do hate do recognise that any LSCP command sequence go astray whenever a timeout occurs, leaving the client out of sync regarding the tcp stream (e.g. server just takes longer to respond to some LSCP command, the client timeouts and issues another different command which ultimately receives the wrong answer). The "brute force approach" goes like shutting down the socket connection whenever a timeout is detected on the client, and then reconnect. This approach assumes that the server is able to listen and accept a new client connection, even thought it is still processing a previous lengthy request (which results will go straight to /dev/null anyway :). I fear that approach (reconnecting) doesn't solve the problem at all. Because the LSCP server is currently implemented as singleton. Only one connection is served at the same time (FIFO). So your next command after a reconnection will still wait for the old command sent before the reconnection to return. We choses this design, because it reduced the effort of synchronization techniques a lot (Mutex, etc.) and we thought it would be quite uncommon to send several LSCP commands at the same time. We could change that singleton design of course and allow the server to serve multiple connections at the same time. But that reconnection brute force approach is still suboptimal. The best approach from my perspective would be to allow the liblscp calls to be asynchronous. That way, the GUI would always be responsive, no matter how long a command takes. But I guess this would mean a lot of work on QSampler side. Not sure... As of liblscp 0.3.0, a workaround has been taken forth to mitigate this timeout flush idiosyncrasy: the receive buffer is now being flushed whenever any transaction failure is detected due to a timeout. This issue has now been assumed fixed. |