itm / testbed-runtime

WISEBED Wireless Sensor Network Testbed Infrastructure Software
https://github.com/itm/testbed-runtime/wiki
15 stars 11 forks source link

Gateway does not connect to devices and log outputs on startup if portal is not available #391

Closed danbim closed 9 years ago

danbim commented 9 years ago

Assuming that the portal is down (e.g., not yet started) the gateway process will wait for the portal to become available before trying to connect to devices. Now that the GatewayEventQueue is available to persist the messages we should change this behaviour so that outputs during this timespan are not lost.

danbim commented 9 years ago

Unfortunately, this results out of the fact that DeviceDB is not available when portal is not running. So this can't really be fixed. The only solution would be to buffer all the outputs anyway (without knowing how to interpret them regarding e.g., the pipeline) and replay it as soon as DeviceDB is ready. However, I consider this overkill for such an exceptional use case, so I won't fix it. For all intermittent connectivity issues in which the gateway has already retrieved the config and is connected to the device it output persistence works well...