project8 / dripline

Slow controls for medium scale physics experiments based on AMQP centralized messaging
http://www.project8.org/dripline
1 stars 0 forks source link

When a requested endpoint does not exist, client should get an error #40

Closed laroque closed 9 years ago

laroque commented 9 years ago

Currently if send a message to an endpoint that doesn't exist there is no response. Further, the node software enters a blocking poll waiting for a response that will never come. There are a few components to resolving this:

1) If we do channel.confirm_delivery() on the pika channel before issuing a basic_publish(), and also include mandatory=true in that basic publish, then it will return a bool which confirms that there existed one or more queue to which the message was actually delivered. A false return value can be caught and handled. 2) We should also institute a standard timeout to go with such requests. Processes known to take time (such as taking dpph measurements from the lockin) could quickly send an acknowledgement response that indicates that instruction was properly parsed and that more data will follow, after some response time.

laroque commented 9 years ago

2 is somewhat misguided now. All commands to devices are expected to be non-blocking. Long things should send an execute and wait for serial polling to indicate operation complete before trying to read data. That structure is supported. We can reassess if at some point we have a situation where this is not possible.

1 remains valid and should be done.

laroque commented 9 years ago

done as of 200760c4eebcd